create-bootable: use /mnt/morpheus as mountpoint

This commit is contained in:
Hiltjo Posthuma 2014-03-04 17:10:46 +01:00 committed by sin
parent 802de1b750
commit 1b466d4935

View File

@ -8,6 +8,7 @@ if test "$2" = ""; then
fi fi
root=$1 root=$1
img=$2 img=$2
mnt="/mnt/morpheus"
set -e -x set -e -x
@ -30,15 +31,16 @@ lodev=$(losetup -f)
losetup "$lodev" "$img" losetup "$lodev" "$img"
partition="$lodev"p1 partition="$lodev"p1
mkfs.ext2 -L MORPHEUS $partition mkfs.ext2 -L MORPHEUS $partition
mount $partition /mnt mkdir -p "$mnt"
rmdir /mnt/lost+found mount $partition "$mnt"
rmdir "$mnt/lost+found"
fakeroot cp -arP "$root"/* /mnt fakeroot cp -arP "$root"/* "$mnt"
extlinux --install /mnt/boot extlinux --install "$mnt/boot"
dd if=stuff/mbr.bin of=$lodev conv=notrunc bs=440 count=1 dd if=stuff/mbr.bin of=$lodev conv=notrunc bs=440 count=1
sync sync
umount /mnt umount "$mnt"
sleep 3 sleep 3
losetup -d $lodev losetup -d $lodev