Dl380g3

Installing ZeroShell 1.0 beta 16 on a HP ProLiant DL380 G3 rack-mount server:

Requires:
1 blank CD
1 empty FAT32 formatted USB stick with at least 128MB
ZeroShell Beta 16 ISO
ZeroShell Beta 16 CompactFlash
ps_initrd.sh script

1. Burn ZeroShell beta 16 iso to cd, boot from cd.
2. Download the CompactFlash version of beta 16 and copy it to a usb stick.
3. Download ps_initrd and copy it to the usb stick.

The CD you have created contains the Smart Array drivers, which are only loaded after bootup. The logical volumes on the array can be accessed as /udev/cciss/c0d0 etc. Once one has a system booting from the array these device nodes are not created because the cciss driver has to be loaded really early. There may be some kind of penguin-foo that will allow the udev devices to be used throughout.

4. Creating device nodes:

mkdir /dev/cciss
mknod /dev/cciss/c0d0 b 104 0
mknod /dev/cciss/c0d0p1 b 104 1
mknod /dev/cciss/c0d0p2 b 104 2
mknod /dev/cciss/c0d0p3 b 104 3
mknod /dev/cciss/c0d0p4 b 104 4
mknod /dev/cciss/c0d0p5 b 104 5
mknod /dev/cciss/c0d0p6 b 104 6
mknod /dev/cciss/c0d0p7 b 104 7

5. Modifying the boot partition:

mkdir /mnt/usbdisk
mount /dev/sda1 /mnt/usbdisk

Copy the CompactFlash image to the Hard Disk Array

dd if=/mnt/usbdisk/ZeroShell-1.0.beta16-CompactFlash-IDE-USB-SATA-1GB.img.gz of=/dev/cciss/c0d0 bs=1M

Mount the boot partition

mkdir /mnt/boot
mount /dev/cciss/c0d0p1 /mnt/boot
cp /mnt/usbdisk/ps_initrd.sh /mnt/boot

Open initrd

cd /mnt/boot
./ps_initrd.sh initrd.gz open
cd initrd.gz-image

Recreate the device nodes

cd dev
mkdir /dev/cciss
mknod /dev/cciss/c0d0 b 104 0
mknod /dev/cciss/c0d0p1 b 104 1
mknod /dev/cciss/c0d0p2 b 104 2
mknod /dev/cciss/c0d0p3 b 104 3
mknod /dev/cciss/c0d0p4 b 104 4
mknod /dev/cciss/c0d0p5 b 104 5
mknod /dev/cciss/c0d0p6 b 104 6
mknod /dev/cciss/c0d0p7 b 104 7
cd..

Create directories for drivers, and copy in the cciss driver

mkdir -p lib/raid/chipsets
mkdir -p lib/raid/deps
cp /cdrom/modules/2.6.25.20/kernel/drivers/block/cciss.ko lib/raid/chipsets

Edit linuxrc and add the two new directories to the list to be used for loading modules

vi linuxrc
for M in  /lib/usb/deps/* /lib/sata/deps/* /lib/raid/deps/* ; do
   /sbin/insmod $M 2>/dev/null
done
for M in  /lib/usb/host/* /lib/sata/chipsets/* /lib/raid/chipsets/* ; do
   /sbin/insmod $M 2>/dev/null
done

Add the following scan of the cciss devices just after the loop which probes the USB and SATA devices

echo "Probing [$I] RAID Array devices to startup the system ..."
for N in 0 1 2 3 ; do
  if mount /dev/cciss/c0d${N}p2 /cdrom 2>/dev/null ; then
    DEV=cciss/c0d${N}p
    CDROM=$DEV
  fi
done

In the other mount commands in linuxrc, remove the mount type specification (-t iso9660) to allow the "cd" partition to be either a genuine iso9660 file system or any other type.

Tidy up

cd /mnt/boot
./ps_initrd.sh initrd.gz close

6. Modifying the CD and Profiles partitions:

Now we need to create a new root FS with cciss device nodes in /dev,
change the file system type for /cdrom, and doctor the storage-detection script to scan /dev rather than /udev.

The problem here is that the iso9660 CD file system (partition 2) is compressed and an ext3 partition needs to be about 500MB in size to contain the same data as the 174MB CD file system.

So backup the "CD" and Profiles partitions to the USB device:

mkdir /mnt/cd
mkdir /mnt/profiles
mount /dev/cciss/c0d0p2 /mnt/cd
mount /dev/cciss/c0d0p3 /mnt/profiles
cd /mnt/cd
tar cf /mnt/usbdisk/cd.tar .
cd /mnt/profiles
tar cf /mnt/usbdisk/profiles.tar .
umount /mnt/cd
umount /mnt/profiles

then use fdisk to repartition the Smart Array LV (this example has 1GB for the 'CD' partition and 3GB for Profiles)

fdisk /dev/cciss/c0d0p0
d 3
d 2
n p 2 <ENTER> +1GB
n p 3 <ENTER> +3GB
w

If after this the kernel still uses the old partition table you will need to reboot from CD (and recreate the cciss device nodes) before proceeding.

Create the new file systems and restore the backed-up data (note that the profiles volume needs to be labelled)

mkfs -t ext3 /dev/cciss/c0d0p2
mkfs -t ext3 /dev/cciss/c0d0p3
tune2fs -L Profiles /dev/cciss/c0d0p3
mount /dev/cciss/c0d0p2 /mnt/cd
mount /dev/cciss/c0d0p3 /mnt/profiles
cd /mnt/cd
tar xfBp /mnt/usbdisk/cd.tar
cd /mnt/profiles
tar xf /mnt/usbdisk/profiles.tar

Now mount the rootfs using ps_initrd

cd /mnt/cd/isolinux
/mnt/usbdisk/ps_initrd.sh rootfs open

Create cciss device nodes again, in the dev directory within rootfs-image.

Edit the storage scanning script (/mnt/cd/isolinux/rootfs-image/root/kerbynet.cgi/scripts/storage) and change all "/udev" references to "/dev".

Edit the fstab file (/mnt/cd/isolinux/rootfs-image/etc/fstab) and change the file system type of /cdrom from iso9660 to ext3. Also change the mount option from ro to rw if desired.

Close the rootfs, saving changes

cd /mnt/cd/isolinux
/mnt/usbdisk/ps_initrd.sh rootfs close

Reboot the system from disk.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License