mirror of
git://git.2f30.org/morpheus.git
synced 2024-06-28 15:11:22 +00:00
5ffd49a86d
Also rename pkgs/arch-rootfs to pkgs/emul. The create-bootable script still needs to be fixed to work with dash.
36 lines
528 B
Bash
Executable File
36 lines
528 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Ensure you've loaded the loop module with max_part=15
|
|
|
|
. ./prepare-env
|
|
|
|
img=morpheus-$arch-$version.img
|
|
|
|
dd if=/dev/zero of=$img bs=512M count=8
|
|
fdisk $img <<< '
|
|
o
|
|
n
|
|
p
|
|
1
|
|
|
|
|
|
a
|
|
1
|
|
w'
|
|
|
|
lodev=$(losetup -f --show $img) || exit 1
|
|
partition="$lodev"p1
|
|
mkfs.ext2 -L MORPHEUS $partition || exit 1
|
|
mount $partition /mnt || exit 1
|
|
rmdir /mnt/lost+found
|
|
|
|
fakeroot cp -arP root/* /mnt
|
|
extlinux --install /mnt/boot || exit 1
|
|
|
|
dd if=stuff/mbr.bin of=$lodev conv=notrunc bs=440 count=1
|
|
sync
|
|
|
|
umount /mnt
|
|
sleep 3
|
|
losetup -d $lodev
|