where and how to put stage1 and stage2 on single floppy?

If you are new to development, plan on spending some time here before visiting the other forums.

Moderator: Moderators

where and how to put stage1 and stage2 on single floppy?

Postby raynesax » Fri Oct 01, 2010 7:38 am

Hello Sir,
I'm a beginner in OS development.I've read your tutorials on bootloader.Now i want to know that where(and how) to put my stage1 and stage2 of bootloader on floppy.Also i don't own a floppy drive.I'm using Ubuntu 10.04(Linux).Please help...
raynesax
 
Posts: 1
Joined: Fri Oct 01, 2010 7:31 am

Re: where and how to put stage1 and stage2 on single floppy?

Postby pathos » Fri Oct 01, 2010 1:43 pm

raynesax wrote:Hello Sir,
I'm a beginner in OS development.I've read your tutorials on bootloader.Now i want to know that where(and how) to put my stage1 and stage2 of bootloader on floppy.Also i don't own a floppy drive.I'm using Ubuntu 10.04(Linux).Please help...


Hopefully someone else can come along and help you (I can't =(, sorry), but until then, check this out: http://wiki.osdev.org/Loopback_Device#Creating_an_image. It may do what you need.
pathos
Moderator
 
Posts: 97
Joined: Thu Jan 10, 2008 6:43 pm
Location: USA

Re: where and how to put stage1 and stage2 on single floppy?

Postby xilvium » Mon Nov 22, 2010 12:13 pm

Hello Raynesax,

I myself also use linux and I use this code to put my bootloader on a floppy:
Code: Select all
dd if=boot.bin bs=512 of=/dev/fd0

I DO have a floppy drive thats what this code is aimed for!
But you could create a empty floppy image and mount it and then write to it :)

Here's a little example (Taken from James Molloy's website)
You need /sbin in your $PATH for losetup to work!
Code: Select all
sudo losetup /dev/loop0 floppy.img
sudo mount /dev/loop0 /mnt
sudo cp src/kernel /mnt/kernel
sudo umount /dev/loop0
sudo losetup -d /dev/loop0


This script is ofcourse for his tutorial series but with the code I gave you earlier you could write them together and work that way :)
Hope I was of any help!
xilvium
 
Posts: 13
Joined: Sat Feb 14, 2009 3:13 pm


Return to Beginners

Who is online

Users browsing this forum: No registered users and 1 guest

cron