Making a GRUB Flux OSKit bootdisk

  1. Become root.

  2. First, you need to make a GRUB install disk. To do this, put a new floppy in the drive, and from linux, do the following:
             bash% cd /boot/grub
             bash% dd if=stage1 of=/dev/fd0 bs=512 count=1
             bash% dd if=stage2 of=/dev/fd0 bs=512 seek=1
             
  3. Second, you need to create your flux kernel bootdisk. Assume you want to boot into the kernel hello, which you've compiled and put in /boot/hello on your linux machine. Put in a new floppy in the drive (i.e., take out the GRUB install disk and put it aside), and do:
             bash% mke2fs -N 32 /dev/fd0
             bash% mount /dev/fd0 /mnt/floppy
             bash% mkdir /mnt/floppy/boot
             bash% mkdir /mnt/floppy/boot/grub
             bash% cp /boot/grub/stage1 /mnt/floppy/boot/grub
             bash% cp /boot/grub/stage2 /mnt/floppy/boot/grub
             bash% cp /boot/hello /mnt/floppy/boot/grub
             bash% cat > /mnt/floppy/boot/grub/menu.lst
             timeout=10
             default=0
    
             # Entry 0:
             title= floppy
             root= (fd0)
             kernel= /boot/hello
             ^D
    
             bash% sync && umount mnt/floppy
             
  4. Take out your kernel bootdisk, and replace it with your GRUB install disk. Reboot your machine; the GRUB install disk should load. When you see the prompt, take out the install disk and replace it with your kernel bootdisk. Run the following:
             grub> root (fd0)
               Filesystem type unknown, using whole disk
    
             grub> setup (fd0)
               Checking if "/boot/grub/stage1" exists... yes
               Checking if "/boot/grub/stage2" exists... yes
               Running "Install /boot/grub/stage1 d (fd0) /boot/grub/stage2 p /boot/grub/menu.lst"... succeeded
             Done.
             
  5. Your kernel bootdisk is now ready! Reboot the machine into it, and all should be well.