6

Context: My PC don't boot anymore after a power hard cut.

  • I can boot a LIVE DVD and mount all file systems.
  • fsck is clean on my boot partition (ext2) and on my system/root partition (btrfs)
  • smartctl -t short is clean on both too
  • I have a legacy BIOS PC (no EUFI)

I have reinstalled grub2 from a live DVD and chroot, nothing changed. Here is the error messages provided by the system after the grub splash screen and operating system selection:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.1.0-18-amd64 #1 Debian 6.1.76-1
Hardware name: Dell Inc. Studio XPS 8100/0G3HR7, BIOS A05 07/08/2010
Call Trace:
<TASK>
dump_stack_lvl+0x44/0x5c
panic+0x118/0x2ed
mount_block_root+0x1d3/0x1e6
prepare_namespace+0x136/0x165
kernel_init_freeable+0x25c/0x286
? ret_init+0xd0/0xd0
kernel_init+0x16/0x130
ret_from_fork+0x22/0x30
</TASK>
Kernel Offset: 0x15c00000 from 0xffffffff81000000 (relocatinrange: 0xffffffff80000000-0xffffffffbfffffff)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

I don't know how to interpret this error message. The root file system is a btrfs one. Shall I understand that the initrd is corrupted and it cannot load the btrfs module required to mount the root FS? What can I do please?

Additional information (after having booted on my old kernel):

lsblk -e 7 -f
NAME   FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda                                           
├─sda1                                        
├─sda2                                        
├─sda3                           77.8G    97% /home
└─sda4                                        
sdb                                           
├─sdb1                                        
├─sdb2                                        
├─sdb3                            115G    45% /
└─sdb4                          634.2M    29% /boot
sdc                                           
sdd                                           
sde                                           
sdf                                           
sdg                                           
└─sdg1                                        
sr0        

_

grep -oP 'root=UUID=[\w-]+' /boot/grub/grub.cfg  | sort -u
root=UUID=172d2f2b-c176-472b-b20a-0a382e24ae72

This is the right partition for /: /dev/sdb3

cat /etc/fstab 
UUID=abee2947-6832-4332-915e-abc122a347cf /boot          ext2        defaults,noatime 0 2
UUID=172d2f2b-c176-472b-b20a-0a382e24ae72 /              btrfs   subvol=@,defaults,noatime,space_cache,autodefrag,discard,compress=lzo 0 1
UUID=7994d68f-8067-4742-b104-45ace8e53c0e /home          btrfs   subvol=/__racine/home,defaults,noatime,nodiratime,space_cache,autodefrag,compress=lzo 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
UUID=d3529b3b-4338-4371-8f9b-f725142c5eb2   none        swap    defaults    0   0
/dev/sr0        /media/cdrom0   udf,iso9660 user,auto     0       0

_

ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Apr 28 17:32 121C-191D -> ../../sdg1
lrwxrwxrwx 1 root root 10 Apr 28 17:32 172d2f2b-c176-472b-b20a-0a382e24ae72 -> ../../sdb3
lrwxrwxrwx 1 root root  9 Apr 28 17:32 2020-09-26-10-57-36-00 -> ../../sr0
lrwxrwxrwx 1 root root 10 Apr 28 17:32 26a14333-8209-4ae1-bc51-f691d7533e68 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr 28 17:32 7994d68f-8067-4742-b104-45ace8e53c0e -> ../../sda3
lrwxrwxrwx 1 root root 10 Apr 28 17:32 abee2947-6832-4332-915e-abc122a347cf -> ../../sdb4
lrwxrwxrwx 1 root root 10 Apr 28 17:32 d3529b3b-4338-4371-8f9b-f725142c5eb2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Apr 28 17:32 f530e8e6-9888-4938-8336-f3e4e40565cf -> ../../sdb2

_

ps aux | grep udev
root       548  0.0  0.0  23876  6028 ?        Ss   17:17   0:00 /lib/systemd/systemd-udevd

_

grep error /var/log/syslog 

2024-04-28T12:32:15.736464+02:00 PC-Alain kernel: [   53.465073] nouveau 0000:01:00.0: Direct firmware load for nouveau/nve7_fuc084 failed with error -2
2024-04-28T12:32:15.736468+02:00 PC-Alain kernel: [   53.465097] nouveau 0000:01:00.0: Direct firmware load for nouveau/nve7_fuc084d failed with error -2
2024-04-28T12:32:41.304635+02:00 PC-Alain kernel: [   79.156892] nouveau 0000:01:00.0: Direct firmware load for nouveau/nve7_fuc084 failed with error -2
2024-04-28T12:32:41.304641+02:00 PC-Alain kernel: [   79.156938] nouveau 0000:01:00.0: Direct firmware load for nouveau/nve7_fuc084d failed with error -2
2024-04-28T12:36:54.316202+02:00 PC-Alain wireplumber[6397]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
2024-04-28T12:36:54.322518+02:00 PC-Alain pipewire-pulse[6398]: mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied
2024-04-28T12:36:54.329509+02:00 PC-Alain pipewire[6394]: mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied
2024-04-28T12:36:54.351221+02:00 PC-Alain wireplumber[6397]: RTKit error: org.freedesktop.DBus.Error.AccessDenied
2024-04-28T12:36:54.358502+02:00 PC-Alain pipewire-pulse[6398]: mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied
2024-04-28T12:36:54.365165+02:00 PC-Alain pipewire[6394]: mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied
2024-04-28T15:51:21.496580+02:00 PC-Alain kernel: [11999.307831] nouveau 0000:01:00.0: Direct firmware load for nouveau/nve7_fuc084 failed with error -2
2024-04-28T15:51:21.496584+02:00 PC-Alain kernel: [11999.307850] nouveau 0000:01:00.0: Direct firmware load for nouveau/nve7_fuc084d failed with error -2
2024-04-28T16:51:28.020418+02:00 PC-Alain kernel: [15605.817830] traps: tracker-extract[92460] trap int3 ip:7f280dd9f7d7 sp:7ffcf0086ab0 error:0 in libglib-2.0.so.0.7400.6[7f280dd61000+8d000]
2024-04-28T16:51:28.268449+02:00 PC-Alain kernel: [15606.063394] traps: tracker-extract[92474] trap int3 ip:7f1f488897d7 sp:7ffd77407190 error:0 in libglib-2.0.so.0.7400.6[7f1f4884b000+8d000]
2024-04-28T16:51:47.444575+02:00 PC-Alain dockerd[2536]: time="2024-04-28T16:51:47.444485465+02:00" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby

_

Here is an extract of my /boot/grub/grub.cfg for the main menu entry:

        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt4'
        search --no-floppy --fs-uuid --set=root abee2947-6832-4332-915e-abc122a347cf
        echo    'Loading Linux 6.1.0-18-amd64 ...'
        linux   /vmlinuz-6.1.0-18-amd64 root=/dev/sdb3 ro rootflags=subvol=@  quiet splash
}


    load_video
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    set root='hd1,gpt4'
    search --no-floppy --fs-uuid --set=root abee2947-6832-4332-915e-abc122a347cf
    echo    'Loading Linux 6.1.0-18-amd64 ...'
    linux   /vmlinuz-6.1.0-18-amd64 root=/dev/sdb3 ro rootflags=subvol=@  quiet splash

}

4
  • Bootloader is likely not installed correctly and it isn't finding your root disk. It shouldn't say "unknown" for disk. Likely you can live edit grub config and change root to /dev/sda1 or whatever partition it really is and get it to boot, then run update-grub if it boots successfully. Possibly the UUID on the partition is damaged, which might require more work to fix.
    – user10489
    Commented Apr 28 at 11:40
  • If you boot a live disk and run lsblk -e 7 -f and add the output to your question it might help debug this. Should match grep -oP 'root=UUID=[\w-]+' /boot/grub/grub.cfg | sort -u (but you have to find grub.conf on your mounted hard drive and fix the path)
    – user10489
    Commented Apr 28 at 11:45
  • @user10489 thanks, information requested added
    – lalebarde
    Commented Apr 28 at 15:36
  • Should have asked for /etc/fstab too. If you add that and there is new relevant info there, I'll update the answer.
    – user10489
    Commented Apr 28 at 16:18

1 Answer 1

3

Historically, the root filesystem was found at boot by device name. Unfortunately, the nature of linux's dynamic device system means the device name could be different at each boot.

To remedy this, the root filesystem is located by something else, such as LABEL or UUID which is an attribute of the disk and partition that doesn't change.

Unfortunately, your filesystems' UUIDs seem to have been blanked or are not being detected correctly.

There are three options here:

  • Add LABELs (volume names)(you can also look in /dev/disk/by-label and see if any already have labels)

  • Assign new random UUIDs to the filesystems. For example assuming ext4 filesystem for root,

    tune2fs -U random /dev/sdb3

  • Reassign the original UUID to each filesystem

    tune2fs -U 172d2f2b-c176-472b-b20a-0a382e24ae72

You will need to do this with each of the mounted disks missing UUIDs. Note that UUIDs must be unique in a system, so make sure you either use random or pick the (unique) original one for each disk out of fstab.

Unless you reassign the original UUIDs, you will also need to:

  1. Update /etc/fstab with the new labels or uuids
  2. Rebuild the grub config file with update-grub (and maybe verify the correct root= line is generated with the grep command above).
9
  • I have added /etc/fstab and the list of disks by uuid. All looks correct. I have double checked with parted.
    – lalebarde
    Commented Apr 28 at 16:33
  • hmm, something else might be wrong.
    – user10489
    Commented Apr 28 at 16:36
  • It looks like lsblk gets the UUIDs from udevd. Can you check if it is running and if there are errors from it in /var/log/syslog ? Or maybe it was damaged and needs reinstalled? A bad udev rule could cause issues. Fixing any of this probably will require rebuilding initrd too.
    – user10489
    Commented Apr 28 at 16:47
  • udevd runs. I have added syslog errors and kept only two lines of errors with libglib-2.0.so because there are many. I have also docker errors and possibly some other errors comes from it, but I think it is off topic.
    – lalebarde
    Commented Apr 28 at 17:37
  • My partitions UUID looks right, isn't it?
    – lalebarde
    Commented Apr 28 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .