LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2013, 05:28 PM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,154

Rep: Reputation: Disabled
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.

Last edited by Didier Spaier; 10-05-2013 at 05:31 PM.
 
Old 10-06-2013, 01:16 AM   #2
philanc
Member
 
Registered: Jan 2011
Posts: 308

Rep: Reputation: 275Reputation: 275Reputation: 275
Quote:
Originally Posted by Didier Spaier View Post
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?

Last edited by philanc; 10-06-2013 at 01:28 AM.
 
1 members found this post helpful.
Old 10-06-2013, 04:04 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,154

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by philanc View Post
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.
 
1 members found this post helpful.
Old 10-06-2013, 06:06 AM   #4
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
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.

Last edited by Darth Vader; 10-06-2013 at 06:11 AM.
 
2 members found this post helpful.
Old 10-06-2013, 08:28 AM   #5
bormant
Member
 
Registered: Jan 2008
Posts: 426

Rep: Reputation: 240Reputation: 240Reputation: 240
Didier Spaier,
try to add ums_realtek and usb_storage to KMODULES.

Last edited by bormant; 10-06-2013 at 08:42 AM.
 
2 members found this post helpful.
Old 10-06-2013, 12:54 PM   #6
philanc
Member
 
Registered: Jan 2011
Posts: 308

Rep: Reputation: 275Reputation: 275Reputation: 275
Quote:
Originally Posted by Darth Vader View Post
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...
 
2 members found this post helpful.
Old 10-06-2013, 02:52 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,154

Original Poster
Rep: Reputation: Disabled
Cool 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.

Last edited by Didier Spaier; 10-06-2013 at 02:57 PM.
 
2 members found this post helpful.
Old 12-12-2013, 02:44 PM   #8
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 906

Rep: Reputation: 154Reputation: 154
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
 
1 members found this post helpful.
Old 04-05-2014, 09:21 AM   #9
dumdadum
Member
 
Registered: May 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 14.1 64 bits
Posts: 238

Rep: Reputation: 15
Question any info about a filename I can edit manually?

Quote:
Originally Posted by Darth Vader View Post
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-pcihci-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
 
Old 04-05-2014, 12:01 PM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,154

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Didier Spaier; 04-05-2014 at 12:05 PM.
 
1 members found this post helpful.
Old 04-05-2014, 06:21 PM   #11
dumdadum
Member
 
Registered: May 2009
Location: Montreal, Quebec, Canada
Distribution: Slackware 14.1 64 bits
Posts: 238

Rep: Reputation: 15
Thumbs up

Quote:
Originally Posted by Didier Spaier View Post
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
 
Old 10-22-2014, 04:55 AM   #12
chicken76
Member
 
Registered: Mar 2009
Distribution: Slackware
Posts: 121

Rep: Reputation: 2
Thumbs up

Quote:
Originally Posted by Didier Spaier View Post
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.
 
Old 10-22-2014, 10:59 AM   #13
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
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

Last edited by perbh; 10-22-2014 at 11:01 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
booting from usb hard disk moulavi Linux - Hardware 2 12-15-2007 01:52 AM
booting from usb hard disk without bios support moulavi Linux - Software 2 12-14-2007 09:44 PM
Booting Linux from external USB hard disk code_monkey Linux - Hardware 5 03-30-2006 01:54 PM
problem while booting my new distrib from usb flash and hard disk mundri Linux From Scratch 1 06-07-2004 08:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration