# SCSI Drive Naming

## anchorman082589

Hi,

I am in the process of installing Gentoo on my computer (dual opteron, lsi-pci-x u320 scsi card w/ two SCSI 32gb drives, one SCSI 10gb, and two optical IDE). The installation has gone fairly well, but i seem to be having a problem with the naming of the scsi drives. Whenever i am inside of a ***nux environment (SuSe, Pentoo, Knoppix...) my three drives show up as sde,sdf, and sdg even though these are the only three drives on the computer, but to when running the kernel(aka passing it the root= command) it initiates the drives as sda,sdb, and sdc. This seems to be the source of many of my problems.

Any ideas of how to fix this?

Thanks in advance,

Dan

----------

## bonbons

One potential reason for this naming could be the SCSI-ID of the drives, might be that the SuSE, Pentoo and Knoppix have some special option to name the sd* drives acording to their SCSI-ID.

This naming is done using udev (for 2.6 kernels), or eventually devfs...

I woudl suggest you to compare the udev rules on the hosts Linux versions that behave differently in order to find out what triggers the unexpected behavior. In addition, compare "ls -l" output for the sd* files in both cases, just to see if they point to the same major and minor numbers.

Naming sda, sdb and sdc looks fine and seems based on first-seen first server principle.

----------

## anchorman082589

The device ideas makes sense, thats what i assumed in the begining. 

The olny place it uses the first-seen is right when the kernel boots (aka i have ajust the root= passed to the gentoo kernel), but after it is done loading the kernel it seems to switch back to the other way, thus leaving my kernel stuck halfway through booting and very confused.

I'm getting the error "The filesystem can not be fixed", and i'm guessing that the problem is related.

----------

## bonbons

 *anchorman082589 wrote:*   

> The only place it uses the first-seen is right when the kernel boots (aka i have ajust the root= passed to the gentoo kernel)

 At that time only bios disk handles are used, and those are clearly first-come first-server principle, and also filtering out non-disk devices.

 *anchorman082589 wrote:*   

> but after it is done loading the kernel it seems to switch back to the other way, thus leaving my kernel stuck halfway through booting and very confused.

 I assume you are using udev to handle the devices, do you have some devices in /dev/ on root partition or in the device tarball?

How is your setting for booting related to udev device tarball?

Eventually booting from a live-CD and cleaning the /dev dir and tarball could help. (make sure to leave /dev/null, /dev/console, /dev/zero, /dev/random; /dev/urandom devices on the root partition)

----------

## Gentree

yes basically dont confuse Linux device names with those used by BIOS and hence the boot loader (probably grub on gentoo at least).

If your only issue with setting up grub.conf and/or giving boot command line options like root  then use sda etc and see if the rest starts to behave , otherwise read up both grub and udev naming conventions which are very similar ... but different  :Confused: 

PS note that in grub.conf the root command and the root arguement to the kernel command are NOT the same.  Confused? You should be   :Laughing: 

HTH   :Cool: 

----------

## anchorman082589

 *Quote:*   

>  I assume you are using udev to handle the devices, do you have some devices in /dev/ on root partition or in the device tarball?
> 
> How is your setting for booting related to udev device tarball?
> 
> Eventually booting from a live-CD and cleaning the /dev dir and tarball could help. (make sure to leave /dev/null, /dev/console, /dev/zero, /dev/random; /dev/urandom devices on the root partition)

 

I'm sorry, i'm a semi-newbie at things like this, i totaly missed you

 *Gentree wrote:*   

> yes basically dont confuse Linux device names with those used by BIOS and hence the boot loader (probably grub on gentoo at least).
> 
> If your only issue with setting up grub.conf and/or giving boot command line options like root  then use sda etc and see if the rest starts to behave , otherwise read up both grub and udev naming conventions which are very similar ... but different 
> 
> PS note that in grub.conf the root command and the root arguement to the kernel command are NOT the same.  Confused? You should be  
> ...

 

No, I have been going to the grub command line and typing things in myself

This is what i type:

```
Root (hd0,0)

kernel /kernel (i temporarily renamed it to make my life easier) root=/dev/sda3 init=/linuxrc

boot
```

it starts booting the kernel and goes until i get the error message "The filesystem can not be fixed"

----------

## Gentree

 *Quote:*   

> I am in the process of installing Gentoo on my computer

 

If you want help we need info . How far have you got , what have you done?

using the tab key in grub to autocomplete may help you see the available device names.

 :Cool: 

----------

## anchorman082589

Here is all the info i can think of:

I started from stage one and am now up to step 10 in the manual: http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=10

In the beginning rather than install the entire installation onto one partition as the manual seems to assume i installed it over many partitions spread over 3 drives (boot, the root folder ,usr, home, var, swap, and tmp were all on separate partitions) so i mounted them all within the /mnt/gentoo folder so they would match up with the folders that the base was extracted to.

I don't remember exactly what i compiled into the kernel, but i do have a list of the modules 

www.hdanforth.com/module

Also my wireless keyboard and the instillation cd didn't like each other (every so often i got getting invalid key messages on the screen i typed, they didn't change any of the input\output according to the computer, but i couldn't read what ever was overwritten by the error message (i guess the output stream and the error stream were both the monitor) so a lot of times i ftped files to my other computer to edit and read.

Here are a few of the files i have:

www.hdanforth.com/lspci - the lspci from my computer

www.hdanforth.com/lsmod -the lsmod from my computer

www.hdanforth.com/fstab - the fstab from my computrer

All of those files are from when i was in the "chroot /mnt/gentoo /bin/bash" environment on the setup cd

One last thing: My computer is a Tyan K8W with two opteron 242s 1gb of ram, an PCI-X LSI u320 scsi card (has raid, but its disabled), i have 2 30gb  15k scsi drives (one u320 the other u160) and one 10gb 10k scsi drive,  An IDE DVD RW, an IDE CD RW, and an IDE DVD drive,  a Radeon 9700, built in gigabit ethernet (Broadcom chipset), built in AC97 audio (AMD chipset), PCI USB\Firewire card.

Thats all i can think of.

----------

## Gentree

I think you would be best reducing this to a simpler installation until you are more familiar with Gentoo. It looks like you have got just about the most complicated hardware setup possible and have opted for the most complicated Gentoo installation , all as a "noob" to judge  by you post count.

May I suggest a stage3 install with simple 3 partition setup : /boot , swap and root all on one physical device.

Get your hardware issues sorted: keyboard, etc.

Later search for "stage4" which is reckoned to be a better way to do complete stage1 anyway.

You can easily split off the partitions /home etc , later if you want by copying to another partiton and mounting them .

Your current tangle sounds like a nightmare and is far too complicated to justify as a fresh installation.

You're obviously free to dive in at the deep end and make life as hard as possible as a learning exercise of through pure masochism, but dont burnden others with the madness that ensues.   :Wink: 

Hope the suggestions help.

 :Cool: 

----------

## anchorman082589

 *Gentree wrote:*   

> I think you would be best reducing this to a simpler installation until you are more familiar with Gentoo. It looks like you have got just about the most complicated hardware setup possible and have opted for the most complicated Gentoo installation , all as a "noob" to judge  by you post count.
> 
> May I suggest a stage3 install with simple 3 partition setup : /boot , swap and root all on one physical device.
> 
> Get your hardware issues sorted: keyboard, etc.
> ...

 

K, i olny set out on this "quest" in an effort to better learn how linux works, and i really can say i have learned a lot. 

Learned a lot, didn't expect this to ever work stable, but i was hoping i'd at least get to see completed boot :-\

----------

## Gentree

Well take it in smaller chuncks , I'm sure you'll learn just as much but probably spend less wasted time on the way. Good luck.

 :Cool: 

----------

## anchorman082589

Forget that, i just fixed the problem.

The whole system seems to have switched back to the sda sdb convetion so i just had to change my fstab accordingly

----------

## bonbons

Just a question, why do you have TWO lines with / in your fstab?

(lines 2 and 4)

```
/dev/sde1      /boot      ext2      noauto,noatime   1 2

/dev/sde3      /      ext2      noatime      0 1

/dev/sde5      /usr      ext2      noatime      0 1

/dev/sde3      /      ext2      noatime      0 1
```

----------

## anchorman082589

Just a mistake i made wehn copying and pasting i guess.

Thanks for the info.

----------

