View previous topic :: View next topic |
Author |
Message |
qsmodo Tux's lil' helper
Joined: 20 Jun 2021 Posts: 82
|
Posted: Sat May 21, 2022 6:20 pm Post subject: [Solved] USB boot without initramfs results in kernel panic |
|
|
I'm trying to boot Gentoo (no initramfs) from a USB connected hard disk, since my internal hard disk is for work only.
The issue is that, although I can make GRUB boot the right kernel, I always end up with a kernel panic, which says
Quote: | Please append a correct boot option, here are the available partitions: sda1 sda2 sda3 |
Those sda are for the internal hard disk. Interestingly, some lines above that quoted message I can see that the USB drive was detected (usb 1-7: new USB device found, idVendor=...), but at no point there I see an explicit mention to sdb.
I already tried:
1. to run "linux (hd0,gpt1)/vmlinuz-gentoo-... root=/dev/sdb5" and "boot"
2. the previous one with root=PARTUUID={partuuid of /dev/sdb5} (as suggested by https://forums.gentoo.org/viewtopic-t-1045010-start-0.html)
3. to run "configfile (hd0,gpt1)/grub/grub.cfg" from GRUB. The usual GRUB screen does loads and I select "Gentoo" (if I select Ubuntu instead, which lives in sdb2 and has initramfs, it boots fine, so I guess lack of initramfs is really biting me here.)
4. adding "rootdelay=10" as a kernel parameter.
but in all instances I end up with the same kernel panic.
Is there something else I can try? Am I possibly missing a kernel module? The suggestion in item 2 seems to have worked to its original reporter in the link provided.
Last edited by qsmodo on Sat May 21, 2022 10:35 pm; edited 1 time in total |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 926 Location: Richmond Hill, Canada
|
Posted: Sat May 21, 2022 6:45 pm Post subject: |
|
|
Usually USB device will not ready before kernel want to use rootfs, so you can try kernel command line argument rootwait or rootdelay=X
Code: | rootwait [KNL] Wait (indefinitely) for root device to show up.
Useful for devices that are detected asynchronously
(e.g. USB and MMC devices). |
Code: | rootdelay= [KNL] Delay (in seconds) to pause before attempting to
mount the root filesystem |
Above is assume you have right kernel modules builtin. You at least will need scsi, sd and usb with storage support. |
|
Back to top |
|
|
qsmodo Tux's lil' helper
Joined: 20 Jun 2021 Posts: 82
|
Posted: Sat May 21, 2022 6:55 pm Post subject: |
|
|
Tried rootdelay already. But I see from .config:
CONFIG_USB_STORAGE=m
So I guess I'll have to recompile that with Y, thanks |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54233 Location: 56N 3W
|
Posted: Sat May 21, 2022 6:57 pm Post subject: |
|
|
qsmodo,
... and the USB support. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
qsmodo Tux's lil' helper
Joined: 20 Jun 2021 Posts: 82
|
Posted: Sat May 21, 2022 7:01 pm Post subject: |
|
|
Since the Udev message already seems to beckon the USB device, I guess I should already have USB support builtin?
I'm asking because `grep USB .config | grep '^[^#].*[^y]$'| wc -l` gives me 320 and I'm uncertain what exactly to look for xD |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54233 Location: 56N 3W
|
Posted: Sat May 21, 2022 7:36 pm Post subject: |
|
|
qsmodo,
The root hub drivers you want to use.
Code: | grep -i hcd /usr/src/linux/.config |
CONFIG_USB_XHCI_HCD=y for USB3
# CONFIG_USB_EHCI_HCD is not set for USB2
one of for USB1
# CONFIG_USB_OHCI_HCD is not set
# CONFIG_USB_UHCI_HCD is not set
USB_EHCI_HCD also has some transaction translation options so it can drive USB 1 peripherals.
That requires hardware support too, but the kernel options are harmless if your USB2 does not have that hardware.
More recently, the PCI backends for those USB root hub drivers have bees split out.
e.g.
CONFIG_USB_PCI=y for all
and CONFIG_USB_XHCI_PCI=y for USB3 on the PCI bus.
There are similar options for USB2 and USB1 but they are hidden in my kernel as I have the root hub options off. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
qsmodo Tux's lil' helper
Joined: 20 Jun 2021 Posts: 82
|
Posted: Sat May 21, 2022 10:35 pm Post subject: |
|
|
Thanks Neddy, I had problems compiling (maybe I didn't mount all the things correctly prior to the chroot) and so simply installed the binary kernel. I will never underestimate Initramfs again! |
|
Back to top |
|
|
|