Thursday, December 11, 2014

Loading Debian Jessie onto the Lenovo ThinkServer RD330

This server has a firmware that will not let you disable the LSI software raid controller (boo!). I set the disk up within the software raid setup. Debian Wheezy didn’t detect the software array for me (using boot option dmraid=true). Debian Jessie detected it (again, using dmraid=true). It fails to write grub to the fake raid though. I used a usb disk for the install. You have to boot in EFI mode for the following to work.

The install is normal until you get to the bootloader. I chose not to install grub, opting for efi stub instead. Here is what I did:


  • run the installer, but choose not to install a bootloader, reboot back into the installer (again, EFI mode), and select the recovery option (booting with the dmraid=true option)
  • figure out what the root partition is on the disk, and mount it. chroot into it. mount the efi system partition to /boot/efi/
  • create the file ‘/etc/kernel/postinst.d/zz-update-efistub’, and add: 
#!/bin/sh 
cp -u /vmlinuz /initrd.img /boot/efi/EFI/debian

into it.


  • make it executable (chmod +x /etc/kernel/postinst.d/zz-update-efistub)
  • aptitude install efibootmgr
  • efibootmgr -c -g -L "Debian (EFI stub)" -l '\EFI\debian\vmlinuz' -u "root=/dev/sda2 ro quiet rootfstype=ext4 add_efi_memmap initrd=\\EFI\\debian\\initrd.img" -d /dev/sdb
    • I used a usb flash disk as the installer, and it was detected as /dev/sda. Our fake raid was detected as /dev/sdb, hence the need for specifying the device to use.

.