Daniel Wirth wrote:
>
>The Kernel, which LILO wants to boot is located on which device ? It 
>MUST NOT be located on any of your RAID-Partitions but on a non-striped
>boot-partition!
>
I really wish people would:
a) read the archives
b) include the information below in the FAQ(s).

Booting from RAID1 with LILO is very much possible, very convenient and
something I use every day after reading about it in this very list not
just once but twice.  ;-)

---
From: [EMAIL PROTECTED] (Harald Nordgård-Hansen)
Date: 22 Aug 1999 13:28:32 +0200
Subject: Re: Booting Root RAID 1 Directly _Is_ Possible

How come I've been running this for about a year and a half, then?
First with an initrd setting up the raid, and lately using
autodetect...

To quote from my lilo.conf:

disk=/dev/md1
        bios=0x80
        sectors=32
        heads=64
        cylinders=4341
        partition = /dev/md0
        start = 32
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
image=/boot/vmlinuz-2.2.5-22smp
        label=linux
        root=/dev/md0
        initrd=/boot/initrd-2.2.5-22smp.img
        read-only

The root partition is 5-way mirrored on /dev/md0, with each partition
at the start of the disk.  The /dev/md1 is never used, but needs to
refer to a device with the same major number as /dev/md0 for lilo to
be happy.

The numbers for sec/head/cyl are simply taken from fdisk -l /dev/sda,
while you have to think a bit about the start parameter.  If the
partition is at the start of the disk, the first partition will start
on cyl 0, head 1, sec 0, which means that start = sectors.  Other
offsets I haven't looked into.

After running lilo to make the boot-block on the first disk of the
mirror set, I can just copy the boot-block of this disk onto each of
the others, and I can boot my system with any of these mapped by the
SCSI bios as C: (aka bios 0x80).

At the moment, this is running on a stock redhat 6.0 kernel, with an
initrd built with 'mkinitrd --preload raid0 --preload raid1 ...'.  If
you roll your own kernel with raid 0.90 and autodetect compiled in,
there is no need for initrd at all.

-Harald
-- 
Harald Nordgård-Hansen,  <><  http://bukharin.hiof.no/~hnh/  <>< Phone/Fax:
Østfold College, School of Computer Sciences, Norway <>< +47 6910 4033/4002

---

I'm a very happy camper with this recipe using kernel autodetect.
As an another example my lilo.conf and lilo.conf_hdc (used to install the
bootblock on hdc so booting with a failed hda is possible):
---lilo.conf---
disk=/dev/md0
        bios=0x80
        sectors=63
        heads=16
        cylinders=32760
        partition = /dev/md5
        start = 63
boot=/dev/hda
root=/dev/md5
compact
install=/boot/boot.b
map=/boot/map
vga=normal
delay=20
image=/bzImage
label=Linux
read-only
---

---lilo.conf_hdc---
disk=/dev/md0
        bios=0x80
        sectors=63
        heads=16
        cylinders=32760
        partition = /dev/md5
        start = 63
boot=/dev/hdc
root=/dev/md5
compact
install=/boot/boot.b
map=/boot/map
vga=normal
delay=20
image=/bzImage
label=Linux
read-only
---

A df (I boot from /dev/md5, since I became aware of this method after
installing this system):
---
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md5                 49644     26228     22904  53% /
/dev/md1               1007896    408672    588984  41% /usr
/dev/md2               1007896    146080    851576  15% /var
/dev/md3                806288    306984    491112  38% /usr/local
/dev/md4               3023920      2112   2991088   0% /home
/dev/hda9               806560    188240    610128  24% /var/lib/news
/dev/hdc9              7678864   5929040   1749824  77% /var/spool/news
/dev/hda10             1209856    669344    528220  56% 
/var/spool/news/over.view
/dev/hda11             2015984        20   1995484   0% /home/ftp
/dev/hdc10             2060136     16556   2022652   1% /var/spool/cache
---
All RAIDs are level 1, as this system only has 2 16GB IDE disks. But level 1
is just needed for the boot device.

Dewa,

<CB>
-- 
  // <CB> aka Christian Balzer, Tannenstr. 23c, D-64342 Seeheim, Germany
\X/  [EMAIL PROTECTED] | Voice: +49 6257 83036, Fax/Data: +49 6257 83037
SWB  - The Software Brewery - | http://www.swb.de/ | Anime no Otaku

Reply via email to