Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LILO bios mappings
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pakjebakmeel
n00b
n00b


Joined: 13 Feb 2012
Posts: 43

PostPosted: Mon Feb 18, 2013 9:17 am    Post subject: LILO bios mappings Reply with quote

Hi all,

I'm looking for some advise on how to proceed. I currently have:

Intel D2700MUD motherboard with 2 onboard SATA ports
Expansion Sil3132 card 2 port MiniPCIe SATA controller

Code:
gentoo rsync # lspci
00:00.0 Host bridge: Intel Corporation Atom Processor D2xxx/N2xxx DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Atom Processor D2xxx/N2xxx Integrated Graphics Controller (rev 09)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02)
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 02)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation NM10/ICH7 Family SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 02)
01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
02:00.0 RAID bus controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
03:00.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller (rev 05)


Logical MDADM layout:

2x 2TB (MD1,MD2,MD3,MD4 / boot,swap,root,tempstorage) mdadm metadata v0.90 because I use kernel automounter and no initramfs
5x 3TB (MD5) mdadm metadata v1.20

Code:
gentoo rsync # mdadm --detail /dev/md5
/dev/md5:
        Version : 1.2
  Creation Time : Sat Jan  5 15:19:13 2013
     Raid Level : raid5
     Array Size : 11721054208 (11178.07 GiB 12002.36 GB)
  Used Dev Size : 2930263552 (2794.52 GiB 3000.59 GB)
   Raid Devices : 5
  Total Devices : 5
    Persistence : Superblock is persistent

    Update Time : Mon Feb 18 03:25:19 2013
          State : clean
 Active Devices : 5
Working Devices : 5
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : gentoo:0  (local to host gentoo)
           UUID : 7a13e258:2b8fbdc6:083a1953:634be985
         Events : 38406

    Number   Major   Minor   RaidDevice State
       0       8       65        0      active sync   /dev/sde1
       6       8       81        1      active sync   /dev/sdf1
       2       8       97        2      active sync   /dev/sdg1
       4       8       33        3      active sync   /dev/sdc1
       5       8       49        4      active sync   /dev/sdd1

Code:
gentoo rsync # mdadm --detail /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Mon Jan  7 20:15:56 2013
     Raid Level : raid1
     Array Size : 124864 (121.96 MiB 127.86 MB)
  Used Dev Size : 124864 (121.96 MiB 127.86 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Mon Feb 18 09:31:41 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 3bd9364a:f7d81ce4:a65ff077:61ffda2d (local to host gentoo)
         Events : 0.24

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8        1        1      active sync   /dev/sda1

Code:
gentoo rsync # mdadm --detail /dev/md2
/dev/md2:
        Version : 0.90
  Creation Time : Mon Jan  7 20:16:06 2013
     Raid Level : raid1
     Array Size : 3999680 (3.81 GiB 4.10 GB)
  Used Dev Size : 3999680 (3.81 GiB 4.10 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Mon Feb 18 09:31:41 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : b2494a3c:3a6a30e4:a65ff077:61ffda2d (local to host gentoo)
         Events : 0.24

    Number   Major   Minor   RaidDevice State
       0       8       18        0      active sync   /dev/sdb2
       1       8        2        1      active sync   /dev/sda2

Code:
gentoo rsync # mdadm --detail /dev/md3
/dev/md3:
        Version : 0.90
  Creation Time : Mon Jan  7 20:16:15 2013
     Raid Level : raid1
     Array Size : 97656768 (93.13 GiB 100.00 GB)
  Used Dev Size : 97656768 (93.13 GiB 100.00 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 3
    Persistence : Superblock is persistent

    Update Time : Mon Feb 18 10:40:15 2013
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : e7c1fab3:a11c0038:a65ff077:61ffda2d (local to host gentoo)
         Events : 0.39

    Number   Major   Minor   RaidDevice State
       0       8       19        0      active sync   /dev/sdb3
       1       8        3        1      active sync   /dev/sda3

Code:
gentoo rsync # mdadm --detail /dev/md4
/dev/md4:
        Version : 0.90
  Creation Time : Tue Jan  8 21:14:46 2013
     Raid Level : raid1
     Array Size : 1851731968 (1765.95 GiB 1896.17 GB)
  Used Dev Size : 1851731968 (1765.95 GiB 1896.17 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 4
    Persistence : Superblock is persistent

    Update Time : Mon Feb 18 09:31:41 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : d72fa9ce:5b0075ef:a65ff077:61ffda2d (local to host gentoo)
         Events : 0.28

    Number   Major   Minor   RaidDevice State
       0       8        4        0      active sync   /dev/sda4
       1       8       20        1      active sync   /dev/sdb4



Physical layout as follows:

http://img843.imageshack.us/img843/9448/64655307.png

This works fine, both disks are bootable with the following LILO config:

Code:
boot=/dev/md1
raid-extra-boot=mbr-only
prompt
timeout=100
default=current
lba32

image=/boot/kernel-current
        label=current
        read-only
        root=/dev/md3
        vga=791

image=/boot/kernel-previous
        label=previous
        read-only
        root=/dev/md3
        vga=791


The problem I have is when I connect an additional disk, or move the port multiplier to the first port of the SIL3132 the system hangs on "LI" and does not boot. I have done some research and figured out that this is most likely due to the BIOS mappings (0x80, 0x81) etc.

I have found some tutorials that cover this problem but they do not take RAID1 into account. Also, I have no clue whether this happens because the BIOS enumerates the expansion card first and passed 0x80 for anything connected to port 1 of the sil3132 or because the linux kernel enumerates in a different order.

I'm looking for some advise on how to crack this problem. The goal is to have a bootable system with the port multiplier connected to port 1 of the sil3132, I can then attach a second port multiplier and add more disks.

The questions I have now;


  • When I add a disk on that port 1; does the BIOS assign 0x80 and LILO boots the wrong disk? Or does LILO/Kernel assisn a different ID whilst the bios just appends that disk at the end of the 0x8* range?
  • The port multiplier will only report 1 one disk to the BIOS, (stated in the manual). The one connected to the first port, when changing the disk mapping should I take into account it might inject 5 disks or just 1?


With these 2 questions in mind, how do I weave a solution into my lilo.conf keep RAID1 bootable from both disks? Any guidelines or advises? :?
Back to top
View user's profile Send private message
pakjebakmeel
n00b
n00b


Joined: 13 Feb 2012
Posts: 43

PostPosted: Mon Feb 18, 2013 12:57 pm    Post subject: Reply with quote

Because the mainboard's bios doesn't have Port Multiplier support it will only report the disk connected to the first port of the multiplier. I can confirm that during POST the addon card BIOS shows 1 3TB disk attached to port 2. When I leave port 1 empty my system boots so my conclusion is that the bios does (can I confirm this with some tool during run-time?):
Code:
2TB on mainboard port 1 = 0x80
2TB on mainboard port 2 = 0x81
3TB on expansion card port 2,1 = 0x82
3TB on expansion card port 2,2 = 0x83
3TB on expansion card port 2,3 = 0x84
3TB on expansion card port 2,4 = 0x85
3TB on expansion card port 2,5 = 0x86

When I move my port multiplier to port 1 of the expansion card I would expect it to do this:
Code:
2TB on mainboard port 1 = 0x80
2TB on mainboard port 2 = 0x81
3TB on expansion card port 1,1 = 0x82
3TB on expansion card port 1,2 = 0x83
3TB on expansion card port 1,3 = 0x84
3TB on expansion card port 1,4 = 0x85
3TB on expansion card port 1,5 = 0x86

But then the BIOS ID's for the boot disks haven't changed and it should still boot (which it doesn't) so something else has to be happening. Maybe the bios enumerates in the following order:
Code:
Port 1 on the expansion card
Port 1 on the mobo
Port 2 on the mobo
Port 2 on the expansion card

Sounds weird but it would explain the behaviour. The card does support RAID 0&1 but it's not used. Because it has a RAID bios it might interfere with the main BIOS's order?
I suspect this is what happens if I connect an additional disk:
Code:
Additional Disk on expansion card port 1,1 = 0x80
2TB on mainboard port 1 = 0x81
2TB on mainboard port 2 = 0x82
3TB on expansion card port 2,1 = 0x83
3TB on expansion card port 2,2 = 0x84
3TB on expansion card port 2,3 = 0x85
3TB on expansion card port 2,4 = 0x86
3TB on expansion card port 2,5 = 0x87

I think it must 'stick' anything connected to the expansion card's port no 1 in between the mobo ports and expansion card's port no 2 enumeration order.

In the BIOS I specify the boot drive as the 2TB and then the other 2TB which are both bootable by MBR so if the BIOS marks the boot drive as 0x80 it should just boot right? Merely connecting a seperate drive on that expansion card's port no 1 makes the system fail boot, so it must stick that drive on 0x80 for some reason?

Does this all make sense or am I totally confused now?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31716
Location: 56N 3W

PostPosted: Mon Feb 18, 2013 1:10 pm    Post subject: Reply with quote

pakjebakmeel,

Code:
00:1f.2 SATA controller: Intel Corporation NM10/ICH7 Family SATA Controller [AHCI mode] (rev 02)
02:00.0 RAID bus controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)


The kernel HDD scan order will be the Intel then the Silicon Image as the Intel is on PCI bus 00 and the Sil chip on PCI Bus 02.

Some BIOSes have an option to search plug in cards before the motherboard. If yours has that option and its set, then adding a drive will change the two drives connected to the Intel controller BIOS IDs, which will in turn, upset lilo. Moving drives around would not as the Intel chip set would still be enumerated last.

Check your BIOS for boot order and the external card option.

If you remove the SIL card, does you box still boot or do you get the LI error?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pakjebakmeel
n00b
n00b


Joined: 13 Feb 2012
Posts: 43

PostPosted: Mon Feb 18, 2013 1:28 pm    Post subject: Reply with quote

NeddySeagoon wrote:
pakjebakmeel,

Code:
00:1f.2 SATA controller: Intel Corporation NM10/ICH7 Family SATA Controller [AHCI mode] (rev 02)
02:00.0 RAID bus controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)


The kernel HDD scan order will be the Intel then the Silicon Image as the Intel is on PCI bus 00 and the Sil chip on PCI Bus 02.

Some BIOSes have an option to search plug in cards before the motherboard. If yours has that option and its set, then adding a drive will change the two drives connected to the Intel controller BIOS IDs, which will in turn, upset lilo. Moving drives around would not as the Intel chip set would still be enumerated last.

Check your BIOS for boot order and the external card option.

If you remove the SIL card, does you box still boot or do you get the LI error?


I can remove the port expander (and the 5 connected drives) and the box still boots. I ran without this expansion card for a while and when I added it the system booted fine so I guess it will still boot when I remove it. Can't test now as I currently don't have physical access to the box. When I move disks on the port multiplier it still boots (re-arranged SATA cables last week). Just when adding a disk to port 1 or moving the PM to port 1 on the SIL3132 it fails to boot.

So it must be a BIOS problem with the enumeration then as the kernel will detect the disks in the right order. I will check the BIOS this evening to see if I can find anything interesting.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum