Forum › Forums › New users › New Users and General Questions › Live USB requires file system check of root filesystem
Tagged: filesystem, fsck, Live-USB
- This topic has 7 replies, 5 voices, and was last updated May 11-8:00 pm by ModdIt.
-
AuthorPosts
-
May 11, 2022 at 1:11 pm #83030Member
Grisonix
I made a Live USB from an existing system. In the init stage I get the error message:
“An automatic file system check (fsck) of the root file system failed. A manual fsck must be performed then the system restarted. fsck should be performed in maintenance mode with the root file system mounted in read-only mode
The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. After performing system maintenance, press CONTROL-D to terminate the maintenance shell and restart the system.”
I logged into root and ran fsck on /dev/sda1 /dev/sda2 and /dev/sda3 with no problems. I tried to run fsck on /dev/sda and got an error message that it is in use. I ran umount on /dev/sda and got the message that “/dev/sda: not mounted”
May 11, 2022 at 3:11 pm #83033Moderator
christophe
::I logged into root and ran fsck on /dev/sda1 /dev/sda2 and /dev/sda3 with no problems.
That should be adequate. Do you get any errors on a subsequent reboot?
confirmed antiX frugaler, since 2019
May 11, 2022 at 3:28 pm #83034MemberGrisonix
May 11, 2022 at 4:38 pm #83035Moderator
Brian Masinick
::Since the drive needs to be “mounted” in some fashion, I vaguely remember an old method I used 15-20 years ago;
I’d boot into single user mode, and remount the root drive (/dev/sda in your case) read-only.
Once file checking is complete, I’d remount n the usual way or simply reboot the system.Resources to read for more information to provide you some additional guidance:
https://linuxhandbook.com/fsck-command/
https://www.tecmint.com/fsck-repair-file-system-errors-in-linux/
https://phoenixnap.com/kb/fsck-command-linux--
Brian MasinickMay 11, 2022 at 4:38 pm #83036MemberRobin
::/dev/sda is your drive, not a partition containing a file system you could check. So you’ll get an error always.
Is this a persistent Live system? If so, you need to run the file system check on the rootfs file (need to start with disabled persistence for this, otherwise the file will get eventually corrupted by writing back from the copy in memory on shutdown), Then run
e2fsck -f live/boot-dev/antiX/rootfsor in case you have a second live boot medium at hand you’ll find it, once you plugged the delinquent and it was mounted, at:
e2fsck -f /media/demo/antiX-Live-usb/antiX/rootfs(make sure to use appropriate paths in the commands, according to what you have found on your system)
Reason for this: The persistent root file system is stored in the rootfs file. So it’s not enough simply to check /dev/sdx where its file is stored on.
In case you have not a persistency system, the file linuxfs might be corrupted, it contains the root file system without persistence (this is also the place where the contents of rootfs file go once you do a live remaster) But linuxfs is not a default file system, it is squashfs.
I don’t know a tool to perform a file system check on the contained root file system, but you can try whether it mounts properly when accessed being plugged when running on a second live system.sudo mkdir /media/demo/testmount sudo mount -o loop '/media/demo/antiX-Live-usb/antiX/linuxfs' /media/demo/testmount(make sure to use appropriate paths in the commands, according to what you have found on your system)
if this is mounted properly, its containing file system should be fine. You can’t write to it, since squashfs is a compressed and read-only file system. but you can see and check all its contents. If it doesn’t mount here, it is corrupted, and needs to get created anew. (Maybe there is a method to repair it anyway, but i don’t know it). Maybe squashfs-tools or squashfs-tools-ng provide something useful to repair a damaged squashfs root file system.
Windows is like a submarine. Open a window and serious problems will start.
May 11, 2022 at 5:45 pm #83040MemberModdIt
::Hi grisonix,
Been in the situation several times.
Did you do a snapshot and then write the resulting ISO to USB with the antiX tools ?.Quickest way out is to create a fresh USB live stick, as robin posted you will not be
able to read and correct any errors in the present compressed filestem of your live stick.May 11, 2022 at 6:41 pm #83046MemberGrisonix
::Hi Moddit,
Yes I made a ISO Snapshot then used the Live USB Maker to make a persistent drive. So if I run Live USB Maker again it will probably work? Should I try a different flash drive?
All I really want to do is to duplicate my current system so I can install it on a new computer with all the programs preinstalled and ready to go. And the same settings.
May 11, 2022 at 8:00 pm #83047MemberModdIt
::Hi Grisonix, if your usb stick is known ok just try again. First boot with the newly created stick in to your
known working computer.
Should you get same error again either the usb stick or the image is the problem, I would then try a different
usb stick first. I never had a failed snapshot up to now but it must be considered a possibility.After getting sticks with fake capacity I now use a tool called F3 on all purchases and at times on sticks which
give trouble. Fake sticks gave me bad filesystem errors.
https://fight-flash-fraud.readthedocs.io/en/latest/introduction.html- This reply was modified 11 months, 3 weeks ago by ModdIt.
-
AuthorPosts
- You must be logged in to reply to this topic.