Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
x86 system won't find valid root device at startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lynnzimmerman
n00b
n00b


Joined: 24 Jul 2021
Posts: 6

PostPosted: Sat Jul 24, 2021 7:22 am    Post subject: x86 system won't find valid root device at startup Reply with quote

Hi, I got an old laptop from 2008 Aspire 5100 with only 1GB RAM sharing on VRAM, so I decided to give gentoo a try and have encountered the same problem after my fourth kernel compile, at first I thought I missed the hdd drives on the kernel config and redo everything from scratch following the Handbook:X86, after checking various forums post on gentoo I considered the genkernel initramfs to be the issue since after the second and third kernel compiles the initramfs was made too fast didn't use the -clean option to make them but was used to recompile the kernel with some changes.

That's why I decided to use dracut to make the initramfs on my last attempt but got the same error but with dracut output: [Block device 803 is not a valid root device] but also got the same or similar error: dracut: FATAL: Don't know how to handle 'root=803'

Formatted the disk on 4 partitions using cfdisk and minimal CD, and formatted them with mkfs.ext4 command.
Code:

fdisk -l
Device     Boot    Start       End   Sectors  Size Id Type
/dev/sda1  *        2048   2519039   2516992  1.2G 83 Linux ext4 /boot
/dev/sda2        2519040   5036031   2516992  1.2G 83 Linux swap 
/dev/sda3        5036032  99407871  94371840   45G 83 Linux ext4 /
/dev/sda4       99407872 234441647 135033776 64.4G 83 Linux ext4 /home

Code:

BOOT_IMAGE=gentoo ro root=803 rootfstype=ext4
+ break
+ cat /proc/self/mountinfo
1 1 0:2 / / rw - rootfs none rw
18 1 0:17 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
19 1 0:18 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sysfs rw
20 1 0:5 / /dev rw,nosuid,noexec - devtmpfs devtmpfs rw,size=435616k,nr_inodes=108904,mode=755
21 20 0:19 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
22 20 0:20 / /dev/shm rw,nosuid,nodev,noexec - tmpfs tmpfs rw
23 1 0:21 / /run rw,nosuid,nodev,noexec - tmpfs tmpfs rw,mode=755
+ cat /proc/mounts
none / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,nosuid,noexec,size=435616k,nr_inodes=108904,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /run tmpfs rw,nosuid,nodev,noexec,mode=755 0 0
+ blkid
/dev/sda1: UUID="6a36e6d3-cc10-448c-a6ab-62abb2943ef5" BLOCK_SIZE="1024" TYPE="ext4" PARTUUID="6b4ca260-01"
/dev/sda2: UUID="ae74a1d4-1f0a-4e0a-b189-8c4811c9d07f" TYPE="swap" PARTUUID="6b4ca260-02"
/dev/sda3: UUID="d761048d-2864-4e56-82f4-8cb8d51fe4b1" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6b4ca260-03"
/dev/sda4: UUID="eb7c417c-d8bc-437a-ad59-589a459f249f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6b4ca260-04"
+ blkid -o udev
ID_FS_UUID=6a36e6d3-cc10-448c-a6ab-62abb2943ef5
ID_FS_UUID_ENC=6a36e6d3-cc10-448c-a6ab-62abb2943ef5
ID_FS_BLOCK_SIZE=1024
ID_FS_TYPE=ext4
ID_FS_PARTUUID=6b4ca260-01

ID_FS_UUID=ae74a1d4-1f0a-4e0a-b189-8c4811c9d07f
ID_FS_UUID_ENC=ae74a1d4-1f0a-4e0a-b189-8c4811c9d07f
ID_FS_TYPE=swap
ID_FS_PARTUUID=6b4ca260-02

ID_FS_UUID=d761048d-2864-4e56-82f4-8cb8d51fe4b1
ID_FS_UUID_ENC=d761048d-2864-4e56-82f4-8cb8d51fe4b1
ID_FS_BLOCK_SIZE=4096
ID_FS_TYPE=ext4
ID_FS_PARTUUID=6b4ca260-03

ID_FS_UUID=eb7c417c-d8bc-437a-ad59-589a459f249f
ID_FS_UUID_ENC=eb7c417c-d8bc-437a-ad59-589a459f249f
ID_FS_BLOCK_SIZE=4096
ID_FS_TYPE=ext4
ID_FS_PARTUUID=6b4ca260-04
+ ls -l '/dev/disk/by*'
ls: cannot access '/dev/disk/by*': No such file or directory
+ for _i in /etc/conf.d/*.conf
+ '[' -f '/etc/conf.d/*.conf' ']'
+ break
+ command -v lvm
+ command -v dmsetup
+ cat /proc/mdstat
Personalities :
unused devices: <none>
+ command -v ip
+ command -v journalctl
+ dmesg
[    0.000000] Linux version 5.10.52-gentoo (root@livecd) (gcc (Gentoo 10.3.0-r2 p3) 10.3.0, GNU ld (Gentoo 2.35.2 p1) 2.35.2) #1 SMP Fri Jul 23 14:13:04 PDT 2021
[    0.000000] x86/fpu: x87 FPU will use FXSAVE
[    0.000000] Notice: NX (Execute Disable) protection cannot be enabled: non-PAE kernel!
[    0.000000] SMBIOS 2.4 present.
[    0.000000] DMI: Acer             Aspire 5100     /Navarro, BIOS V3.13 08/22/2008
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] tsc: Detected 1795.466 MHz processor
[    0.001004] MTRR default type: uncachable
[    0.001006] MTRR fixed ranges enabled:
[    0.001008]   00000-9FFFF write-back
[    0.001010]   A0000-BFFFF uncachable
[    0.001011]   C0000-CEFFF write-protect
[    0.001013]   CF000-E3FFF uncachable
[    0.001015]   E4000-FFFFF write-protect
[    0.001016] MTRR variable ranges enabled:
[    0.001018]   0 base 0000000000 mask FFC0000000 write-back
[    0.001020]   1 base 0038000000 mask FFF8000000 uncachable
[    0.001022]   2 disabled
[    0.001023]   3 disabled
[    0.001024]   4 disabled
[    0.001025]   5 disabled
[    0.001026]   6 disabled
[    0.001027]   7 disabled
[    0.001279] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT 
[    0.001419] Warning only 883MB will be used.
[    0.005450] found SMP MP-table at [mem 0x000f7e40-0x000f7e4f]
[    0.005517] check: Scanning 1 areas for low memory corruption
[    0.022779] SB4X0 revision 0x83
[    0.022781] Ignoring ACPI timer override.
[    0.022783] If you got timer trouble try acpi_use_timer_override
[    0.022797] Detected use of extended apic ids on hypertransport bus
[    0.023391] Kernel command line: BOOT_IMAGE=gentoo ro root=803 rootfstype=ext4
[    0.023907] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.024073] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.024096] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.030917] NR_IRQS: 2304, nr_irqs: 440, preallocated irqs: 16
[    0.031330] random: get_random_bytes called from start_kernel+0x2cb/0x442 with crng_init=0
[    0.042033] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.042090] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.042453] LVT offset 0 assigned for vector 0xf9
[    0.042500] process: using AMD E400 aware idle routine
[    0.042551] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 4
[    0.042762] Last level dTLB entries: 4KB 512, 2MB 8, 4MB 4, 1GB 0
[    0.042809] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    0.042862] Spectre V2 : Mitigation: Full AMD retpoline
[    0.042906] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[    0.043105] Freeing SMP alternatives memory: 44K
[    0.043761] process: System has AMD C1E enabled
[    0.146383] process: Switch to broadcast mode on CPU0
[    0.146436] smpboot: CPU0: AMD Turion(tm) 64 X2 Mobile Technology TL-56 (family: 0xf, model: 0x48, stepping: 0x2)
[    0.304687] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.304745] acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[    0.304768] acpi PNP0A03:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-07] only partially covers this bridge
[    0.305845] PCI host bridge to bus 0000:00
[    0.305890] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.305940] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d1fff window]
[    0.305990] pci_bus 0000:00: root bus resource [mem 0x000d2000-0x000d3fff window]
[    0.306039] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d5fff window]
[    0.306088] pci_bus 0000:00: root bus resource [mem 0x000d6000-0x000d7fff window]
[    0.306138] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000d9fff window]
[    0.306188] pci_bus 0000:00: root bus resource [mem 0x000da000-0x000dbfff window]
[    0.306238] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000ddfff window]
[    0.306287] pci_bus 0000:00: root bus resource [mem 0x000de000-0x000dffff window]
[    0.306336] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e1fff window]
[    0.306385] pci_bus 0000:00: root bus resource [mem 0x000e2000-0x000e3fff window]
[    0.306435] pci_bus 0000:00: root bus resource [mem 0x40000000-0xdfffffff window]
[    0.306484] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xffffffff window]
[    0.306534] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.306577] pci_bus 0000:00: root bus resource [io  0x0d00-0xdfff window]
[    0.306622] pci_bus 0000:00: root bus resource [io  0xe030-0xffff window]
[    0.306667] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.308438] pci 0000:00:13.0: [1002:4374] type 00 class 0x0c0310
[    0.308503] pci 0000:00:13.0: reg 0x10: [mem 0xf8504000-0xf8504fff]
[    0.308771] pci 0000:00:13.1: [1002:4375] type 00 class 0x0c0310
[    0.308836] pci 0000:00:13.1: reg 0x10: [mem 0xf8505000-0xf8505fff]
[    0.309101] pci 0000:00:13.2: [1002:4373] type 00 class 0x0c0320
[    0.309165] pci 0000:00:13.2: reg 0x10: [mem 0xf8506000-0xf8506fff]
[    0.309311] pci 0000:00:13.2: supports D1 D2
[    0.309354] pci 0000:00:13.2: PME# supported from D0 D1 D2 D3hot
[    0.309559] pci 0000:00:14.0: [1002:4372] type 00 class 0x0c0500
[    0.309622] pci 0000:00:14.0: reg 0x10: [io  0x8410-0x841f]
[    0.309677] pci 0000:00:14.0: reg 0x14: [mem 0x00000000-0x000003ff]
[    0.309784] HPET not enabled in BIOS. You might try hpet=force boot option
[    0.309999] pci 0000:00:14.1: [1002:4376] type 00 class 0x010182
[    0.310063] pci 0000:00:14.1: reg 0x10: [io  0x01f0-0x01f7]
[    0.310118] pci 0000:00:14.1: reg 0x14: [io  0x03f4-0x03f7]
[    0.310172] pci 0000:00:14.1: reg 0x18: [io  0x0000-0x0007]
[    0.310225] pci 0000:00:14.1: reg 0x1c: [io  0x0000-0x0003]
[    0.310279] pci 0000:00:14.1: reg 0x20: [io  0x8420-0x842f]
[    0.310349] pci 0000:00:14.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
[    0.310393] pci 0000:00:14.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
[    0.310437] pci 0000:00:14.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
[    0.310480] pci 0000:00:14.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
[    0.310707] pci 0000:00:14.2: [1002:437b] type 00 class 0x040300
[    0.310781] pci 0000:00:14.2: reg 0x10: [mem 0xf8500000-0xf8503fff 64bit]
[    0.310930] pci 0000:00:14.2: PME# supported from D0 D3hot D3cold
[    0.311120] pci 0000:00:14.3: [1002:4377] type 00 class 0x060100
[    0.311388] pci 0000:00:14.4: [1002:4371] type 01 class 0x060401
[    0.316460] pci 0000:00:14.4: PCI bridge to [bus 06-08] (subtractive decode)
[    0.316511] pci 0000:00:14.4:   bridge window [io  0xa000-0xafff]
[    0.316557] pci 0000:00:14.4:   bridge window [mem 0xf8200000-0xf82fffff]
[    0.316606] pci 0000:00:14.4:   bridge window [mem 0x000a0000-0x000bffff window] (subtractive decode)
[    0.316656] pci 0000:00:14.4:   bridge window [mem 0x000d0000-0x000d1fff window] (subtractive decode)
[    0.316707] pci 0000:00:14.4:   bridge window [mem 0x000d2000-0x000d3fff window] (subtractive decode)
[    0.316760] pci 0000:00:14.4:   bridge window [mem 0x000d4000-0x000d5fff window] (subtractive decode)
[    0.316810] pci 0000:00:14.4:   bridge window [mem 0x000d6000-0x000d7fff window] (subtractive decode)
[    0.316861] pci 0000:00:14.4:   bridge window [mem 0x000d8000-0x000d9fff window] (subtractive decode)
[    0.317397] pci 0000:00:14.4:   bridge window [mem 0x000da000-0x000dbfff window] (subtractive decode)
[    0.317447] pci 0000:00:14.4:   bridge window [mem 0x000dc000-0x000ddfff window] (subtractive decode)
[    0.317497] pci 0000:00:14.4:   bridge window [mem 0x000de000-0x000dffff window] (subtractive decode)
[    0.317547] pci 0000:00:14.4:   bridge window [mem 0x000e0000-0x000e1fff window] (subtractive decode)
[    0.317598] pci 0000:00:14.4:   bridge window [mem 0x000e2000-0x000e3fff window] (subtractive decode)
[    0.317648] pci 0000:00:14.4:   bridge window [mem 0x40000000-0xdfffffff window] (subtractive decode)
[    0.317699] pci 0000:00:14.4:   bridge window [mem 0xf0000000-0xffffffff window] (subtractive decode)
[    0.317750] pci 0000:00:14.4:   bridge window [io  0x0000-0x0cf7 window] (subtractive decode)
[    0.317760] pci 0000:00:14.4:   bridge window [io  0x0d00-0xdfff window] (subtractive decode)
[    0.317810] pci 0000:00:14.4:   bridge window [io  0xe030-0xffff window] (subtractive decode)
[    0.357877] SCSI subsystem initialized
[    0.357930] libata version 3.00 loaded.
[    0.657260] VFS: Disk quotas dquot_6.6.0
[    0.657337] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.729212] pci 0000:00:14.4: bridge window [mem 0x04000000-0x07ffffff pref] to [bus 06-08] add_size 4000000 add_align 4000000
[    0.730902] pci 0000:00:14.4: PCI bridge to [bus 06-08]
[    0.730947] pci 0000:00:14.4:   bridge window [io  0xa000-0xafff]
[    0.730995] pci 0000:00:14.4:   bridge window [mem 0xf8200000-0xf82fffff]
[    0.731042] pci 0000:00:14.4:   bridge window [mem 0x40000000-0x47ffffff pref]
[    0.983081] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.983641] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    2.172240] sata_sil 0000:00:12.0: version 2.4
[    2.172276] sata_sil 0000:00:12.0: enabling device (0005 -> 0007)
[    2.174928] scsi host0: sata_sil
[    2.177271] scsi host1: sata_sil
[    2.179303] ata1: SATA max UDMA/100 mmio m512@0xf8507000 tf 0xf8507080 irq 22
[    2.181254] ata2: SATA max UDMA/100 mmio m512@0xf8507000 tf 0xf85070c0 irq 22
[    2.592838] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    2.937490] ata1.00: ATA-7: TOSHIBA MK1234GSX, AH001J, max UDMA/100
[    2.939367] ata1.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 0/32)
[    2.946195] ata1.00: configured for UDMA/100
[    2.948222] scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA MK1234GS 1J   PQ: 0 ANSI: 5
[    2.948587] scsi host2: pata_atiixp
[    2.950514] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/112 GiB)
[    2.952389] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    2.954301] sd 0:0:0:0: [sda] Write Protect is off
[    2.956409] scsi host3: pata_atiixp
[    2.958427] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.960551] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.960562] ata3: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x8420 irq 14
[    2.964846] ata4: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x8428 irq 15
[    3.004343]  sda: sda1 sda2 sda3 sda4
[    3.007142] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.162356] ata3.00: ATAPI: Slimtype DVD A  DS8A1P, CA11, max UDMA/33
[    3.273774] ata2: SATA link down (SStatus 0 SControl 310)
[    3.278236] scsi 2:0:0:0: CD-ROM            Slimtype DVD A  DS8A1P    CA11 PQ: 0 ANSI: 5
[    3.321788] sr 2:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[    3.323954] cdrom: Uniform CD-ROM driver Revision: 3.20
[    3.345082] sr 2:0:0:0: Attached scsi CD-ROM sr0
[    3.345270] sr 2:0:0:0: Attached scsi generic sg1 type 5
[    3.714381] piix4_smbus 0000:00:14.0: SMBus Host Controller at 0x8410, revision 0
[    3.721524] sdhci: Secure Digital Host Controller Interface driver
[    3.725048] sdhci: Copyright(c) Pierre Ossman
[    3.726943] sdhci-pci 0000:06:04.2: SDHCI controller found [1524:0550] (rev 1)
[    3.729218] mmc0: SDHCI controller on PCI [0000:06:04.2] using PIO
[    3.820658]   #0: HDA ATI SB at 0xf8500000 irq 16
[    3.823043] Freeing unused kernel image (initmem) memory: 668K
[    3.828895] Write protecting kernel text and read-only data: 16032k
[    3.830833] Run /init as init process
[    3.832718]   with arguments:
[    3.832719]     /init
[    3.832721]   with environment:
[    3.832722]     HOME=/
[    3.832723]     TERM=linux
[    3.832724]     BOOT_IMAGE=gentoo
[    3.848161] init (91) used greatest stack depth: 7076 bytes left
[    3.864606] findmnt (97) used greatest stack depth: 7060 bytes left
[    3.866589] mount (98) used greatest stack depth: 7028 bytes left
[    3.868668] findmnt (99) used greatest stack depth: 7004 bytes left
[    3.887341] readlink (112) used greatest stack depth: 6728 bytes left
[    4.013064] dracut: FATAL: Don't know how to handle 'root=803'
[    4.015064] dracut: Refusing to continue
[    4.039832] dracut Warning: Signal caught!
[    4.045802] usb 1-4: new high-speed USB device number 3 using ehci-pci
[    4.056497] dracut Warning: dracut: FATAL: Don't know how to handle 'root=803'
[    4.060847] dracut Warning: dracut: Refusing to continue

What I could understand about the code 803 checking on more posts is that is redirecting to the partition but not recognizing the filesystem so I tried adding at the lilo.conf:
append="rootfstype=ext4"
Then I read the following on another old post from around 2009
The ext4 filesystem requires that this feature be enabled in order to support filesystems that have the huge_file feature enabled. Otherwise, it will refuse to mount in the read-write mode any filesystems that use the huge_file feature, which is enabled by default by mke2fs.ext4

Returned once again to browse for a possible solution and found:

On Block layer Kernel menuconfig enable CONFIG_LBDAF but I couldn't find it on Linux/x86 5.10.52-gentoo the option was deprecated since 2019.
Quote:

On 32 bit systems ext4 requires you to choose
Code:
Support for large (2TB+) block devices and files
or at best, it will be read only. By default, ext4 supports files and drives > 2TB so yo must have this in your kernel. On 64bit installs, the option is hidden as no special code in needed.


My last attempt was to try the following from a comment on a post from 2009

Quote:
Since the problem is caused by mke2fs.ext4 that by default formats with the huge_file feature on, one can format a new partition giving a set of features that overrides the default and that does not include the huge_file one:

mke2fs -t ext4 -O has_journal,extents,flex_bg,uninit_bg,dir_nlink,extra_isize

Or, one could edit the /etc/mke2fs.conf file and remove the huge_file feature among the default ones, as I did on my Gentoo desktop. I don't know if one can change the features without reformatting and already formatted partition, though.

and ...
Quote:
For removing the huge_file option from the filesystem without destroying it you can use this command
tune2fs -O ^huge_file /dev/sda1
then run
fsck /dev/sda1
and it should mount without CONFIG_LBDAF in your kernel.

used
Code:
e2fsck -f /dev/sda3

I ran out of options and perhaps the main or real issue is another thing I missed along the way, the Minimal (admin-cd) kernel is running fine not sure what filesystem it uses, wanted to try a kernel manual config since I haven't done one since I used slackware with the 2.6 kernel.

I'm sorry If the post resulted confusing, If you have feedback about the way it should be posted for better understanding I appreciate it as any insights about the situation. Thanks.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21593

PostPosted: Sat Jul 24, 2021 3:57 pm    Post subject: Reply with quote

root=803 is very unusual, and most likely wrong. You probably want root=/dev/sda3 instead. The major/minor numbers for sda3 would be 8/3, but the root= line is normally given the dev path, not the device numbers. There are other, more intricate root= options that we might need to explore eventually, but for a single drive laptop, this should be fine.

I appreciate your dedication to researching this before asking for help, but I should warn that 11+ year old commentary about filesystem features is likely obsolete by now. Your tests were harmless, but you were likely testing for problems that have not applied to anyone for several years.
Back to top
View user's profile Send private message
lynnzimmerman
n00b
n00b


Joined: 24 Jul 2021
Posts: 6

PostPosted: Sat Jul 24, 2021 11:37 pm    Post subject: Reply with quote

Indeed after checking why lilo was using root=803 instead of /dev/sda3 checked more documentation about it, and learned that can be specified on append "root=UUID=63c65e13-8739-4ead-9591-05d47a70edbe" I guess normal /dev/sda3 could work as well.

I'm using lilo instead of GRUB2 since I currently use slackware distro and I'm more familiar with it, I haven't considered checking more of lilo since the append isn't necessary on slackware it reads directly from lilo.conf on root=/dev/sdax and before trying gentoo, slackware 14.2 x86 was installed on the same laptop. Thanks for your help Hu at least it booted the HDD and I'm able to continue testing gentoo. :D
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54211
Location: 56N 3W

PostPosted: Sun Jul 25, 2021 10:47 am    Post subject: Reply with quote

lynnzimmerman,

root=803 should work. I had occasion to use something similar recently, on kernel 5.12 but you really really don't want to know why :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1520
Location: South America

PostPosted: Sun Jul 25, 2021 3:12 pm    Post subject: Re: x86 system won't find valid root device at startup Reply with quote

The kernel does understand root=803:

init/do_mounts.c
Code:
/*
 *   Convert a name into device number.  We accept the following variants:
 *
 *   1) <hex_major><hex_minor> device number in hexadecimal represents itself
 *         no leading 0x, for example b302.
 * ...
 */

But the OP is booting with a initramfs, and it's dracut's /init script who can't deal well with that format.

lynnzimmerman wrote:
Code:
[    3.830833] Run /init as init process
...
[    4.013064] dracut: FATAL: Don't know how to handle 'root=803'
[    4.015064] dracut: Refusing to continue
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54211
Location: 56N 3W

PostPosted: Sun Jul 25, 2021 3:35 pm    Post subject: Reply with quote

GDH-gentoo,

Thank you, I missed that.
That's a dracut bug then :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lynnzimmerman
n00b
n00b


Joined: 24 Jul 2021
Posts: 6

PostPosted: Sun Jul 25, 2021 6:32 pm    Post subject: Reply with quote

Just to close and clarify this issue: When I first booted the first time I got a Kernel panic but the issue was I didn't used GRUB2 like the majority, that's why after checking what could it be I created the initramfs but got the error:

generated with: genkernel --install --kernel-config=/usr/src/linux/mykernel.config initramfs

Code:
>>Genkernel 4.2.3 (2021-07-25 18:11:45 UTC). Linux kernel 5.10.52-gentoo
>>Activating udev...
>>Determining root device (trying 803) ..........
!! Block device 803 is not valid root device....
!! Could not find the root block device in 803.
!!Please specify another value or:
!! - press Enter for the same
!! - type "shell" for a shell
!! - type "q" to skip....


Without the initramfs I got the kernel panic and since I didn't found the cause that's why I did everything about checking old posts that weren''t the real problem I just tried dracut as an alternative to create initramfs in order to boot.

/etc/lilo.conf

Code:
image=/boot/vmlinuz-5.10.52-gentoo
  label=gentoo            # Name we give to this section
  read-only               # Start with a read-only root. Do not alter!
 # root=/dev/sda3          # Location of the root filesystem
  append="root=UUID=63c65e13-8739-4ead-9591-05d47a70edbe rootfstype=ext4"
  initrd=/boot/initramfs-5.10.52-gentoo.img


The append was needed on the lilo.conf not sure why since Slackware can boot from root=/dev/sdax without the append.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1520
Location: South America

PostPosted: Sun Jul 25, 2021 6:51 pm    Post subject: Reply with quote

lynnzimmerman wrote:
generated with: genkernel --install --kernel-config=/usr/src/linux/mykernel.config initramfs

Code:
>>Genkernel 4.2.3 (2021-07-25 18:11:45 UTC). Linux kernel 5.10.52-gentoo
...
>>Determining root device (trying 803) ..........
!! Block device 803 is not valid root device....
!! Could not find the root block device in 803.
!!Please specify another value or:

And it looks like Genkernel, just like dracut, can't deal with the root=<hex_major><hex_minor> format either...

EDIT to add:
lynnzimmerman wrote:
/etc/lilo.conf

Code:
image=/boot/vmlinuz-5.10.52-gentoo
  label=gentoo            # Name we give to this section
  read-only               # Start with a read-only root. Do not alter!
 # root=/dev/sda3          # Location of the root filesystem
  append="root=UUID=63c65e13-8739-4ead-9591-05d47a70edbe rootfstype=ext4"
  initrd=/boot/initramfs-5.10.52-gentoo.img

I don't use (and, personally, would never use) LILO, but according to the lilo.conf man page, either:
Code:
image=/boot/vmlinuz-5.10.52-gentoo
  label=gentoo            # Name we give to this section
  read-only               # Start with a read-only root. Do not alter!
  root=/dev/sda3          # Location of the root filesystem
  initrd=/boot/initramfs-5.10.52-gentoo.img
or, for a recent enough version of LILO:
Code:
image=/boot/vmlinuz-5.10.52-gentoo
  label=gentoo            # Name we give to this section
  read-only               # Start with a read-only root. Do not alter!
  root="UUID=63c65e13-8739-4ead-9591-05d47a70edbe" # UUID of the root filesystem, double quotes are needed here
  initrd=/boot/initramfs-5.10.52-gentoo.img

should work with a Genkernel-generated or dracut-generated initramfs as long as the corresponding disk is consistently detected as /dev/sda. Also, my kernels have always autodetected ext4 filesystems without me having to specify rootfstype=ext4.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4124
Location: Bavaria

PostPosted: Sun Jul 25, 2021 8:06 pm    Post subject: Reply with quote

GDH-gentoo wrote:
Code:
[...]
  root="UUID=63c65e13-8739-4ead-9591-05d47a70edbe" # UUID of the root filesystem, double quotes are needed here
[...]

I dont know LILO, so maybe I am wrong.

As I learned from you, reading the "/usr/src/linux/init/do_mounts.c" says: The kernel is able to use a "root=PARTUUID=...", but NOT "root=UUID=..."

If LILO would do a rewrite then it would be possible (but I dont believe so).
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Jul 25, 2021 8:11 pm    Post subject: Reply with quote

Last time I tried Lilo it wouldn't accept PARTUUID as a valid kernel command line option. Not sure how much development Lilo gets nowadays, perhaps it is fixed by now.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1520
Location: South America

PostPosted: Sun Jul 25, 2021 9:42 pm    Post subject: Reply with quote

pietinger wrote:
As I learned from you, reading the "/usr/src/linux/init/do_mounts.c" says: The kernel is able to use a "root=PARTUUID=...", but NOT "root=UUID=..."
Correct, but "root=UUID=..." works with an initramfs generated by dracut (and possibly Genkernel as well), which the OP is using. Its /init script parses the kernel command line, and, in particular, the root= parameter.

I also looked at the code of LILO 24.2, and:
  • It does accept root="UUID=<UUID of the root filesystem>", root="LABEL=<label of the root filesystem>", which it appends verbatim to the kernel command line (so you need an initramfs), but, as Jaglover said, does not accept PARTUUID.
  • It looks like it translates root=/dev/sd<letter> to the root=<hex_major><hex_minor> format (and the initramfs' /init script would then choke).
So it looks like
Code:
image=/boot/vmlinuz-5.10.52-gentoo
  label=gentoo            # Name we give to this section
  read-only               # Start with a read-only root. Do not alter!
  root="UUID=63c65e13-8739-4ead-9591-05d47a70edbe" # UUID of the root filesystem, double quotes are needed here
  initrd=/boot/initramfs-5.10.52-gentoo.img
would work with Genkernel and dracut, and
Code:
image=/boot/vmlinuz-5.10.52-gentoo
  label=gentoo            # Name we give to this section
  read-only               # Start with a read-only root. Do not alter!
  root=/dev/sda3          # Location of the root filesystem
  initrd=/boot/initramfs-5.10.52-gentoo.img
can work, but only without an initramfs (or maybe a custom initramfs; I don't know what Slackware does).
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4124
Location: Bavaria

PostPosted: Mon Jul 26, 2021 8:22 am    Post subject: Reply with quote

GDH-gentoo wrote:
Correct, but "root=UUID=..." works with an initramfs generated by dracut (and possibly Genkernel as well), which the OP is using. Its /init script parses the kernel command line, and, in particular, the root= parameter. [...]

Thank you very much (I again learned something new from you).

Many greetings,
Peter
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum