# cant boot from external hdd sata

## pnotz17

i made a thread a couple of days back about not being to boot without a initramfs and did some reading and came to a conclusion that it has something to do with pata sata drivers,today i took all my hdds out and only put the sata drive in and installed linux mint did a lspci saved that and compared drivers being used and enabled ata_piix and still cant boot with everything built in as *

https://forums.gentoo.org/viewtopic-t-1135893.html

lspci

```
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 10)

   Subsystem: Gigabyte Technology Co., Ltd 82G33/G31/P35/P31 Express DRAM Controller

00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10)

   Subsystem: Gigabyte Technology Co., Ltd 82G33/G31 Express Integrated Graphics Controller

   Kernel driver in use: i915

   Kernel modules: i915

00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD (Realtek ALC887)

   Kernel driver in use: snd_hda_intel

   Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01)

   Kernel driver in use: pcieport

00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01)

   Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD

   Kernel driver in use: uhci_hcd

00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD

   Kernel driver in use: uhci_hcd

00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD

   Kernel driver in use: uhci_hcd

00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD

   Kernel driver in use: uhci_hcd

00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD

   Kernel driver in use: ehci-pci

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)

00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd 82801GB/GR (ICH7 Family) LPC Interface Bridge

   Kernel driver in use: lpc_ich

   Kernel modules: intel_rng, lpc_ich, leds_ss4200

00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd NM10/ICH7 Family SATA Controller [IDE mode]

   Kernel driver in use: ata_piix

   Kernel modules: pata_acpi

00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd GA-8I945PG-RH/GA-D525TUD Mainboard

   Kernel driver in use: i801_smbus

   Kernel modules: i2c_i801

02:00.0 Ethernet controller: Qualcomm Atheros AR8131 Gigabit Ethernet (rev c0)

   Subsystem: Gigabyte Technology Co., Ltd GA-G31M-ES2L Motherboard

   Kernel driver in use: atl1c

   Kernel modules: atl1c
```

----------

## alamahant

Since you have been trying so hard for a long time maybe emerge gentoo-kernel-bin and if you boot then diff the 2 .configs

----------

## pnotz17

i was thinking of that..

----------

## alamahant

```

diff .config1 .config2

```

Also plz try with

```

root=PARTUUID​=......

```

in /etc/default/grub

----------

## pnotz17

i have tried part uuid what amazes me is the same kernel config works on a ide drive just fine its got to be some pata sata module could it be that i dont have kernel firmware?btw could i do a make localmodconfig in mint on another sata hdd somehow

----------

## NeddySeagoon

pnotz17,

What does  *Quote:*   

> cant boot from external hdd sata

  mean?

Where is /boot?

Where is / (root)?

How is the external HDD connected?

```
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)

   Subsystem: Gigabyte Technology Co., Ltd NM10/ICH7 Family SATA Controller [IDE mode]

   Kernel driver in use: ata_piix

   Kernel modules: pata_acpi 
```

Your SATA controller is in IDE mode. That's generally a very bad thing.

IDE mode has exactly one use. That is to allow Windows XP users to install the AHCI driver so that they can switch to AHCI mode until they need to reinstall Windows ;)

It gets worse. Often, only the first two SATA ports work in IDE mode. The others are not seen. There is more bad news. Some chipsets only support PIO modes in IDE mode, so you may only have two working SATA ports and they may be bath slow and CPU intensive. Still, its for one time use by Windows XP installers.

Go into the BIOS and set AHCI mode. Almost anything except IDE mode, or whatever its called in your BIOS.

```
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)
```

will change to

```
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [AHCI mode] (rev 01)
```

This only affects the SATA ports.

----------

## pnotz17

boot and root are on the same drive....ill try and look in my bios again i tried to do this before and didn't see anything ahci

----------

## pnotz17

ok so in integrated peripherals there's an option to combine pata sata  combined/enhanced/disabled/auto nothing on ahci.this is dual bios and this rig is old 2009,im still kinda fresh at bios settings changing boot order and a couple of other thing is really what i mess with.anyways i wish i could figure this out but i guess il just go with a initramfs for the sata drive since i know it boots and for an IDE well it boots without one,sorry for wasting your time but if there is a fix im up for it, il google and see if i have to update my bios which i know i do but i dont know if i want to mess with that just for this.

thank you

----------

## pietinger

 *pnotz17 wrote:*   

> [...] nothing on ahci.this is dual bios and this rig is old 2009, [...]

 

I know there exists some mainboards with no selection for ahci; on some Dell you must enable raid to get ahci (?!   :Evil or Very Mad:   )

So, what is the exact name of your mainboard ? Do you find something when you google it together with "ahci" ?

The most important question: Which kernel modules in "lspci -k" do you see WHEN you boot with the actual Gentoo Minimal-CD ?  (not the old live-CD).

I know some mainboards with SATA and PATA (using PATA for e.g. old CD-ROM-drives). Do you need PATA ? If not, what happens if you disable it ?

Do you know this page: https://wiki.gentoo.org/wiki/HDD ?

This is for (very) old IDE: https://wiki.gentoo.org/wiki/Kernel/Gentoo_Kernel_Configuration_Guide#IDE_chipsets_and_DMA

----------

## NeddySeagoon

pnotz17,

Try them all except disabled.

Boot anyhow you like and run lspci.

When it does not say

```
 00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01) 
```

IDE Mode, you are good.

pietinger,

I had forgotten about selecting raid mode to get AHCI. Thank you for the reminder.

----------

## GDH-gentoo

Also:

 *pnotz17 wrote:*   

> i guess il just go with a initramfs for the sata drive since i know it boots and for an IDE well it boots without one

 

If the computer does really boot with an initramfs or Mint, the output of lsmod can algo give you a hint about what you need to configure as built-in for booting with the SATA drive and no initramfs. You said in the other thread that the SATA drive is an external drive connected to an USB port?

----------

## NeddySeagoon

pnotz17,

Ahh ... ICH7 I thought I remembered that.

----------

## pnotz17

i appreciate all the feedback from you guys im going to have to do some research on my bios and how to do all that for future reference.I am now installing gentoo with my config that i know boots on a another IDE drive i found laying around put it inside my pc and now emerging world 

Thank you all for your support and help

----------

## pnotz17

 *GDH-gentoo wrote:*   

> Also:
> 
>  *pnotz17 wrote:*   i guess il just go with a initramfs for the sata drive since i know it boots and for an IDE well it boots without one 
> 
> If the computer does really boot with an initramfs or Mint, the output of lsmod can algo give you a hint about what you need to configure as built-in for booting with the SATA drive and no initramfs. You said in the other thread that the SATA drive is an external drive connected to an USB port?

 

yes its just an external samsung 250G laptop hdd that i had sitting around connected to a sata controller (the harness you clip on a hdd in a laptop internally) connected to a usb.The computer boots without a initramfs from the install i did on its IDE drive,i was just trying to replicate that kernel just on the laptop drive cuz my IDE is ready to die it clicks on boot and i dont like the sound of it

----------

## pnotz17

 *pietinger wrote:*   

>  *pnotz17 wrote:*   [...] nothing on ahci.this is dual bios and this rig is old 2009, [...] 
> 
> I know there exists some mainboards with no selection for ahci; on some Dell you must enable raid to get ahci (?!    )
> 
> So, what is the exact name of your mainboard ? Do you find something when you google it together with "ahci" ?
> ...

 

when i disable it it only boots from the laptop drive ie enchanced/combined 

```

# dmidecode 3.3

Getting SMBIOS data from sysfs.

SMBIOS 2.4 present.

Handle 0x0002, DMI type 2, 8 bytes

Base Board Information

        Manufacturer: Gigabyte Technology Co., Ltd.

        Product Name: G31M-ES2L

        Version:

        Serial Number:

```

----------

## pietinger

I googled for "G31M-ES2L bios ahci" and found a page from gigabyte tech forum saying: "ICH7 doesnt provide AHCI", so Neddy's suggestion to use it, can not be done. (you would need ICH7R or ICH7M). See also: https://www.intel.com/content/www/us/en/support/articles/000005642/technologies.html

----------

## NeddySeagoon

pietinger,

Thank you.

----------

## pnotz17

well i just put the sata drive internally and now it works lol with no initramfs guess its got all to with external usb sata controller

----------

