bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booting floppy images?


From: Eduardo Nahum Ochs
Subject: Re: Booting floppy images?
Date: Mon, 16 Oct 2000 00:36:17 -0200

> > Is there a way to boot floppy images with Grub, like most modern
> > BIOSes can do with the floppy images in bootable CD-ROMs?
> 
>   Floppy emulation is possible, only if your OS uses BIOS calls to
> access a floppy. So the real operating systems (such as GNU/Hurd)
> cannot boot in such a way.
> 
>   If you want to boot operating systems on a virtual disk, use PC
> emulators, such as Bochs.
> 
> Okuji

Sorry, I think I have expressed myself badly.

It is not the OS (e.g., the Hurd) that loads its own kernel
(gnumach.gz) and modules (serverboot.gz); it is the bootloader that
does that, and after loading and unpacking these files at the right
places the control is passed to the kernel.

Linux also allows for another file besides the kernel to be read
during the boot; this file (the "initrd") is treated as a ram disk,
and it is used at least for installation and rescue floppies to mount
a minimal filesystem. Most Linux installation CDs for i386s come with
a floppy image recorded in a certain way in the CD (using the El
Torito spec) and most modern BIOSes are able to change the behaviour
of the int 0x13 BIOS functions to make them read data from this floppy
image, as if it was a real floppy, and I know that at least Linux boot
floppies that use LILO or syslinux to boot work without changes when
recorded in El Torito CDs. I would guess that it is the same for the
three free BSDs, but I don't know enough about what goes into their
boot floppies. I have never tested using Grub in CDs, but I'm quite
sure that Grub works in CDs also (but just because I've never heard
any complaints about it not working :-).

I've found that one of the source files of etherboot --
mknbi-1.0/first-dos.S -- has code to replace the int 0x13 functions
with ramdisk functions, and I thought that it would be nice to add
something like that to Grub to let it act as a super "floppy image
chooser"; maybe we could even let Grub load images of Grub boot
floppies, and then the new Grub in the image would replace the old
one; that could be nice for testing Hurd installation floppies (when
someone manages to fit Grub+Hurd kernel+ramdisk in a 2.88 floppy
image) and to make Hurd CDs...

Maybe the right way to implement that would be to write a small
multiboot-compliant "kernel" to be loaded together with a floppy
image, that would then make the floppy image simulate a floppy...

I can start working on that, but I can't promise anything because my C
and assembly coding skills are rusty, to say the least. I just wanted
to check if there was something like that already implemented because
the idea of Grub doing that seemed so natural that I thought that
someone must had thought about that before...

  Cheers,
    Eduardo Ochs
    http://angg.twu.net/
    address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]