# [SOLVED] Install Gentoo on USB Drive

## Xander314

I am trying to install Gentoo on a USB drive for my mining rig. However, I keep getting kernel panics as it can't find the root filesystem. The root filesystem is on my USB drive. I have enabled OHCI, UHCI and EHCI USB support. I first tried with a stripped down kernel config from kernel-seeds.org but I have also tried with minimal modifications to the default config.

What kernel config options am I likely to need so that the kernel can find and mount the root file system?

Oh, and it's an ext4 filesystem and ext4 is enabled in the kernel.

SOLUTION: Add 

```
rootdelay=<a few seconds>
```

 to kernel command line so there is time for USB to be detected before root is mounted.Last edited by Xander314 on Sun Jan 19, 2014 6:22 pm; edited 1 time in total

----------

## mreff555

A little more information please. 

What bootloader are you using?

are you using a initramfs?

can you post your boot config.

If you are using grub (not that I would recommend that for a system on a stick), but if you are you can use the bootloader commands interactively to make sure the boot loader can find and read your root drive.

----------

## Hu

Also, please post the last 25 lines of output before the panic.

----------

## Xander314

Sorry I wasn't sure what information to provide. I'm using GRUB2. Why wouldn't you recommend grub for this use case? Oh, and I'm not using an initramfs.

I just took a look at the GRUB recovery console and it can see all the partitions. I don't think GRUB is the problem. The kernel is loaded fine by GRUB, but the kernel apparently cannot see the USB drive.

----------

## Xander314

 *Hu wrote:*   

> Also, please post the last 25 lines of output before the panic.

 

Only a few lines still show on the screen after the panic. How can I see them?

----------

## Xander314

Okay I fixed it. It was just a timing issue. I added 

```
rootdelay=10
```

 to the kernel command line and now it detects the USB drive before it tries to mount root.

----------

## mreff555

Glad you got it working. I thought it may have been something like that. Generally bootloaders are pretty capible these days.

The only reason I personally wouldn't use grub on a stick is because of how big it is. There is nothing wrong with running it.

----------

## Xander314

Okay I'll bear that in mind, though in this instance I am not too concerned about wasting space as my mining setup won't take up much space. Thanks for the help!

----------

