Floppy Iamge creation on Ubuntu

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Atom
Posts: 10
Joined: Sun Apr 25, 2010 8:50 am
Location: Aracaju,Brazil

Floppy Iamge creation on Ubuntu

Post by Atom »

mI'm reading the JamesM's kernel development tutorials,however what's the program that i can make my floppy image with GRUB?
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Floppy Iamge creation on Ubuntu

Post by NickJohnson »

You loopback mount (mount -o loop) a 1.44 MB file formatted as FAT, then install grub where it is mounted. The file is then a usable floppy image.
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: Floppy Iamge creation on Ubuntu

Post by Tosi »

To setup a loopback device you need to first create a blank image. Once you set that up, use mkdosfs if you want a FAT, or mke2fs if you want ext2 for example.

Luckily, there's a whole article on the wiki about it, and it's even linked to from the Main Page.
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Re: Floppy Iamge creation on Ubuntu

Post by Ready4Dis »

To create it, you simply:

dd if=/dev/zero of=floppy.img bs=512 count=2800

This will create an image, called floppy.img that is 1.4mb. After that, you can do the loopback mount, and start adding stuff to it (again, you can keep using dd to write something like your bootsector to it, or install grub, etc).
Post Reply