riedmann
     39012 Meran/o, Postgranz 16/B - Tel. +39 0473 201 239 - Fax +39 0473 201 749
riedmann   riedmann

Installing Debian 3.1 Sarge on a Fujitsu Siemens Econel 50 server with RAID1

After switching from Compaq/HP servers to Fujitsu Siemens servers for most of my clients needs, I expected the release of Debian 3.1 Sarge with a 2.6 series kernel would make installations easier, but unfortunatley it was not so.

The FSC Econel 50 is a very interesting machine for small networks: it has a Broadcom tg3 gigabit NIC, and a 160 GB SATA disc with integrated RAID0/RAID1/RAID10 controller (Intel FW82801FR/LSI). In the BIOS the setting for this controller can be RAID (for the RAID function), native (use with SATA drivers) and compatible (use as ATA drive).

The machine where I tried the installation had a second 160 GB SATA drive. I planned to use both disks in a RAID1 structure (mirror both disks), and to install kernel 2.6.
Since the machine was planned a file server for a small Windows network, I have selected the following partition scheme:
10 GB ext3 for / (primary partition)
2 GB swap (logical partition)
148 GB ext3 for /home (logical partition)

I have made the installation in my office where the internet connection is a 1280k Brennercom ADSL link through a Zyxel ADSL router. My fileserver there is a Debian 3.1 Sarge machine (upgraded from 3.0 Woody). This machine is used also as DHCP server and, if needed, as proxy server.

I have tried the installation from the different media: the netinst CD, the full installation CD and a official DVD. All three had the same problem: with kernel 2.4.27 the only controller setting that was recognized was the compatible mode (where SATA is mapped as conventional ATA - PATA), but the installation failed to boot. The installation with kernel 2.6.8 gave another very strange problem: the DVD drive was not recognized after the machine booted. Even trying with a normal CDROM drive connected to the parallel ATA port there was no chance. Then I tried to boot from an USB stick (see here), but the machine don't liked my stick.

The only possibility to install Sarge on this particular machine was to use TFTP / bootp with the integrated NIC and his PXE boot function because there the CD was not needed for the install. The instructions for this particular installation method can be found here, and I used the expert26 boot option.

Unfortunately the hardware RAID could no be used because no disk could be found, so I had to select the "native" mode in the BIOS, and use the standard software RAID functions.

I have partioned the disks as needed (the partitions on the disks were configured as RAID partitions, and afterwards they were added to two different RAID1 arrays, one to mount as root (/) device, the other one as /home. The installation of the base system was very, very slow, and I can only suggest to let finish the syncronization of the disks before this installation (on my system it took about 90 minutes). You can monitor this process using the shell on the 3rd console (Alt+F3) looking at the /proc/mdstat file. If the installation of the base system fails, remove all directories under the /target path (the installation mounts the target disk under /target), and repeat the installation of the base system.

After this I installed grub and rebooted. Result: kernel panic with a few very interesting messages like "madm: /dev/sda1 has wrong uuid" and "pivot_root: No such file or directory". Searching with Google I found a lot of messages, but none of these was very helpful to me.

Atfer a few tries (and complete reinstallations) I have discovered that apparently the installation failed to create both the files /etc/mdadm/mdadm.conf and /etc/raidtab . I created both after installing the base system and before installing grub. The contents are:

/etc/mdadm/mdadm.conf:
DEVICE partitions
ARRAY /dev/md1 level=raid1 num-devices=2 devices=/dev/sda6,/dev/sdb6
ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/sda1,/dev/sdb1
MAILADDR log@log.meles.net

/etc/raidtab:
raiddev /dev/md0
nr-raid-disks 2
raid-level 1
persistent-superblock 1
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1

raiddev /dev/md1
nr-raid-disks 2
raid-level 1
persistent-superblock 1
device /dev/sda6
raid-disk 0
device /dev/sdb6
raid-disk 1

Afterwards, I unmounted both partitions:
umount /target/home
umount /target

and stopped the RAID partitions:
mdadm --stop /dev/md/0
mdadm --stop /dev/md/1

Then I reinitialized the RAID superblocks:
mdadm --zero-superblock /dev/scsi/host0/bus0/target0/lun0/part1
mdadm --zero-superblock /dev/scsi/host0/bus0/target0/lun0/part6
mdadm --zero-superblock /dev/scsi/host0/bus0/target1/lun0/part1
mdadm --zero-superblock /dev/scsi/host0/bus0/target1/lun0/part6

started the RAID partitions:
mdadm --run /dev/md/0
mdadm --run /dev/md/1

and remounted the partitions:
mount /dev/md/0 /target
mount /dev/md/1 /target/home


After this I restarted the mdadm configuration:
dpkg-reconfigure mdadm

and strange enough, this time the entries in the /etc/mdadm/mdadm.conf were created (as duplicates).

I completed the installation by making the installation of grub in the master boot record, and then the system booted - successfully!

While working on this, I have made some notes about the rescue mode of the Sarge installation CD. You can find these on a separate page.

Unfortunately, the Sarge installation disks has no rescue mode like it had the Woody installation CD, so I needed the installation system - using bootp/TFTP as configured previously. It is not very comfortable, but you need to make all steps manually (select country, keyboard, detect NIC, configure the network and load installer components from the internet) until all your hardware is detected and configured properly. Please pay attention when partitioning the disks. You can confirm the actual partition scheme, but then you need to reconfigure the RAID devices. Select the correct devices to add to the array, and select the correct file system and mount point.
The installation system will then make them available under /target. With the command
chroot /target
you can access your installed system, but again: please wait until the RAID is synchronized because every write operation is very, very slow. It is recommended to add the proc filesystem after the chroot with
mount -tproc none /proc
The installation system is using parted, not fdisk, for partitioning, so you will not find your disk devices under /dev/sda or /dev/hda, but under /dev/ide/host0/bus0/lun0/disc for IDE disks and /dev/scsi/host0/bus0/target0/lun0/disc for SCSI drives. When you use part1, part2 and so forth instead of disc, you cann access the partitions. On my Econel, I needed to zero out the md superblocks with the following commands:
mdadm --zero-superblock /dev/scsi/host0/bus0/target0/lun0/part1
mdadm --zero-superblock /dev/scsi/host0/bus0/target0/lun0/part6
mdadm --zero-superblock /dev/scsi/host0/bus0/target1/lun0/part1
mdadm --zero-superblock /dev/scsi/host0/bus0/target1/lun0/part6

It seems that the installation has made more errors than expected, because the /etc/mdadm/mdadm.conf was not created, and the /boot/grub/menu.lst had incorrect contents (using /dev/hda as root device instead of /dev/md0 as ist should be).

My /etc/mdadm/mdadm.conf file has the following (correct) contents:
DEVICE partitions
ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/sda1,/dev/sdb1
ARRAY /dev/md1 level=raid1 num-devices=2 devices=/dev/sda6,/dev/sdb6 MAILADDR log@log.meles.net

After correcting the /etc/mdadm/mdadm.conf file and the /boot/grub/menu.lst file I zeroed aut the md superblocks and then started the reinitialization the mdadm:
dpkg-reconfigure mdadm

It would be a good idea to create a boot diskette after these steps.

I have received an email from John Plate (john at infotek dot dk) that found my notes helpful for his own installation but he liked to add the following to this documentation:

  • set the BIOS to enable "boot over network" option
  • don't use a tftpd machine with Shorewall firewall - its block tftp traffic
  • use the atftpd version
  • when the Econel has received the pxelinux.0 file, the BIOS boot options have a new pxe option added. That one should be the first choise.