Currently I am using the following method in my makefile:
Code: Select all
floppy.img: kernel.bin
#@cat ./grub/stage1 ./grub/stage2 ./grub/pad kernel.bin > ./image/floppy.img
So, I'm trying to use a shell script that uses a loopback device. This is my script:
I then try to boot the image with bochs I have a bochsrc.txt file in the same directory as the image which is as follows:echo "mypasswordbutthisisnotit" | sudo -S dd if=/dev/zero of=./image/floppy.img bs=512 count=2880
sudo losetup /dev/loop0 ./image/floppy.img
sudo mkfs -t ext2 /dev/loop0
sudo mount -t ext2 /dev/loop0 ./image/floppy/
sudo mkdir -p ./image/floppy/grub/boot/
sudo cp ./grub/stage1 ./image/floppy/grub/boot/stage1
sudo cp ./grub/stage2 ./image/floppy/grub/boot/stage2
sudo cp ./grub/menu.lst ./image/floppy/grub/boot/menu.lst
sudo cp kernel.bin ./image/floppy/kernel.bin
sudo umount /dev/loop0
Code: Select all
boot: floppy
floppya: 1_44="floppy.img", status=inserted
The same bochsrc.txt file allows me to boot Bran's kernel image which you can download at the end of the tutorial.
Also, I've never been able to get the loopback method to work manually (i.e. typing the comands at the terminal myself). I'm a bit stuck.
Your wonderful help and advice would be very welcome.
Cheers,
Puffy



