Comment 4 for bug 44609

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : RAID support can be implemented in Ubiquity with simple patch

RAID support can be implemented in Ubiquity with simple 3-part patch - I just installed Ubuntu 8.04 LiveCD based Baltix distro into software RAID devices:

1. /lib/partman/init.d/30parted should report /dev/md* devices to Ubiquity - line "grep -v '^/dev/md' | " should be removed from 30parted file. I've commented out this line with:
sed -i "s,\( *grep -v '^/dev/md' |\),#\1," /lib/partman/init.d/30parted

2. Sofware RAID volumes (devices) should be visible, ideally this should be implemented in manual partitioning step of Ubiquity. Currently I've executed these commands:
mdadm --create /dev/md0 --level=1 --raid-disks=2 /dev/sda1 /dev/sdb1
mdadm --create /dev/md1 --level=1 --raid-disks=2 /dev/sda2 /dev/sdb2

3. /target system should have mdadm package installed before initrd and grub-install are executed in /target . I'm suggesting to include mdadm package in CD's pool folder and patch Ubiquity to automatically install mdadm into /target if user decided to install Linux into md device (/dev/md* are assigned to one or more folders).
If mdadm package isn't in /target when Ubiquity executes grub-install then Ubiquity finishes installation at 94% with fatal error:
grub-installer: info: Running chroot /target grub-install --no-floppy "(hd0)"
grub-installer: /usr/sbin/grub-install: 446: mdadm: not found
grub-installer: : mdadm -D /dev/md0 failed
grub-installer: Searching for GRUB installation directory
 ... found: /boot/grub
grub-installer: The file /boot/grub/stage1 not read correctly.
grub-installer: error: Running 'grub-install --no-floppy "(hd0)"' failed.

Currently I solved this problem simply by executing this command after Ubiquity installs language packs (at ~85%):
sudo chroot /target/ apt-get install mdadm