OSDev.org
https://forum.osdev.org/

Bootable iso image floppy disk question [solved]
https://forum.osdev.org/viewtopic.php?f=1&t=33427
Page 1 of 1

Author:  saltlamp [ Thu Jan 10, 2019 3:45 pm ]
Post subject:  Bootable iso image floppy disk question [solved]

Hello, everyone.

I was checking out the osdev wiki to see what kind of information that it had about building bootable image files, and whilst reading the Article about Mkisofs, I found this line,

Quote:
First you need to build a bootable floppy image which holds f. ex. grub with your menu.lst and your kernel (and additional required modules).


And then I find these lines,

Quote:
Then, you put this boot floppy image in a temporary directory, say as /tmp/deploy/boot.img.

After that, you copy all your additional files (applications, images, texts, directories too) into the given directory (f. ex. /tmp/deploy).


Now I have several questions, because I am not quite understanding this.

1) Does this supposed floppy disk image have to be 1.44MB? Can it be any other size?

And probably for the biggest question that I have right now,

2) It claims that you need to add the additional files to the temp directory, but then it says to add the kernel stuff and whatnot onto the floppy disk image. I am confused at what it is telling me. Can I put the kernel and 'other modules' in the temp directory and just use the floppy image for 'stage1', I guess you could say, boot code, and then use the temp directory as the stage2 boot files, kernel, etc? And why does it say that the kernel and 'other modules' need to be in the floppy image? Am I not understanding here?

Thanks!

Author:  Octocontrabass [ Fri Jan 11, 2019 4:27 am ]
Post subject:  Re: Bootable iso image floppy disk question

saltlamp wrote:
1) Does this supposed floppy disk image have to be 1.44MB? Can it be any other size?

According to the El Torito specification, the supported sizes for emulated floppy disks are 1.2MB, 1.44MB, and 2.88MB. Of course, firmware is stupid and might only work correctly with 1.44MB.

saltlamp wrote:
2) It claims that you need to add the additional files to the temp directory, but then it says to add the kernel stuff and whatnot onto the floppy disk image. I am confused at what it is telling me. Can I put the kernel and 'other modules' in the temp directory and just use the floppy image for 'stage1', I guess you could say, boot code, and then use the temp directory as the stage2 boot files, kernel, etc? And why does it say that the kernel and 'other modules' need to be in the floppy image? Am I not understanding here?

That example assumes you're using a bootloader that only works with floppy disks. If you're using a bootloader that works with CDs, then you can put the files wherever you want. (But if you're using a bootloader that works with CDs, why bother with floppy disk emulation?)

Author:  saltlamp [ Fri Jan 11, 2019 3:00 pm ]
Post subject:  Re: Bootable iso image floppy disk question

Octocontrabass wrote:
saltlamp wrote:
1) Does this supposed floppy disk image have to be 1.44MB? Can it be any other size?

According to the El Torito specification, the supported sizes for emulated floppy disks are 1.2MB, 1.44MB, and 2.88MB. Of course, firmware is stupid and might only work correctly with 1.44MB.

saltlamp wrote:
2) It claims that you need to add the additional files to the temp directory, but then it says to add the kernel stuff and whatnot onto the floppy disk image. I am confused at what it is telling me. Can I put the kernel and 'other modules' in the temp directory and just use the floppy image for 'stage1', I guess you could say, boot code, and then use the temp directory as the stage2 boot files, kernel, etc? And why does it say that the kernel and 'other modules' need to be in the floppy image? Am I not understanding here?

That example assumes you're using a bootloader that only works with floppy disks. If you're using a bootloader that works with CDs, then you can put the files wherever you want. (But if you're using a bootloader that works with CDs, why bother with floppy disk emulation?)


Ah, okay, I believe I see now. I haven't seen the entire wiki, so I don't know if this was explained before I found those lines, but if not, I think that the wiki should be more specific, because holy hell, that was confusing. I was almost starting to think that it was that way yesterday, but I wasn't sure, so I needed to ask.

One more quick question, if you don't mind. If I remember correctly, I was reading a Stack Overflow question about this very subject yesterday, and one of the answers said that if you write the image file with the flag '-no-emu-boot', it disables the use of BIOS interrupts, because it's not being emulated as a floppy disk or a hard disk. Is this even correct? I don't think it is, yet not every source that I read on this subject is consistent.

Anyway, thank you, sir, and good luck on your future projects!

Author:  Octocontrabass [ Sat Jan 12, 2019 3:30 am ]
Post subject:  Re: Bootable iso image floppy disk question

saltlamp wrote:
If I remember correctly, I was reading a Stack Overflow question about this very subject yesterday, and one of the answers said that if you write the image file with the flag '-no-emu-boot', it disables the use of BIOS interrupts, because it's not being emulated as a floppy disk or a hard disk. Is this even correct?

Of course not. The El Torito specification explains which BIOS interrupts you can use to access the CD in no-emulation mode.

Author:  saltlamp [ Sat Jan 12, 2019 3:33 pm ]
Post subject:  Re: Bootable iso image floppy disk question

Octocontrabass wrote:
saltlamp wrote:
If I remember correctly, I was reading a Stack Overflow question about this very subject yesterday, and one of the answers said that if you write the image file with the flag '-no-emu-boot', it disables the use of BIOS interrupts, because it's not being emulated as a floppy disk or a hard disk. Is this even correct?

Of course not. The El Torito specification explains which BIOS interrupts you can use to access the CD in no-emulation mode.


Alright, I understand now. Again, thanks.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/