Automatic changes to fstab prevent booting: "You are in emergency mode."

Message
Author
mungy
Posts: 5
Joined: Wed Jul 27, 2022 5:37 am

Automatic changes to fstab prevent booting: "You are in emergency mode."

#1 Post by mungy »

I was confronted with this boot failure when I brought my laptop home this afternoon. After a lot of faffing around I realised the following:
- when I had last shutdown, there was a Sandisk 1TB Extreme Portable SSD connected to the USB-C port
- MX21 had automatically added an entry in /etc/fstab:
UUID=****-**** /media/Extreme_SSD exfat defaults,uid=1001,gid=100,dmask=0002,fmask=0113,utf8,x-gvfs-show 0 2
(my asterisks)
- I had disconnected the SSD while shutdown, it wasn't present during bootup

The cure was to boot from a Live USB, and comment out the offending line in /etc/fstab.

(I verified this behaviour by uncommenting the fstab entry, connecting the SSD, shutting down, disconnecting the SSD, rebooting: Back to 'emergency mode'.
Reconnected SSD, rebooted, successful!)

This raises 3 questions:
1. Why would a missing non-critical disk result in 'emergency mode' rather than a successful boot?
2. Why would a mount listed in /etc/fstab but not connected result in 'emergency mode' rather than a successful boot?
3. Did MX Linux decide to update /etc/fstab itself, or was it just my bad luck that the SSD was connected when I previously ran Disk Manager?

Thanks,
Mungy.


Code: Select all

System:    Kernel: 5.10.0-15-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-15-amd64 
           root=UUID=<filter> ro quiet gfxsave splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.1_x64 Wildflower April 9  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: HP product: HP Pavilion Laptop 14-ce0xxx v: Type1ProductConfigId 
           serial: <filter> Chassis: type: 10 serial: <filter> 
           Mobo: HP model: 84B9 v: 02.15 serial: <filter> UEFI: Insyde v: F.23 date: 12/25/2020 
Battery:   ID-1: BAT0 charge: 34.9 Wh (100.0%) condition: 34.9/34.9 Wh (100.0%) volts: 12.7 
           min: 11.6 model: HP Primary type: Li-ion serial: N/A status: Full 
CPU:       Info: Quad Core model: Intel Core i5-8250U bits: 64 type: MT MCP arch: Kaby Lake 
           note: check family: 6 model-id: 8E (142) stepping: A (10) microcode: EC cache: 
           L2: 6 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 28800 
           Speed: 800 MHz min/max: 400/3400 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
           5: 800 6: 800 7: 800 8: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel UHD Graphics 620 vendor: Hewlett-Packard driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300 
           Device-2: Cheng Uei Precision Industry (Foxlink) HP Wide Vision HD Integrated Webcam 
           type: USB driver: uvcvideo bus-ID: 1-3:3 chip-ID: 05c8:03bc class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: 
           loaded: modesetting unloaded: fbdev,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 2346x2160 s-dpi: 96 s-size: 621x572mm (24.4x22.5") 
           s-diag: 844mm (33.2") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 158 size: 309x173mm (12.2x6.8") 
           diag: 354mm (13.9") 
           Monitor-2: HDMI-1 res: 1920x1080 hz: 60 dpi: 30 size: 1600x900mm (63.0x35.4") 
           diag: 1836mm (72.3") 
           OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.5 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 
           chip-ID: 8086:9d71 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-15-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Wireless 7265 driver: iwlwifi v: kernel modules: wl port: 4040 
           bus-ID: 02:00.0 chip-ID: 8086:095a class-ID: 0280 
           IF: wlan0 state: down mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           vendor: Hewlett-Packard driver: r8169 v: kernel port: 3000 bus-ID: 03:00.0 
           chip-ID: 10ec:8168 class-ID: 0200 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           IF-ID-1: br0 state: up speed: 1000 Mbps duplex: unknown mac: <filter> 
           IF-ID-2: virbr0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
           bus-ID: 1-7:5 chip-ID: 8087:0a2a class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2 
           sub-v: 1100 hci-v: 4.2 rev: 1100 
           Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff 
           link-mode: slave accept service-classes: rendering, capturing, object transfer, audio 
Drives:    Local Storage: total: 1.04 TiB used: 427.32 GiB (40.1%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: SanDisk model: SD9SN8W-128G-1006 size: 119.24 GiB 
           block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: SSD 
           serial: <filter> rev: 4006 scheme: GPT 
           ID-2: /dev/sdb maj-min: 8:16 vendor: Toshiba model: MQ04ABF100 size: 931.51 GiB 
           block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 
           serial: <filter> rev: 1C scheme: GPT 
           ID-3: /dev/sdc maj-min: 8:32 type: USB model: Multiple Card Reader size: 14.82 GiB 
           block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.00 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Partition: ID-1: / raw-size: 101.51 GiB size: 99.35 GiB (97.88%) used: 40.6 GiB (40.9%) fs: ext4 
           dev: /dev/sda6 maj-min: 8:6 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 93 MiB (36.3%) 
           fs: vfat dev: /dev/sda1 maj-min: 8:1 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 15.81 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/sda3 maj-min: 8:3 
Sensors:   System Temperatures: cpu: 50.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 2111 lib: 1058 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mx.debian.nz/mx/repo/ bullseye main non-free
           Active apt repos in: /etc/apt/sources.list.d/teamviewer.list 
           1: deb https://linux.teamviewer.com/deb stable main
Info:      Processes: 302 Uptime: 21m wakeups: 1 Memory: 15.52 GiB used: 5.31 GiB (34.2%) 
           Init: systemd v: 247 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Shell: Bash v: 5.1.4 running-in: quick-system-info-mx 
           inxi: 3.3.06 
Boot Mode: UEFI

User avatar
dolphin_oracle
Developer
Posts: 22372
Joined: Sun Dec 16, 2007 12:17 pm

Re: Automatic changes to fstab prevent booting: "You are in emergency mode."

#2 Post by dolphin_oracle »

mungy wrote:This raises 3 questions:
1. Why would a missing non-critical disk result in 'emergency mode' rather than a successful boot?
2. Why would a mount listed in /etc/fstab but not connected result in 'emergency mode' rather than a successful boot?
3. Did MX Linux decide to update /etc/fstab itself, or was it just my bad luck that the SSD was connected when I previously ran Disk Manager?
1 & 2. it would be ignored under sysVinit, you wouldn't even get a warning. systemd has a check where if there is an entry in fstab then it will generate a unit file for the device. if the device is not actually present, systemd decides to throw up the warning. You should have been shown the missing devices in the text output and been offered the option to enter maintenance mode (root console prompt) where the issue could be addressed. after editing the fstab file, issuing an "exit" from maintenance mode would have allowed boot to continue. Editing from the live-usb and rebooting accomplished the same thing.

3. disk manager only adds an entry for a device if you check the box, it does not do so automatically. an already mounted device will show as italicized but no check mark if you start disk-manager after having mounted a disk. If you just need to mount a device, you can double click an entry to mount/unmount.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Automatic changes to fstab prevent booting: "You are in emergency mode."

#3 Post by fehlix »

mungy wrote: Wed Jul 27, 2022 6:13 am 3. Did MX Linux decide to update /etc/fstab itself, or was it just my bad luck that the SSD was connected when I
disk-manger is a tool to adjust/change fstab. So better don't change anything with fstab using disk-manger if you don't know what you are doing. Note: Adding removable media to fstab can cause problems in case media is not available at boot.

mungy
Posts: 5
Joined: Wed Jul 27, 2022 5:37 am

Re: Automatic changes to fstab prevent booting: "You are in emergency mode."

#4 Post by mungy »

OK, understand now. The documentation's statement "a handy way to manage disks without writing directly to the file (/etc/fstab)" is highly ambiguous, and I took it the WRONG way.
Also found out the hard way how fstab can screw up the booting process!

Post Reply

Return to “Software / Configuration”