Forum › Forums › New users › New Users and General Questions › Can I extract files from (corrupt) rootfs?
- This topic has 6 replies, 4 voices, and was last updated Oct 1-12:35 pm by Xecure.
-
AuthorPosts
-
September 30, 2020 at 7:22 am #42365Member
mida
Hi everyone
I made live usb with root persistence.I installed some additional apps.Now i can’t boot and get to files stored on rootfs.
i install antix on HDD. It works fine.I would like to extract some files from rootfs (from live usb drive) so i can use them on my antix installed on hdd?
Is it possible?September 30, 2020 at 7:52 am #42366Member
Xecure
::This was interesting to me, so I investigated a bit.
All rootfs, homefs, etc files are compressed file systems. I found an old post about how to mount them and i tried it out myself.
Navigate to the folder containing the rootfs file and open a terminal there (or open a terminal and navigate (cd) to the folder containing the rootfs file).
I executed these commands:
1. Create a mounting point
mkdir mntCheck information and type of file for rootfs
file rootfs
2. It gave me this information:
rootfs: Linux rev 1.0 ext4 filesystem data, UUID=f8b826be-ffb4-47c5-9f95-747ac9a1a0c0 (extents) (64bit) (large files) (huge files)3. Mounted rootfs to acces it
sudo mount -o ro,loop rootfs mntNow the rootfs will be mounted and you should be able to acces the information in the mnt folder just created.
Now you should be able to find the files you want to recover
antiX Live system enthusiast.
General Live Boot Parameters for antiX.September 30, 2020 at 4:42 pm #42378Membermida
September 30, 2020 at 6:23 pm #42384Memberolsztyn
::All rootfs, homefs, etc files are compressed file systems. I found an old post about how to mount them and i tried it out myself.
Thank you Xecure! This is a valuable solution to save in my HowTo, although I have not yet experienced rootfs corruption under antiX, it might come in handy some day…
Regards…Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersSeptember 30, 2020 at 7:13 pm #42386Anonymous
::> corrupt
It’s possible that something other than the rootfs file caused the problem. For instance, I once had a liveUSB become “corrupt”, as in would not boot, due to a strange character spontaneously showing up in label field of its boot partition.rootfs: Linux rev 1.0 ext4 filesystem data
To peek beyond the details exposed via the “file” utility, we can use “dumpe2fs” and “debugfs”
$ dumpe2fs rootfs
$ debugfs freefrag rootfs
In the event it that ever does become corrupted (FWIW, I have never noticed an occurence this),
the fsck utility may be able to repair it.$ e2fsck rootfs
(or “fsck.ext4 rootfs”)October 1, 2020 at 2:12 am #42396Member
Xecure
::Thanks, skidoo for the extra info.
I will probably add it to the wiki once I have some time today.
- This reply was modified 2 years, 7 months ago by Brian Masinick.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.October 1, 2020 at 12:35 pm #42455Member
Xecure
::Very simple entry for accessing the live filesystems.
https://antixlinuxfan.miraheze.org/wiki/AntiX_Live_System#Accessing_the_Live_systemfilesWhenever you have the time, please take a look and pick it apart if you figure it is all wrong, skidoo and any other knowledgeable devs.
antiX Live system enthusiast.
General Live Boot Parameters for antiX. -
AuthorPosts
- You must be logged in to reply to this topic.