This is what I did:
>Use the mkfs.vfat command to create the file floppy.img under ~/Documents/floppy
>Use nasm Compile the boot.asm file and give me boot.bin
> Then I ran this command: dd if = boot.bin of =~/ Documents / floppy / floppy.img bs = 512 count = 1
< p>So, I have the floppy disk image of the first stage bootloader. When using qemu to start, it works fine.
However, after I create the second stage bootloader, (if I am correct ) I will have to install floppy.img and copy stage 2 to the installed file system. In this case, how to use qemu to boot the installed floppy? Is it even possible? If not, how do I use the second stage bootloader.
Please forgive me for any stupid assumptions/questions because I am a newbie.
mount -oloop ~/Documents/floppy.img /mnt/floppy
Copy stage2:
< p>
cp stage2.bin /mnt/floppy
Remove it:
umount /mnt/floppy
and start it with QEMU:
qemu -fda ~/Documents/floppy.img
Look!
I have been reading BrokenThorn’s operating system development tutorial, I am creating and loading the second stage boot loader. This tutorial is for Windows, but I am on Linux (Ubuntu 13.04).
This is what I did:
>Use the mkfs.vfat command to create the file floppy.img under ~/Documents/floppy
>Use nasm to compile the boot.asm file and give me boot.bin
> Then I ran this command: dd if = boot.bin of =~/ Documents / floppy / floppy.img bs = 512 count = 1< /p>
So, I have the floppy disk image of the first stage bootloader. When using qemu to start, it works fine.
However, after I create the second stage bootloader, (if I am correct) I will have to install floppy.img and copy stage 2 to the installed file system. In this case, how do I use qemu to boot the installed floppy? Is it even possible? If not, how do I use the second stage bootloader.
Please forgive me for any stupid assumptions/questions because I am a newbie.
Where is your problem? You mount the image:
mount -oloop ~/Documents/floppy.img /mnt/floppy
Copy stage2:
< p>
cp stage2.bin /mnt/floppy
Remove it:
umount /mnt/floppy
and start it with QEMU:
qemu -fda ~/Documents/floppy.img
Look!