[Solved] kernel.bin->floppy img with GRUB

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
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

[Solved] kernel.bin->floppy img with GRUB

Post by LegendDairy »

Sorry for this nooby question, I am new to all this but please be patient :) .

I was reading this.( http://www.osdever.net/tutorials/brans- ... t-tutorial ) and at the end they link it to a kernel.bin, but they don't explain how they convert that to a nice floppy.img with GRUB. I've seen some ways but they all involve a real floppy drive which I don't have anymore :(. Is there a way to make that img without putting it directly on a real floppy.

I'm working on Linux(Ubuntu)
I'm using Qemu to emulate.

Ty.
Last edited by LegendDairy on Sun Nov 07, 2010 6:37 am, edited 1 time in total.
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: kernel.bin->floppy img with GRUB(Bran's Kernel Developme

Post by thepowersgang »

Since you are using ubuntu, you can use mtools to manipulate the disk image.

You will want to create a 1440KiB image, format it as FAT and install GrUB on it.
Then you can either loopback mount the image, or use mtools to copy your kernel to it
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: kernel.bin->floppy img with GRUB(Bran's Kernel Developme

Post by egos »

Replace kernel.bin and compile floppy.asc by fasm.

GrubOnFloppy.zip
GrubOnFloppy-198.zip
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

Re: kernel.bin->floppy img with GRUB(Bran's Kernel Developme

Post by LegendDairy »

Thanks but 1 last question what is the command form fasm with that floppy.asc file?And could I use nasm or should i install fasm?
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: kernel.bin->floppy img with GRUB(Bran's Kernel Developme

Post by egos »

Text of floppy.asc is fasm specific. Use fasm.

Code: Select all

fasm floppy.asc floppy.img
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

Re: kernel.bin->floppy img with GRUB(Bran's Kernel Developme

Post by LegendDairy »

oke sorry but how do I install fasm in ubuntu???
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: kernel.bin->floppy img with GRUB(Bran's Kernel Developme

Post by egos »

Unpack executable file from distribution package. I think that's enough :)
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

Re: kernel.bin->floppy img with GRUB(Bran's Kernel Developme

Post by LegendDairy »

NVM after a long time of google'ing I found a deb file to install ty for everything :)

If someone is interested: here's the link to the "fasm.deb" file:
http://code.google.com/p/fasmdeb/downlo ... b&can=2&q=
Post Reply