LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-07-2014, 12:18 PM   #1
bgeer
LQ Newbie
 
Registered: Jun 2012
Location: Albuquerque, New Mexico, USA
Distribution: Slackware
Posts: 20

Rep: Reputation: Disabled
boot from usb hard drive


After lots of searching I haven't yet found anything that works.

I installed Slackware64 14.1 on a usb hard drive & I fixed up lilo.conf & fstab & ran "lilo". The usb hard drive is the only drive on the computer, booting starts ok loading the compressed kernel, decompressing it, & commences until it halts on a panic because it cannot find "/dev/sda1".

Well, "sda1" will be the usb hard drive after the USB subsystem starts up. I have tried "rootdelay=20" & "rootwait" but it appears to completely pause the boot process; in the case of rootdelay, the usb subsystem didn't get started during the delay. I also tried "usb_storage.delay_use" which of course didn't help.

So, how do I get the root drive mount to happen after the usb subsystem startup is complete?

None of the many posts I've found addresses this particular issue.

FWIW: kernel is huge.s 3.10.17, lilo 24.0, the modules supporting my usb hard drive are in initrd.gz.
 
Old 11-07-2014, 12:21 PM   #2
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Do you have usb storage support built in kernel?
 
Old 11-07-2014, 01:51 PM   #3
bgeer
LQ Newbie
 
Registered: Jun 2012
Location: Albuquerque, New Mexico, USA
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Teufel View Post
Do you have usb storage support built in kernel?
No, it's a module.
 
Old 11-07-2014, 01:57 PM   #4
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
You have to have kernel built with these options:
Code:
CONFIG_USB_STORAGE=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_XHCI_HCD=y
regardless your initrd modules.

Last edited by Teufel; 11-07-2014 at 02:01 PM.
 
Old 11-07-2014, 02:14 PM   #5
bgeer
LQ Newbie
 
Registered: Jun 2012
Location: Albuquerque, New Mexico, USA
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Teufel View Post
You have to have kernel built with these options:
Code:
CONFIG_USB_STORAGE=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_XHCI_HCD=y
regardless your initrd modules.
Argh! Was hoping there was an alternative to compiling the kernel. Compiling the kernel implies "slackpkg upgrade-all" is out of the question, at least without carefully attending to the menu.

Thank you very much for responding...Bob
 
Old 11-07-2014, 02:21 PM   #6
MDKDIO
Member
 
Registered: Mar 2004
Location: Sweden
Distribution: Slackware 14.2 & Current
Posts: 123

Rep: Reputation: 18
Quote:
Originally Posted by bgeer View Post
Argh! Was hoping there was an alternative to compiling the kernel. Compiling the kernel implies "slackpkg upgrade-all" is out of the question, at least without carefully attending to the menu.

Thank you very much for responding...Bob
If I read you correct, you mean slackpkg upgrade-all will update your kernel as well?
By default, the kernel(s) are blacklisted (see /etc/slackpkg/blacklist around line 13 for more info).
 
Old 11-07-2014, 02:24 PM   #7
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
I had the same issue when I installed Gentoo at USB HDD, I can't boot and had to rebuild kernel with above options. Not aware of what "slackpkg upgrade-all" means, assuming something terrible
In Gentoo rebuilding kernel is ordinary operation. make + make modules_install.
 
Old 11-07-2014, 02:57 PM   #8
bgeer
LQ Newbie
 
Registered: Jun 2012
Location: Albuquerque, New Mexico, USA
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: Disabled
"slackpkg upgrade-all" is an online upgrade process to my favorite Slackware mirror. I would either have to recompile the kernel each time it's upgraded, or make sure not to let it upgrade.

In my long ago past, I always customized & compiled my kernel; in this day of a) giga ram & b) b'zillions of kernel options I don't bother. Plus, the target cpu is a low-poweer Atom & how long will that compile take?

This computer will be used for my firewall. Unfortunately, it is single-ethernet & the usb to ethernet adaptor I have is much newer than the "old" kernels that the "packaged" firewalls include. E.g. Devil-linux uses the 3.2 kernel & the adaptor module hasn't been backported that far. So I figured a minimal-install of Slackware (3.10.18 kernel) with a bit of "hardening" will do just fine.

Oh, & I have an old laptop 2.5" drive in a usb case I wanted to use. Oh well...:-)

Cheers...
 
Old 11-07-2014, 07:26 PM   #9
bgeer
LQ Newbie
 
Registered: Jun 2012
Location: Albuquerque, New Mexico, USA
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MDKDIO View Post
If I read you correct, you mean slackpkg upgrade-all will update your kernel as well?
By default, the kernel(s) are blacklisted (see /etc/slackpkg/blacklist around line 13 for more info).
Kernel blacklist lines are commented in my copy, meaning they aren't blacklisted.

I don't use nvidia or amd/ati binary drivers so update kernels haven't been a problem. Kernel upgrade automatically queues a request to re-run lilo.

Appreciate the comment, tho. Cheers
 
Old 11-08-2014, 02:28 AM   #10
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 14.2, Slackwarearm-current
Posts: 1,008

Rep: Reputation: 130Reputation: 130
I once had a problem with booting a (possibly non-Slackware) system from a USB disk, for similar reasons. I recall that I didn't have success with "rootdelay". However, using an initrd created with the "-w [secs]" option solved the problem. I don't remember compiling any module into the kernel and I don't see why this should be necessary -- if they're in the initrd, kernel will be able to use them anyway.
 
Old 11-08-2014, 03:04 AM   #11
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 724

Rep: Reputation: 92
I've never had to compile the kernel to enable booting from a USB hard drive.

If I remember correctly, until recently I used to use the root-delay option to the kernel when booting. This seemed to stop working around about 14.1.

I always do a full install of Slackware.

In 14.1 to get booting from a usb hard drive I created a initrd using these instructions -

Code:
cd /boot
mkinitrd -c -k 3.10.17-smp -m usb-storage:ehci-pci:ehci-platform -u -w 10 -f ext4 -r /dev/sdb1
The reason why I used /dev/sdb1 is that there is an internal hard drive in most machines I boot from. Obviously, I've got a problem if there isn't a hard drive in the machine I'm starting.

Alex
 
Old 11-19-2014, 11:02 AM   #12
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 724

Rep: Reputation: 92
I've now encountered a problem with booting USB hard drives on a UEFI machine running in legacy mode.I've started a new thread here ->

http://www.linuxquestions.org/questi...de-4175525891/
 
Old 11-22-2014, 04:45 AM   #13
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 724

Rep: Reputation: 92
bgeer did you ever solve this problem?

Quote:
After lots of searching I haven't yet found anything that works.

I installed Slackware64 14.1 on a usb hard drive & I fixed up lilo.conf & fstab & ran "lilo". The usb hard drive is the only drive on the computer, booting starts ok loading the compressed kernel, decompressing it, & commences until it halts on a panic because it cannot find "/dev/sda1".

Well, "sda1" will be the usb hard drive after the USB subsystem starts up. I have tried "rootdelay=20" & "rootwait" but it appears to completely pause the boot process; in the case of rootdelay, the usb subsystem didn't get started during the delay. I also tried "usb_storage.delay_use" which of course didn't help.

So, how do I get the root drive mount to happen after the usb subsystem startup is complete?

None of the many posts I've found addresses this particular issue.

FWIW: kernel is huge.s 3.10.17, lilo 24.0, the modules supporting my usb hard drive are in initrd.gz.
 
  


Reply

Tags
boot, usb disk


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
duel-boot using a usb external hard drive without usb boot option Cabtech Linux - Newbie 4 04-22-2012 05:15 PM
USB hard drive as an HDD boot drive jonp Linux - Newbie 5 03-07-2010 01:28 PM
USB hard drive does not mount at boot augu2000 Linux - General 5 07-16-2007 08:44 AM
can't boot from usb: how to boot linux from ext. hard drive? bernhardtjeff Linux - Newbie 5 07-07-2006 01:42 AM
Boot from USB hard drive - is this possible? Eggberto Linux - Hardware 1 08-30-2005 04:22 PM

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

All times are GMT -5. The time now is 09:31 PM.

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