Page 1 of 1

i made a GRUB image without a floppy ...

Posted: Wed Feb 04, 2004 7:49 am
by Pype.Clicker
for all who wonder how they will OS'dev on their floppyless laptop/imac/pda/whatever, here is *one* solution ...

1. have GRUB tools installed on your host system (this should come with /usr/sbin/grub and the stage1, stage2, etc. files ... )
I had my own stage1, etc. files from an archive named grub-0.92-i386-pc.tar.gz

2. create an empty file of 1.44MB with

Code: Select all

head --bytes=1474560 /dev/zero > grubfd.img
mkdir looppoint
3. become super-user and

Code: Select all

mke2fs grubfd.img
mount grubfd.img looppoint/ -o loop -t ext2
4. create looppoint/boot/grub and copy all the files under your reference /boot/grub there ...

5. umount the looppoint
6. create a 'fake-device.map' file in which you will tell

Code: Select all

(fd0) /dev/loop3
7. invoke '/usr/sbin/grub --device-map=fake-device.map'
8. once in the GRUB shell, issue the following commands:

Code: Select all

device (fd0) grubfd.img
root (fd0)
setup (fd0)
quit
and voil?! your grubfd.img should now be bootable under bochs or any other PC emulator ;)

let me know if it works for you ...

Re:i made a GRUB image without a floppy ...

Posted: Wed Feb 04, 2004 11:21 am
by df
im writing up a tut for the wiki faq on using images on windows/linux/freebsd/macosx.

Re:i made a GRUB image without a floppy ...

Posted: Wed Feb 04, 2004 3:08 pm
by Solar
In the meantime, you might want to point your browser at http://www.pro-pos.org/downloads/grub_disk.zip and download a disk image with GRUB preinstalled. ;-)

I'll try to keep that link updated whenever new GRUB releases appear; currently it's 0.94.

Re:i made a GRUB image without a floppy ...

Posted: Wed Feb 04, 2004 3:13 pm
by df
preliminary image thing is up... am busy but it needs expanding..
scroll down the bottom....

http://www.osdev.org/osfaq2/index.php/HomePage

Re:i made a GRUB image without a floppy ...

Posted: Sat Feb 07, 2004 9:42 am
by drizzt
I use this bash script to create a floppy image with GRUB.

To use this script you need the MTOOLS package and if you allow a user to execute GRUB shell you can create the floppy image without become super-user...

NOTE: first of all you have to configure the GRUB directory (where are the files stage1, stage2 and menu.lst) into the script.



[attachment deleted by admin]