System trying to boot from drive which doesn't have root partition

Hello Everyone.


As the title suggests, the OS is trying to boot up from HDD, which is not the root partition, rather the root is installed on SSD as /sdb1.


I waited for the process to complete, but it didn't happened. Hence, I used Magic SysReq key 2-3 times in order to start the boot sequence from /sdb1.

Also, in fstab :

It is same as that shown by lsblk -fs

┬─[deweshk@HomeDesktop:~]─[08:02:24 PM IST]
╰─>$ lsblk -fs
NAME  FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda1  ext4   1.0         46994f1c-f1a8-4687-a5af-6ebe09e30798   90.6G     0% /mnt/sda1
└─sda                                                                        
sda2  ext4   1.0         77d462a0-1576-4eed-b18d-bbafea04c24a   86.7G    23% /mnt/sda2
└─sda                                                                        
sda3                                                                         
└─sda                                                                        
sda5  ext4   1.0         9c09fd9d-f36b-42b6-9ca5-bfeb6219d0e5  114.1G     0% /mnt/sda5
└─sda                                                                        
sda6  ext4   1.0         23c7fa5a-28fb-49e3-854a-638bfec7844c  114.1G     0% /mnt/sda6
└─sda                                                                        
sdb1  ext4   1.0         a4f552a4-21c8-4da3-932a-f72d289bfde6   50.6G    49% /
└─sdb                                                                        
sdc                                                                          
sdd                                                                          
zram0                                                                        [SWAP]
zram1                                                          254.7M     0% /run/compressed-mount-point
┬─[deweshk@HomeDesktop:~]─[08:02:27 PM IST]
╰─>$

<br>


┬─[deweshk@HomeDesktop:~]─[08:03:39 PM IST]
╰─>$ sudo blkid
[sudo] password for deweshk: 
/dev/sdb1: UUID="a4f552a4-21c8-4da3-932a-f72d289bfde6" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="1692c8cb-01"
/dev/zram1: LABEL="zram1" UUID="d875abdb-a846-41ce-8c8c-cd807804808d" BLOCK_SIZE="4096" TYPE="ext2"
/dev/sda2: UUID="77d462a0-1576-4eed-b18d-bbafea04c24a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="8279e22d-02"
/dev/sda5: UUID="9c09fd9d-f36b-42b6-9ca5-bfeb6219d0e5" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="8279e22d-05"
/dev/sda1: UUID="46994f1c-f1a8-4687-a5af-6ebe09e30798" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="8279e22d-01"
/dev/sda6: UUID="23c7fa5a-28fb-49e3-854a-638bfec7844c" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="8279e22d-06"
/dev/zram0: LABEL="zram0" UUID="6f64cf2a-f6eb-4952-bd06-3b39f8f05ef8" TYPE="swap"
┬─[deweshk@HomeDesktop:~]─[08:03:44 PM IST]
╰─>$

All these values are same when compared.

Though, this issue appears with very less frequency.
The doubt in my mind is how boot process starts without the presence of bootloader in sda1.


I am not able to perform journalctl -xb as this issue do not boots the system up and when I get the correct boot order, everything starts from recovering journal. I am also not able to reproduce again on my will on the system.
How should I proceed ?

check status smart on your sdd sdb

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.18.13-arch1-1] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     OSC SSD 120GB
Serial Number:    OSC21020100000000223
Firmware Version: T0910A0
User Capacity:    120,034,123,776 bytes [120 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        Not in smartctl database 7.3/5319
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sun Jul 24 19:44:54 2022 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(  120) seconds.
Offline data collection
capabilities: 			 (0x11) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Suspend Offline collection upon new
					command.
					No Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					No Selective Self-test supported.
SMART capabilities:            (0x0002)	Does not save SMART data before
					entering power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  10) minutes.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0
  5 Reallocated_Sector_Ct   0x0032   100   100   050    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       675
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       1623
160 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       0
161 Unknown_Attribute       0x0033   100   100   050    Pre-fail  Always       -       100
163 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       9
164 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       37628
165 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       194
166 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       6
167 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       76
168 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       7000
169 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       99
175 Program_Fail_Count_Chip 0x0032   100   100   050    Old_age   Always       -       0
176 Erase_Fail_Count_Chip   0x0032   100   100   050    Old_age   Always       -       0
177 Wear_Leveling_Count     0x0032   100   100   050    Old_age   Always       -       0
178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   050    Old_age   Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   050    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   050    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       186
194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       45
195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       2437152
196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   050    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0032   100   100   050    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       0
232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       100
241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       78737
242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       167608
245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       45379

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       533         -

Selective Self-tests/Logging not supported

Also ,

is there any errors in log before on boot before ( when failed )

No, I had used computer in afternoon, and now at night I again started the system now, which resulted in this.

can you return

inxi -Fza 
┬─[deweshk@HomeDesktop:~]─[08:21:55 PM IST]
╰─>$ inxi -Fza
System:
  Kernel: 5.18.13-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-linux
    root=UUID=a4f552a4-21c8-4da3-932a-f72d289bfde6 rw quiet loglevel=3
    nowatchdog nvme_load=YES
  Desktop: KDE Plasma v: 5.25.3 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1
    dm: SDDM Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Desktop System: LENOVO product: Lenovo H320 10044 v: Lenovo
    serial: <superuser required>
  Mobo: LENOVO model: N/A v: INVALID serial: <superuser required>
    BIOS: LENOVO v: D6KT11A date: 05/20/2010
CPU:
  Info: model: Intel Core i3 540 bits: 64 type: MT MCP arch: Westmere
    gen: core 1 built: 2010-11 process: Intel 32nm family: 6
    model-id: 0x25 (37) stepping: 2 microcode: 0x11
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 1463 min/max: 1200/3067 scaling: driver: acpi-cpufreq
    governor: schedutil cores: 1: 1463 2: 1463 3: 1463 4: 1463 bogomips: 24481
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode;
    SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  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 status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Core Processor Integrated Graphics vendor: Lenovo
    driver: i915 v: kernel arch: Gen5.75 process: Intel 45nm built: 2010 ports:
    active: VGA-1 empty: DP-1,HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:0042
    class-ID: 0300
  Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 1-1.4:4 chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 compositor: kwin_x11 driver: X:
    loaded: intel unloaded: modesetting alternate: fbdev,vesa gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1360x768 s-dpi: 96 s-size: 359x203mm (14.13x7.99")
    s-diag: 412mm (16.24")
  Monitor-1: VGA-1 mapped: VGA1 model: Lenovo D185wA serial: <filter>
    built: 2010 res: 1360x768 hz: 60 dpi: 84 gamma: 1.2
    size: 410x230mm (16.14x9.06") diag: 475mm (18.7") ratio: 16:9 modes:
    max: 1366x768 min: 720x400
  OpenGL: renderer: Mesa Intel HD Graphics (ILK) v: 2.1 Mesa 22.1.3
    direct render: Yes
Audio:
  Device-1: Intel 5 Series/3400 Series High Definition Audio vendor: Lenovo
    driver: snd_hda_intel bus-ID: 1-1.4:4 v: kernel chip-ID: 046d:0825
    bus-ID: 00:1b.0 chip-ID: 8086:3b56 class-ID: 0102 serial: <filter>
    class-ID: 0403
  Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
  Sound Server-1: ALSA v: k5.18.13-arch1-1 running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Intel 82578DC Gigabit Network vendor: Lenovo driver: e1000e
    v: kernel port: e880 bus-ID: 00:19.0 chip-ID: 8086:10f0 class-ID: 0200
  IF: enp0s25 state: down mac: <filter>
  IF-ID-1: enp0s29u1u2 state: unknown speed: -1 duplex: half mac: <filter>
Bluetooth:
  Device-1: Samsung Galaxy series misc. (tethering mode) type: USB
    driver: rndis_host v: kernel bus-ID: 2-1.2:5 chip-ID: 04e8:6863
    class-ID: 0a00 serial: <filter>
  Report: This feature requires one of these tools: hciconfig/bt-adapter
Drives:
  Local Storage: total: 577.55 GiB used: 80.68 GiB (14.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD5000AZRX-00L4HB0 size: 465.76 GiB block-size: physical: 4096 B
    logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 1A01 scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: OSC model: SSD 120GB
    size: 111.79 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
    type: SSD serial: <filter> rev: 0A0 scheme: MBR
Partition:
  ID-1: / raw-size: 111.79 GiB size: 109.47 GiB (97.93%)
    used: 53.32 GiB (48.7%) fs: ext4 dev: /dev/sdb1 maj-min: 8:17
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 906.3 MiB used: 124 MiB (13.7%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 174 Uptime: 37m wakeups: 0 Memory: 2.66 GiB
  used: 1.86 GiB (70.0%) Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 Packages: pacman: 1342 lib: 344
  Shell: fish v: 3.4.1 running-in: konsole inxi: 3.3.19
┬─[deweshk@HomeDesktop:~]─[08:22:03 PM IST]
╰─>$

Add nofail to the options for /mnt/sdx entries in /etc/fstab

Right now, if any of those devices fails to mount, your system will not boot.

Like this ?

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=a4f552a4-21c8-4da3-932a-f72d289bfde6 /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
UUID=46994f1c-f1a8-4687-a5af-6ebe09e30798 /mnt/sda1 nofail      ext4    defaults,noatime 0 2 
UUID=77d462a0-1576-4eed-b18d-bbafea04c24a /mnt/sda2       ext4    defaults,noatime 0 2
UUID=9c09fd9d-f36b-42b6-9ca5-bfeb6219d0e5 /mnt/sda5       ext4    defaults,noatime 0 2
UUID=23c7fa5a-28fb-49e3-854a-638bfec7844c /mnt/sda6       ext4    defaults,noatime 0 2

The system won’t boot up if the process went to booting from /sda1. I need to perform Kresimir’s tip magic SysReq key many times in order to get correct boot drive, though chances of happening from this method is very low.
I am only left with force poweroff in order to get the correct boot drive.

can you check theses points :

  • sda & sdb are only in ATA2 not 3 ( only use 3Gb/s not 6 Gb/s )
  • any trouble or high temp inside desktop ( or cooler work less than usual )
  • recheck options flags on boot disks
  • what is your boot system ( grub ? systemd-boot ? other ?)

No.

default,noatime,nofail 0 2

1 Like

UUID=46994f1c-f1a8-4687-a5af-6ebe09e30798 /mnt/sda1 ext4 defaults,noatime,nofail 0 2

1 Like

for sda


ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)

for sdb
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)

Don’t know how to check this. System temperature can’t be monitored, I think…

It is grub

How to find this ?

The doubt is that I cannot confirm whether your suggestion had fixed issue or not, as this do not happen frequently, rather it happens once in 60-70 boots, or more.

for temp , add lm_sensors , powertop

sudo pacman -S lm_sensors 
sudo sensors-detect ( in uppercase option used by Default )
sensors

sudo pacman -S powertop
sudo powertop ( tab to navigate in each frame)

for flags options see

sudo gparted 
or
sudo parted -l
1 Like

lm_sensors is installed already, but :

[deweshk@HomeDesktop:~]─[08:53:37 PM IST]
╰─>$ sudo sensors-detect
# sensors-detect version 3.6.0+git
# System: LENOVO Lenovo H320 10044 [Lenovo]
# Kernel: 5.18.13-arch1-1 x86_64
# Processor: Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz (6/37/2)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Hygon Family 18h thermal sensors...                         No
AMD Family 19h thermal sensors...                           No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No



flag :
┬─[deweshk@HomeDesktop:~]─[08:56:24 PM IST]
╰─>$ sudo parted -l
[sudo] password for deweshk: 
Model: ATA WDC WD5000AZRX-0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start  End    Size   Type      File system  Flags
 1      106MB  105GB  105GB  primary   ext4         boot
 2      105GB  237GB  132GB  primary   ext4
 3      237GB  500GB  263GB  extended               lba
 5      237GB  368GB  132GB  logical   ext4
 6      368GB  500GB  132GB  logical   ext4


Model: ATA OSC SSD 120GB (scsi)
Disk /dev/sdb: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  120GB  120GB  primary  ext4         boot


Model: Unknown (unknown)
Disk /dev/zram1: 285MB
Sector size (logical/physical): 4096B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system  Flags
 1      0.00B  285MB  285MB  ext2


Model: Unknown (unknown)
Disk /dev/zram0: 950MB
Sector size (logical/physical): 4096B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system     Flags
 1      0.00B  950MB  950MB  linux-swap(v1)

is there any boot and os system on sda1 ?

No,

There is only lost+found folder.

maybe remove the flag boot on sda1

I am not aware of this. Can you provide the guidance ?