Can I extract files from (corrupt) rootfs?

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.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #42365
    Member
    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?

      #42366
      Member
      Xecure
        Helpful
        Up
        0
        ::

        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 mnt

        Check 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 mnt

        Now 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.

        #42378
        Member
        mida
          Helpful
          Up
          0
          ::

          Thank you.It worked excellent!

          #42384
          Member
          olsztyn
            Helpful
            Up
            0
            ::

            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_Parameters

            #42386
            Anonymous
              Helpful
              Up
              0
              ::

              > 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”)

              #42396
              Member
              Xecure
                Helpful
                Up
                0
                ::

                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.

                #42455
                Member
                Xecure
                  Helpful
                  Up
                  0
                  ::

                  Very simple entry for accessing the live filesystems.
                  https://antixlinuxfan.miraheze.org/wiki/AntiX_Live_System#Accessing_the_Live_systemfiles

                  Whenever 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.

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.