# external Drive connected via eSATA becomes /dev/sda

## vladimir_

Hi,

I am trying to connect a LaCie external Hard Disk  via eSATA  to a cheap VIA VT6421A PCI SATA-Controller. The controller is not hot swap capable, so I have to shut on the drive before booting the computer. The problem is that the LaCie becomes /dev/sda then and the computer does not boot. I tried to fix it with udev rules, but it does not work. 

Ubuntu 9.10 LiveCD names the drives  correctly: first channel on onboard controller /dev/sda, second /dev/sdb an so on. I have 4 drives connected on onboard controller so the LaCie drive becomes /dev/sde then.

Now the question: How to get Gentoo to have same behavior as Ubuntu? Is there an option in kernel config or something? Something in initrd?

----------

## d2_racing

Hi, can you post your udev rule that you coded ?

----------

## vladimir_

Hi,

i tried this one 

```

SUBSYSTEMS=="scsi", DRIVERS=="sd", ATTRS{model}=="*SAMSUNG HD103SI*", NAME="backup%n"

```

i think the rule should work. I booted the system with Ubuntoo LiveCD und ran 

```

udevadm info -a -p $(udevadm info --query path -n /dev/sdX)

```

the get the values for the rule.

I suspect that the failure occurs before the udev rules are beeing processed. The boot process stops with an error message:"/dev/sda2 block device is not valid root device"

----------

## Anon-E-moose

Does the system bios allow you to adjust the order that it sees the drives in, including the esata?

----------

## d2_racing

That's weird in fact, I think that your udev rules should work.

Double check your boot priority and make sure that the hdd that are connected to your mainboard are started before your esata.

----------

## vladimir_

Got it. 

Found an interesting document from dell site. Goggle for ps1q07-20060392-Domsch.pdf. Page 4.

In fact it is nothing about boot device order or priority. The VIA controller is not even boot capable and the external drive connected on it does not appear in BIOS boot device list. What is crucial, is the the order of loading the drivers by the kernel. First loaded driver wins.

Building the new kernel with the compiled in onboard controller driver and leaving the VIA Controller driver as module did the job.

Thank you for your time. 

Merry Christmas, Frohe Weihnachten, счастливого рождества.

----------

## d2_racing

Nice  :Razz: 

----------

## Series-8

Yes, I've noticed that some controllers get assigned a 'higher' value than what you'd expect (an your disks shift around unexpectedly).

This is a classic problem, but with a classic solution:

USE DISK LABELS!

3 easy steps:

1. use tune2fs to set a label on your boot partition / other partitions that may need them.

2. set the label name in fstab (LABEL=myfavdisk)

3. no step three.

Only note: not sure how well this works for NTFS/VFAT and other non-unix filesystems.

----------

