Sunday, July 1, 2012

Getting Fedora-17 ARM images to understand booting LVM volumes

In order to get your uInitrd to understand booting from a LVM volume, you need to regenerate the initramfs and uInitrd images with the LVM bits.  To do so, follow these steps (substitute your versions as necessary):
  1. Install LVM (yum -y install lvm2)
  2. Update initramfs image (in /boot run dracut -f initramfs-3.3.6-3.fc17.armv5tel.kirkwood.img 3.3.6-3.fc17.armv5tel.k
    irkwood)
  3. Update uInitrd image (in /boot/uboot run mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/ini
    tramfs-3.3.6-3.fc17.armv5tel.kirkwood.img uInitrd-kirkwood)
So now you're wondering how to do this if you don't already have a running system?  Well, in theory you can run dracut and mkimage from a host system, but I've been unsuccessful getting a working image that way.  So to create my bootstrap uInitrd, I built a throwaway system, then used uInitrd to boot my LVM enabled system. 

The easiest approach would be to do the above steps, the move the boot media to a another computer, and copy the root filesystem to a temporary file, delete the partition with the root filesystem, and add it to a volume group (as a PV) and create a LV and copy the root filesystem back.  It sounds complicated but it's not.

No comments:

Post a Comment