sudo kpartx -av 2014-12-24-wheezy-raspbian.img sudo mkdir /mnt/loop0p2 sudo mount /dev/mapper/loop0p2 /mnt/loop0p2 #sudo gedit /mnt/loop0p2/etc/udev/rules.d/90-qemu.rules sudo sed -ri "s/^.*libcofi_rpi.so/#\0/g" /mnt/loop0p2/etc/ld.so.preload echo 'KERNEL=="sda", SYMLINK+="mmcblk0" KERNEL=="sda?", SYMLINK+="mmcblk0p%n" KERNEL=="sda2", SYMLINK+="root"' | sudo tee --append /mnt/loop0p2/etc/udev/rules.d/90-qemu.rules sudo umount /mnt/loop0p2 sudo kpartx -d 2014-12-24-wheezy-raspbian.img