now make_qemu_img creates bootable images

This commit is contained in:
KatolaZ 2016-06-13 01:21:02 +01:00
parent 5787cc14c4
commit 7a9cf9688a
1 changed files with 5 additions and 2 deletions

View File

@ -72,10 +72,13 @@ _install_bootloader(){
cat > ${devicemap} <<EOF
(hd0) /dev/loop0
(hd0,1) /dev/loop1
EOF
sudo cp ${devicemap} ${root}/boot/grub/device.map
sudo chroot ${root} grub-mkconfig -o /boot/grub/grub.cfg
## we now tamper with grub.cfg, to remove all references to
## loopback devices...
## FIXME!!! This is a hack...
sudo -- sed -r -i -e 's/.*loop.*//g' ${root}/boot/grub/grub.cfg
sudo grub-install --root-directory=${root} --no-floppy \
--modules="ext2 part_msdos" ${install_dev}