OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 3:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: How to Make a GRUB Image...
PostPosted: Wed Apr 07, 2004 11:00 pm 
hi again....

     I just compiled GRUB on RH9 and I was wondering how to create an Image file that I could  copy to a floppy disk to load my kernel.. can anyone give me instructions on how to do this?... thanks


Top
  
 
 Post subject: RE:How to Make a GRUB Image...
PostPosted: Wed Apr 07, 2004 11:00 pm 
http://www.openbg.net/sto/os/xml/grub.html
http://www.osdever.net/tutorials/grub.php?the_id=5

Gnome


Top
  
 
 Post subject: RE:How to Make a GRUB Image...
PostPosted: Sat May 01, 2004 11:00 pm 
BTW you don't necessarily need a floppy disk... you can just use a loop device with the image and BOCHS.

- Esa


Top
  
 
 Post subject: RE:How to Make a GRUB Image...
PostPosted: Sat May 01, 2004 11:00 pm 
I did it by creating a flopp using grub-install and directing it to the floppy. Create another floppy with the stage1 and stage2 files on it, as per step 1 in the article on http://www.mega-tokyo.com/osfaq2/index. ... 20in%20one. Skip step 2... it doesn't work, or didn't for me and grub-install is far easier. Boot of the first disk with the grub install, then follow step 3 in the above article. Boot into your usual O/S then added the menu.cfg file to your flopp and fill it out as per directions in the tutorail above. Works great.


Top
  
 
 Post subject: RE:How to Make a GRUB Image...
PostPosted: Sun May 02, 2004 11:00 pm 
If you want to make a GRUB floppy image to use with
Bochs here is how I did it...

1. making an unformatted GRUB floppy image
  (you can find this information in many online tutorials)

2. making OS floppy image
  compile and link your OS
  make an empty directory for loop device mounting
  make an empty unformatted floppy image bximage
    run bximage with no arguments
      enter "fd"
      accept default [1.44]
      enter "img/your.img"
  use su to get root privileges
  create loop device /dev/loop0 from the floppy image
    "losetup /dev/loop0 your.img"
  format the floppy image with mkdosfs
    "mkdosfs /dev/loop0"
  mount the floppy image and copy your files into the image
    "mount /dev/loop0 [floppy-mount-directory]"
  unmount the floppy image
    "umount [floppy-mount-directory]"
  destroy the loop device
    "losetup -d /dev/loop0"
  exit su with exit
  run bochs with the unformatted GRUB image
    switch the floppy drive image to your.img
    type into the grub:
      "root (fd0)"
      "setup (fd0)"
    after GRUB completes the commands quit bochs

and voila! its done...
you should have a floppy image that has GRUB for booting...

- Esa


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot], Majestic-12 [Bot] and 111 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group