Next Previous Contents

6. How do i know the BIOS number for my SCSI disks

The contribution from Marc Tanguy (mtanguy@ens.uvsq.fr), 21 Jul 2001

Actually, it exists two ways to know it :

If you have an adaptec scsi card (2940u2, 29160, 39160), you simply use the 'diagnose' mode. It must be activated in the scsi card BIOS. Then you just have to wait and see something like :

... ID - LUN - Vendor  - Product   - Rev  - Size - Sync - Bus - HD#
... 0  - 0   - QUANTUM - ATLAS10K2 - DDD6 - 17GB - 160  - 16  - 80h 
... 1  - 0   - QUANTUM - ATLAS10K2 - DDD6 - 17GB - 160  - 16  - 81h 
... 2  - 0   - IBM     - DDRS      - DC1B - 4GB  - 80   - 16  - 82h 
... 3  - 0   - IBM     - DNES      - SAH0 - 9GB  - 80   - 16  - 83h 
                                                                |
The values we want are here -------------------------------------

If you don't own an adaptec card (which is bad luck), you have two know what is the 'booting' disk (usually ID 0, but not necessary, it must be define in the scsi card BIOS) where LILO is going to be found and start : this is the first disk so it has number 0x80, then it's very simple, the BIOS follows the IDs.

By exemple :

ID 0 -> boot  -> 0x80
ID 1 -> empty 
ID 2 -> disk  -> 0x81
ID 3 -> disk  -> 0x82

or

ID 0 -> disk  -> 0x81
ID 1 -> empty
ID 2 -> disk  -> 0x82
ID 3 -> boot  -> 0x80
ID 4 -> disk  -> 0x83

This part doesn't care at all of what is installed on the scsi drives.

** Ok, but NT must be the first disk to boot, so i want it in 0x80, but i already have LILO and a full ext2 only drive on 0x80 and my NT drive is in 0x83. How can i 'swap' linux and NT ?

This a very easy : you just have to tell BIOS that NT drive is now 0x80 and the Linux drive is 0x83.

other=/dev/sdd1
      label=nt
      map-drive = 0x83
      to = 0x80
      map-drive = 0x80
      to = 0x83

This change will produce and warning :

  Warning: BIOS drive 0x8? may not be accessible

but if you know what you are doing it will run without problem.

I used it on this configuration which has a Red Hat Linux 7.1 and a Windows 2000 Pro :

Name        Flags      Part Type  FS Type          [Label]        Size (MB)

Disk Drive: /dev/sda
sda1        Boot        Primary   Linux ext2       [/boot]            24.68
sda2                    Primary   Linux raid autodetect              139.83
sda3                    Primary   Linux raid autodetect             3150.29
sda4                    Primary   Linux ext2       [/home]         15044.04

Disk Drive: /dev/sdb
sdb1                    Primary   Linux raid autodetect              139.83
sdb2                    Primary   Linux raid autodetect             3150.29
sdb3                    Primary   Linux ext2       [/]              1052.84
sdb4                    Primary   Linux ext2       [/public]       14015.88

Disk Drive: /dev/sdc
sdc1        Boot        Primary   Linux ext2       [/var]           1052.84
sdc2                    Primary   Linux ext2       [/tmp]            106.93
sdc3                    Primary   Linux ext2       [/cache]         1052.84
sdc4                    Primary   Linux ext2       [/chroot]        2352.44

Disk Drive: /dev/sdd
sdd1        Boot        Primary   NTFS             [A]              9162.97

My full /etc/lilo.conf :

boot=/dev/sda
map=/boot/map
install=/boot/boot.b
prompt
default=Linux
read-only
compact
image=/boot/vmlinuz
  label=Linux
  root=/dev/sdb3
other=/dev/sdd1
  label=nt
  map-drive = 0x83
  to = 0x80
  map-drive = 0x80
  to = 0x83

** I just plugged a new scsi drive, and now LILO refuse to boot, what's going on ?

When you plug a disk, you must be careful with the IDs. If you add a drive between two already plugged disks the BIOS numbers are changed :

         Before            ---->             After
scsi id -       - BIOS id        scsi id -          - BIOS id
ID 0    - disk  - 0x80           ID 0    - disk     - 0x80
ID 1    - empty                  ID 1    - new disk - 0x81
ID 2    - disk  - 0x81           ID 2    - disk     - 0x82 !!

If you change the BIOS ids, you have to re-evaluate them.


Next Previous Contents