# gentoo on external hdd

## Hexorg

Good daytime to you, I've tried to install gentoo on my external usb hdd, configured everything, compiled the kernel... now when I boot from live cd - i have /dev/sda - internal hdd, and /dev/sdb - external hdd.

/dev/sda has windows(sda1, sda2) and kubuntu(sda3=/ sda5=swap sda6=/home) linux installed on it.

/dev/sdb - new gentoo(sdb1=/boot sdb2=swap sdb3=/ sdb4=/home)

i can seccessfully boot grub from /dev/sdb but i cant quite fugure out what values should i use - 

root(hd1,0) - doesnt boot anything at all

root(hd0,0) - gets into my EXTERNAL harddrive and boots gentoo kernel

but what setting for "root" kernel parameter should I use for the kernel string?

kernel kernel-2.6.30-gentoo-r5 root=/dev/sdb3 ends up with kernel panic saying "VFS: Can-not open root device "sdb3" or unknown-block(0,0)"

kernel kernel-2.6.30-gentoo-r5 root=/dev/sda3 ends up booting GENTOO kernel with KUBUNTU enviroment!

yes, i compiled my own kernel, but i know for shure that i included ext3 fs in it (which is right because kbuntu's root fs is also ext3), and i just rechecked that my external HDD file system is also ext3

so it seems like what is (hd0,0) for grub is (hd1,0) for my kernel... :\ how would I fix that?

----------

## Hexorg

Oh yea! In my kernel, USB support is enabled, just like this guide says.

----------

## whiteghost

try this, it enabled me to boot a usbstick.

```
kernel kernel-2.6.30-gentoo-r5 rootdelay=10 root=/dev/sdb3
```

----------

## Hexorg

nope, still the same... keeps saying that available options are 

sda1 sda2...sda6

----------

## d2_racing

Try :

```

kernel /kernel-2.6.30-gentoo-r5 root=/dev/sdb3

```

----------

## Hexorg

nope, still the same. if i omit the root=... string at all, it will say an error on unknown block(8,16) instead of (0,0)

maybe this would help - when I insert the hdd while running gentoo live cd - is says a new scsi device found... I didn't enable scsi in the kernel though

----------

## NeddySeagoon

Hexorg,

You need the 

```
rootdelay=<sec>
```

kernel parameter.

Normally, root is mounted before the USB subsystem is started. Thats a really bad idea when root is on USB.

<sec> is a number of seconds to delay before attempting to mount root. This delay allows the USB system to start.

Values from 7 to 30 are reported to work. Some trial and error may be needed.

----------

## Hexorg

I think the error isn't the not initialising of a sdb drive.. but a not working driver... dmesg gives MANY lines of a sort:

```
device not accepting address 4 error -32

...

nommu_map_single overflow [some_hex_numbers]

```

here is my lspci -n:

```
00:00.0 0600: 8086:2a40 (rev 07)

00:01.0 0604: 8086:2a41 (rev 07)

00:1a.0 0c03: 8086:2937 (rev 03)

00:1a.1 0c03: 8086:2938 (rev 03)

00:1a.7 0c03: 8086:293c (rev 03)

00:1b.0 0403: 8086:293e (rev 03)

00:1c.0 0604: 8086:2940 (rev 03)

00:1c.1 0604: 8086:2942 (rev 03)

00:1c.3 0604: 8086:2946 (rev 03)

00:1c.4 0604: 8086:2948 (rev 03)

00:1c.5 0604: 8086:294a (rev 03)

00:1d.0 0c03: 8086:2934 (rev 03)

00:1d.1 0c03: 8086:2935 (rev 03)

00:1d.2 0c03: 8086:2936 (rev 03)

00:1d.3 0c03: 8086:2939 (rev 03)

00:1d.7 0c03: 8086:293a (rev 03)

00:1e.0 0604: 8086:2448 (rev 93)

00:1f.0 0601: 8086:2919 (rev 03)

00:1f.2 0106: 8086:2929 (rev 03)

00:1f.3 0c05: 8086:2930 (rev 03)

00:1f.6 1180: 8086:2932 (rev 03)

01:00.0 0300: 10de:0652 (rev a1)

02:00.0 0280: 8086:4237

03:00.0 0200: 10ec:8168 (rev 02)

06:00.0 0c00: 197b:2380

06:00.1 0880: 197b:2382

06:00.2 0805: 197b:2381

06:00.3 0880: 197b:2383

06:00.4 0880: 197b:2384

```

I checked the lsmod | grep usb on live cd, and made sure all those modules were included in my kernel

----------

## NeddySeagoon

Hexorg,

Those errors suggest that USB is not set up properly in the kernel.

You have an Intel chipset, so you will need EHCI_HCD and UHCI_HCD built into your kernel.

You should not have OHCI_HCD.

----------

## Hexorg

No, I found out it's something different - if I add mem=3G to the kernel - everythig works flawlessly. I found out that there are conflicts if you have >3.5G memory - which i do.... I did enable intel iommu support... but it doesn't work for some reason... does anyone know which iommu flags i need to activate while building a kernel for Core2 duo and ICH9 chipset?

----------

## NeddySeagoon

Hexorg,

Is this a 32 bit or 64 bit install ?

Some 32 bit hardware has problems when the fitted RAM is over 3.2Gb. This is because PCI memory mapped space and the BIOS are reserved at the top of addressable memory (Under 4G).

64 bit systems cope by remapping the RAM above 4G.

With a 32 bit kernel, you may be able to fix it by setting PAE to on. There is a speed penalty for this, as the kernel now pages memory mapped beyond 4G into the addressable 4G space.

----------

## Hexorg

no, it's an amd64 version install

----------

## Hexorg

and after words I copy the bzImage from arch\x86_64\boot\bzImage

.config flags 

swiotlb = y

gart_iommu = y

amd_iommu = y

intel_iommu = y

but still it gives me nommu_map_single error

----------

## NeddySeagoon

Hexorg.

Put your entire .config file on a pastebin and post a link

----------

## Hexorg

Here it is

----------

## NeddySeagoon

Hexorg,

Your kernel has a fair amount of bloat ... that may or may not be a problem.

Can you test with one of [urlhttps://forums.gentoo.org/viewtopic-t-707499-highlight-.html]Pappys Seeds[/url] please?

These are known sound config files, you just add your hardware.

----------

