LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   trouble booting -current from an USB hard disk (kernel 3.10.14) (https://www.linuxquestions.org/questions/slackware-14/trouble-booting-current-from-an-usb-hard-disk-kernel-3-10-14-a-4175479742/)

Didier Spaier 10-05-2013 05:28 PM

trouble booting -current from an USB hard disk (kernel 3.10.14)
 
I installed Slackware-current dated Thu Oct 3 02:07:13 UTC 2013 on an external USB hard disk.

But it fails to boot. / being an ext4 partition I made an initrd with modules ext4 and usb-storage included, and edited /boot/initrd-tree/wait-for-boot to include 30 instead if 1. When booting it waits 30 seconds but still can't mount / (designated by LABEL=slack in lilo.conf and fstab). After the message from init: "ERROR: No /sbin/init found on rootdev (or not mounted). [...]", cat /proc/partitions doesn't show USB hard disk's partitions, only those on /dev/sda (laptop's internal hard disk).

I built another kernel with ext4 and usb-storage built-in to avoid using an initrd, with "rootedelay=20" in lilo.conf. The kernel says it will wait 20 seconds but after this delay I get a kernel panic. During that time I can unplug and plug in again the USB HDD and I'm sure that it had enough time to settle though.

Any clue appreciated.

philanc 10-06-2013 01:16 AM

Quote:

Originally Posted by Didier Spaier (Post 5040675)
I installed Slackware-current dated Thu Oct 3 02:07:13 UTC 2013 on an external USB hard disk.

But it fails to boot. / being an ext4 partition I made an initrd with modules ext4 and usb-storage included, (...)

I built another kernel with ext4 and usb-storage built-in to avoid using an initrd (...)

Maybe this is a stupid suggestion, but did you include the ehci_hcd (or uhci_hcd or ohci_hcd or xhci_hcd, according to your PC USB ports) usb drivers either in your initrd or built-in in your kernel?

Didier Spaier 10-06-2013 04:04 AM

Quote:

Originally Posted by philanc (Post 5040803)
Maybe this is a stupid suggestion, but did you include the ehci_hcd (or uhci_hcd or ohci_hcd or xhci_hcd, according to your PC USB ports) usb drivers either in your initrd or built-in in your kernel?

Thanks for the suggestion, Philanc. I added ehci_hcd module to the initrd (seems to be the good one), but to no avail, so I'm still in the dark.

Darth Vader 10-06-2013 06:06 AM

I have an 500GB USB Harddisk, which I use as Universal Boot From Every Lame Computer Linux, who in reality, is an standard Slackware (today) current, who use a standard generic smp kernel and an initrd generated with:

Code:

KVERSION=3.10.14-smp

KMODULES="usb-storage:xhci-hcd:ehci-hcd:ehci-pci:ohci-hcd:usbhid:mbcache:jbd2:ext4"

ROOTDEV="UUID=2d059afe-0181-46c3-9470-52aef7e3d3f5"
ROOTFS="ext4"

mkinitrd -c -k ${KVERSION} -r $ROOTDEV -f $ROOTFS -m $KMODULES -u -M -w 5 -o /boot/initrd-${KVERSION}.gz

Like you see, I use the UUID variant.

BUT, the interesting thing is there: the real USB driver now, on the current kernels, is not ehci-hcd but the ehci-pci.

PS. No, I do not have to use the i486 kernel in no computer. And yes, I consider the i486 kernel as historical remnant, like any human have an tail remnant.

bormant 10-06-2013 08:28 AM

Didier Spaier,
try to add ums_realtek and usb_storage to KMODULES.

philanc 10-06-2013 12:54 PM

Quote:

Originally Posted by Darth Vader (Post 5040870)
BUT, the interesting thing is there: the real USB driver now, on the current kernels, is not ehci-hcd but the ehci-pci

Yes, it looks like ehci_hcd, which used to have no dependencies (at least until 3.2.x) now depends not only on ehci_pci but also on ehci_platform (you may check with modules.dep in your kernel modules directory).

Yes, full steam ahead towards more complexity... :(

Didier Spaier 10-06-2013 02:52 PM

Success
 
Long story short:
Code:

su
mount -L slack /mnt #slack is the label of /dev/sdb2
mount --bind /proc /mnt/proc
chroot /mnt
cd /boot # probably not necessary
mkinitrd -c -k 3.10.14 -m usb-storage:ehci-pci:ehci-platform:ext4 -u -w 30 -f ext4 -r LABEL=slack
lilo -t -v
lilo

Some tweaking is still needed, but it works (I'm posting from it :-)

Thanks to philanc, bormant and Darth Vader.

Hope this helps some in a similar situation.

aikempshall 12-12-2013 02:44 PM

Didier

Certainly helped me in Slackware 14.1!

On Slackware 13.1, 13.37 and probably a few before that I just added rootdelay=10 to the kernel. This allowed me to boot a external USB hard drive.

I missed out on 14.0 and jumped straight into 14.1 and the rootdelay trick failed to work even though it was still working for 13.37. I then realized that perhaps now I needed an initrd. I played around with building an initrd with modules ehci-hcd, ohci-hcd, uhci-hcd and usb-storage and got all sorts of bizarre problems whilst booting.

Then I fell upon this thread with your solution, worked a treat for me.

So thanks again and to philanc, bormant and Darth Vader.

Alex

dumdadum 04-05-2014 09:21 AM

any info about a filename I can edit manually?
 
Quote:

Originally Posted by Darth Vader (Post 5040870)
I have an 500GB USB Harddisk, which I use as Universal Boot From Every Lame Computer Linux, who in reality, is an standard Slackware (today) current, who use a standard generic smp kernel and an initrd generated with:

Code:

KVERSION=3.10.14-smp

KMODULES="usb-storage:xhci-hcd:ehci-hcd:ehci-pci:ohci-hcd:usbhid:mbcache:jbd2:ext4"

ROOTDEV="UUID=2d059afe-0181-46c3-9470-52aef7e3d3f5"
ROOTFS="ext4"

mkinitrd -c -k ${KVERSION} -r $ROOTDEV -f $ROOTFS -m $KMODULES -u -M -w 5 -o /boot/initrd-${KVERSION}.gz

Like you see, I use the UUID variant.

BUT, the interesting thing is there: the real USB driver now, on the current kernels, is not ehci-hcd but the ehci-pci.

PS. No, I do not have to use the i486 kernel in no computer. And yes, I consider the i486 kernel as historical remnant, like any human have an tail remnant.

Just a little question. Is there a way I can add ehci-pci or at least see what I actually have without ehci-pci and then add it? In other words, is the following line in a particular file that someone can point me to? :
KMODULES="usb-storage:xhci-hcd:ehci-hcd:ehci-pci:ohci-hcd:usbhid:mbcache:jbd2:ext4"

??

Thanks for the help everyone, it helps me as well, gave you points for the info as a vote...

Cheers,
Dumdadum

Didier Spaier 04-05-2014 12:01 PM

If you ran mkinitrd then the modules you included are by default in /boot/initrd-tree/lib/modules.

The line
Code:

KMODULES="usb-storage:xhci-hcd:ehci-hcd:ehci-pci:ohci-hcd:usbhid:mbcache:jbd2:ext4"
is not included in a file, it was just typed in a shell as the others you quoted. To know more type
Code:

man mkinitrd
Oh, and I don't need points, thanks.

dumdadum 04-05-2014 06:21 PM

Quote:

Originally Posted by Didier Spaier (Post 5147171)
If you ran mkinitrd then the modules you included are by default in /boot/initrd-tree/lib/modules.

The line
Code:

KMODULES="usb-storage:xhci-hcd:ehci-hcd:ehci-pci:ohci-hcd:usbhid:mbcache:jbd2:ext4"
is not included in a file, it was just typed in a shell as the others you quoted. To know more type
Code:

man mkinitrd
Oh, and I don't need points, thanks.

Thanks Mr. Didier, I appreciate your reply. (=

Cheers,
Dumdadum

chicken76 10-22-2014 04:55 AM

Quote:

Originally Posted by Didier Spaier (Post 5041064)
Long story short:
Code:

su
mount -L slack /mnt #slack is the label of /dev/sdb2
mount --bind /proc /mnt/proc
chroot /mnt
cd /boot # probably not necessary
mkinitrd -c -k 3.10.14 -m usb-storage:ehci-pci:ehci-platform:ext4 -u -w 30 -f ext4 -r LABEL=slack
lilo -t -v
lilo

Some tweaking is still needed, but it works (I'm posting from it :-)

Thanks to philanc, bormant and Darth Vader.

Hope this helps some in a similar situation.

Thanks. Creating an initrd solved it. Strange though, as I remember in previous versions the huge.s kernel didn't need one.

perbh 10-22-2014 10:59 AM

Re initrd - I believe we have been through this many times and it still crops up.
1) If you boot an external/usb-disk using label= or uuid=, you _do need_ an initrd
2) When you first have an initrd, you can easily use the generic kernel. The huge kernel will still work fine, but it will come up with some error messages (about module allready loaded) which may be disconcerting to some
3) If you know beforehand which device your external/usb-disk will be, you should not need an initrd - however, unless you boot from the same machine with exactly the same hardware each time, this will probably not be the case (especially these days when parallel-running scripts are getting more popular)

So, _my_ preference (and I stress the word _my_ - other people may have other experiences) would be:
a) Make an initrd and boot using label= or uuid=
b) Edit /etc/fstab to also use label= or uuid=

Just my 2c-worth


All times are GMT -5. The time now is 11:52 AM.