View previous topic :: View next topic |
Author |
Message |
DingbatCA Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/144526775240fe020a2c2e8.jpg)
Joined: 07 Jul 2004 Posts: 384 Location: Portland Or
|
Posted: Mon Nov 10, 2008 9:58 pm Post subject: Booting off USB with out initrd? Is it possible? |
|
|
Booting off USB with out initrd? Is it possible? I am stuck on this on. I have only tried recompiling the kernel 20+ times...
Code: |
Device Drivers --->
USB support --->
<*> Support for Host-side USB
<*> OHCI HCD support
<*> USB Mass Storage support
|
I have support for the hardware and the XFS file system, all built in, NOT modules. I can see USB load and usb-storage load. I have scsi-disk built in to. But I always get a kernel panic. What am I missing? Using a 2.6.27-r2 gentoo kernel.
Parts of my .config
Code: |
CONFIG_XFS_FS=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_ISP116X_HCD=y
CONFIG_USB_ISP1760_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_SL811_HCD=y
CONFIG_USB_R8A66597_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_SG=y
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fuzzykiller n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Nov 2008 Posts: 44 Location: Karlsruhe, Germany
|
Posted: Mon Nov 10, 2008 10:56 pm Post subject: |
|
|
Did you enable SCSI disk support? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DingbatCA Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/144526775240fe020a2c2e8.jpg)
Joined: 07 Jul 2004 Posts: 384 Location: Portland Or
|
Posted: Mon Nov 10, 2008 11:10 pm Post subject: |
|
|
yes
Code: |
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_SG=y
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fuzzykiller n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Nov 2008 Posts: 44 Location: Karlsruhe, Germany
|
Posted: Mon Nov 10, 2008 11:13 pm Post subject: |
|
|
What exactly is the cause of the kernel panic? No root device? Have you tried using UUID instead of /dev syntax?
And, of course, can you see the detected USB disk scroll by as the kernel is booting? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DingbatCA Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/144526775240fe020a2c2e8.jpg)
Joined: 07 Jul 2004 Posts: 384 Location: Portland Or
|
Posted: Mon Nov 10, 2008 11:24 pm Post subject: |
|
|
I can see usb-storage go by, I see the detection process. Never see the pen drive come up as sdX. I am currently using root=/dev/sda2. Never heard of the UUID. Not sure if the kernel is even seeing the pen drive. Do you have a working .config? I can go from there, and back out where the problem is. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fuzzykiller n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Nov 2008 Posts: 44 Location: Karlsruhe, Germany
|
Posted: Mon Nov 10, 2008 11:40 pm Post subject: |
|
|
No, I just have the x86 and amd64 minimal LiveCD on an USB disk drive. And SLAX. I can't tell you much about it, as the usb-storage drivers spam the syslog excessively. Even dmesg doesn't work. They all use initrds.
UUID is the unique identifier of a partition (and other things, but that's not important here). You have to consider that the USB disk may not always be sda.
Use the blkid command to get the UUID from any partition. For example:
# blkid /dev/sda1
This will print something like:
/dev/sda1: UUID="4a6aed11-42dd-4c82-81ce-8f469e93f210" TYPE="reiserfs"
As these numbers are fairly complex, you might consider redirecting output to a file and inserting it at the appropriate location in your GRUB/whatever configuration.
Syntax in the kernel command line is as follows:
root=UUID=4a6aed11-42dd-4c82-81ce-8f469e93f210
/edit:
And, of course, you need to use a similar syntax in your fstab file!
UUID=e0164f78-9821-4eaf-bda7-1fd9b43a6f06 / ext3 defaults,errors=remount-ro 0 1
UUID=4a6aed11-42dd-4c82-81ce-8f469e93f210 /home ext3 defaults 0 0 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DingbatCA Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/144526775240fe020a2c2e8.jpg)
Joined: 07 Jul 2004 Posts: 384 Location: Portland Or
|
Posted: Mon Nov 10, 2008 11:51 pm Post subject: |
|
|
I know I can get this running with an initrd, but was trying to skip that step. I know that the Gentoo LiveCD's depend on initrd to take care of this. I am rather sure that the drive never gets loaded, not that the root= path is wrong. Any other ideas? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fuzzykiller n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Nov 2008 Posts: 44 Location: Karlsruhe, Germany
|
Posted: Tue Nov 11, 2008 12:12 pm Post subject: |
|
|
Well, I made a mistake - the UUID syntax can only be used in conjunction with an initrd. I was however successful in booting a basic Debian system from my usb pen drive. Please specify the exact error message you receive when using classic /dev syntax. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DirtyHairy l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Murray.gif)
Joined: 03 Jul 2006 Posts: 608 Location: Würzburg, Deutschland
|
Posted: Tue Nov 11, 2008 12:35 pm Post subject: |
|
|
I'm not sure if this applies, but doesn't it usally take some time (~seconds) after usb-storage has claimed a device until it gets accessible? Therefore, the kernel might try to access the boot device before usb-storage has initialized. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Tue Nov 11, 2008 12:43 pm Post subject: Re: Booting off USB with out initrd? Is it possible? |
|
|
DingbatCA wrote: | Booting off USB with out initrd? |
It may be possible if your only using a modern motherboard and USB 2.x devices. In my experience when booting from USB the kernel won't detect all USB devices unless the drivers are loaded as modules.
For example, my new HP 6720s Laptop works fine with HCD compiled in as it has USB 2 ports and my USB stick was also USB2 compatible. However, since moving to a USB 1.x stick (to test) I can't boot it anymore as its not detected with the modules included in the kernel
I compile my kernel using Genkernel (so also use initrd) and read somewhere that USB works best if these HCD drivers (i.e. EHCI/OHCI/UHCI HCD support) are included as modules. This has worked for me.
I'd guess for full hardware support initrd is required!
Why do you want to skip using initrd??.... I can't see any real advantage to that one other than increasing the size of your kernel
Rich |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fuzzykiller n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Nov 2008 Posts: 44 Location: Karlsruhe, Germany
|
Posted: Tue Nov 11, 2008 2:00 pm Post subject: |
|
|
The size of the kernel doesn't really matter, now does it? After all, we're not using embedded systems here, I guess.
The only reason why I load the USB drivers as modules is a faster boot process.
And, just for the record, I have libusual active in the kernel.
I will test my pen drive setup later, I just made it this morning at the university.
However I assume there won't be any hardware problems. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DingbatCA Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/144526775240fe020a2c2e8.jpg)
Joined: 07 Jul 2004 Posts: 384 Location: Portland Or
|
Posted: Tue Nov 11, 2008 4:28 pm Post subject: |
|
|
DirtyHairy is right. It is taking the usb-storage about 2 seconds to find the drive, the panic happens within 1 second. I could care less about kernel size, It was more me being lazy and not building an initrd. As a module, or as built in, I need to wait a bit longer. Time to build an initrd. Thank you for the help. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hpeters n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Sep 2003 Posts: 68
|
Posted: Tue Nov 11, 2008 4:34 pm Post subject: |
|
|
DingbatCA wrote: | DirtyHairy is right. It is taking the usb-storage about 2 seconds to find the drive, the panic happens within 1 second. I could care less about kernel size, It was more me being lazy and not building an initrd. As a module, or as built in, I need to wait a bit longer. Time to build an initrd. Thank you for the help. |
Have you tried the rootdelay=(time in seconds) kernel command line parameter ?
A setting of 5 seconds are higher always worked for me.
Harley |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DingbatCA Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/144526775240fe020a2c2e8.jpg)
Joined: 07 Jul 2004 Posts: 384 Location: Portland Or
|
Posted: Tue Nov 11, 2008 4:39 pm Post subject: |
|
|
OOOOOOO, now that has possibility! I will try it when I get home tonight. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DingbatCA Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/144526775240fe020a2c2e8.jpg)
Joined: 07 Jul 2004 Posts: 384 Location: Portland Or
|
Posted: Wed Nov 12, 2008 6:36 am Post subject: |
|
|
It lives!!!
hpeters wins! rootdelay=10 is what I needed. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|