2018-09-27 07:55:24 +02:00
|
|
|
#!/bin/bash
|
2018-09-27 11:13:27 +02:00
|
|
|
dd if=/dev/zero of=harddisk.img count=10 bs=1048576
|
|
|
|
parted -s -a cylinder harddisk.img mklabel msdos
|
|
|
|
parted -s -a cylinder harddisk.img mkpart primary ext2 63s 10M
|
|
|
|
parted -s -a cylinder harddisk.img toggle 1 boot
|
2018-09-27 07:55:24 +02:00
|
|
|
lo=`losetup -f`
|
|
|
|
echo ${lo}
|
2018-09-27 11:13:27 +02:00
|
|
|
losetup -P ${lo} harddisk.img
|
2018-09-27 07:55:24 +02:00
|
|
|
mkfs.ext2 ${lo}p1
|
|
|
|
mount ${lo}p1 /mnt
|
2019-01-12 20:46:00 +01:00
|
|
|
grub-install --no-floppy --install-modules="biosdisk part_msdos ext2 configfile normal linux vbe png gfxmenu video video_colors video_cirrus video_fb" --boot-directory=/mnt/boot ${lo} --target=i386-pc
|
|
|
|
echo -en "\
|
|
|
|
insmod ext2
|
|
|
|
insmod biosdisk
|
|
|
|
insmod part_msdos
|
|
|
|
insmod linux
|
|
|
|
insmod vbe
|
|
|
|
insmod gfxterm
|
|
|
|
insmod png
|
|
|
|
insmod font
|
|
|
|
set timeout=4\n\
|
|
|
|
set default=0\n\
|
|
|
|
menuentry "cos2000" {\n\
|
|
|
|
set root=(hd0,1)\n\
|
|
|
|
linux /boot/system.sys\n
|
|
|
|
boot\n\
|
|
|
|
}" > /mnt/boot/grub/grub.cfg
|
2018-09-27 07:55:24 +02:00
|
|
|
umount /mnt
|
|
|
|
losetup -d ${lo}
|
2018-10-14 09:58:34 +02:00
|
|
|
#xz -c harddisk.img > harddisk.img.xz
|