Over the years, I have been using ubuntu and arch based distros, playing a lot with my physicals drives (multiple computers). I update the /etc/fstab file as requires but sometime I may forget one entry. I notice that on boot with Manjaro, we are thrown to the command line is a drive is not found even with the proper syntax. In Ubuntu based distros, the boot will simply resume after a while if it doesn’t find the drive. Ubuntu is more forgiving and Manjaro, IMO should do the something. On the subject, once the boot is thrown into the command line, is there a way to resume it in Manjaro ?
I’ll be honest with you, I really do not see much appeal in actually EDITING the /etc/fstab
file.
This is the reason why… one slip and you’re history.
You can use Gnome-disks
to set this file via GUI, it’s much safer.
Without knowingi what entry you missed, it’s a tough question to answer… Mine looks like this:
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=F99D-EAF9 /boot/efi vfat umask=0077 0 2
UUID=a0074377-fd97-4125-9151-1b09cc8e32cb / ext4 defaults,noatime 0 1
/swapfile swap swap defaults,noatime 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
LABEL=T4 /mnt/T4 auto nosuid,nodev,nofail,x-gvfs-show 0 0
LABEL=T3 /mnt/T3 auto nosuid,nodev,nofail,x-gvfs-show 0 0
LABEL=W2 /mnt/W2 auto nosuid,nodev,nofail,x-gvfs-show 0 0
I could remove everything except the top two lines, and regenerate it using Gnome-disks.
You need to come back with the contents of yours… maybe it’s time to grab a Ventoy powered USB disk with an ISO and get booting
Safety
For years now, I have heard words like ‘snapshot’ and ‘backup’ echoing around forums around the world.
My solution to this would actually be
- Boot USB to desktop
- Mount drives
- Find my snapshot/backup of the fstab file from yesterday and copy it back.
If a device is listed in /etc/fstab
, but not present, this will result in an error. The nofail
option will overcome that.
But this doesn’t seem to be what you’re describing.
The pass option (the second of two numbers at the end of an fstab
entry) sets the order of filesystem checks at boot time ( for /
it should be 1
, and other partitions 2
; and 0
disables checking.
But, this is only relevant if the entry actually exists.
Could you post the content of your /etc/fstab
file and indicate which entry you neglected to include that manifests this result?
And, can you post any actual errors presented that might help others understand the issue better?
Aside:- If you’re feeling particularly adventurous, you might consider an alternative to using fstab
:
Usually you’ll be able to login as root, correct fstab and exit
at which point the boot will continue. However if you’ve messed up the /
entry or something like that then you may need a live usb in that case.
When you add an entry to fstab you can test it without rebooting by using sudo mount -a
I don’t see the appeal of not manually editing it.
That’s because you know almost everything
I am very familiar with the fstab file and it works very well. To more precise, the dump “to command line” will appear if the UUID is now wrong or the drive is not there anymore. No, I don’t want to edit the fstab after that at the command line. Soundofthunder, what is this “nofail” in the options ? Will that make the system skip the partition/drive if it cannot mount it ?
The question still stand, how come Ubuntu is bright enough to just ignore it after a delay and keep going. This make no sense to abort a boot because of that, of course not being the boot partition. Why can’t this be implement in Manjaro ?
P.S since it is a multi Linux boot PC, I revert to edit the fstab from another distro present on the system to correct it on the non-bootable distro.
You asked a question, I answered it.
Personally I’ve never had a problem with fixing it during the boot, it’s certainly more convenient than booting another distro or a live usb.
Use whichever method you prefer.
Yes, after a timeout if memory serves.
All specified devices within
/etc/fstab
will be automatically mounted on startup and when the-a
flag is used with mount(8) unless thenoauto
option is specified. Devices that are listed and not present will result in an error unless thenofail
option is used.
https://wiki.archlinux.org/title/Fstab
I don’t know, as I don’t use Ubuntu.
Is nofail
used, or something else?
Yes, but with some caveats;
If you search the following page for nofail you will discover some of them (there are only a few references). The option is most useful for external devices, as would seem obvious enough.
- fstab (Arch Wiki)
If nofail
was a default in Ubuntu, that might explain it. I only used Ubuntu myself for two weeks before abandoning it for something more secure and performant, so I can’t verify that is the case. I do know that the defaults tend to vary across distributions, for many reasons; policy or opinionated defaults, for example.
In a multiboot scenario, other factors might be involved; possible foreign (NTFS
, if you boot Windows) filesystem damage, for example, that might also prevent booting under some circumstances.
Thanks. Since it is a testing computer, I will check the “nofail” argument by putting a false UUID and let you know. I am testing KDE Manjaro and Kubuntu 24.10 with Wayland on the same computer to see where they both stand. Manjaro is more advanced at this point. Ubuntu is easier to “operate” from my long experience with it.
- I notice that too, if a defective ntfs partition is loaded in the fstab, it will hang the system until it is repaired in Windows.
Indeed.
If you find the time (and have the patience) I wrote an article a while ago that should give a deeper understanding as to why that is.
Regards.
So after testing, the “nofail” flag works perfectly in the line option. There is no need to set the timer as the bypass is quite fast. <10 seconds
So it is probably include in the “default” parameters in Ubuntu like you suspect
If interested this the message given in case of a problem in the fstab
You are in emergency mode. After login, type "journalctl -xb" to view system log, "systemctl reboot" to reboot or "exit" to continue bootup.
Give the admin password for maintenance or <ctrl D> to continue.
...Typing exit, return
Reloading system manager configuration. Starting default target ....
After a while, it just return to the first message.
So that was fun. Good catch SoundofThunder. Thanks every one.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.