Creating a boot floppy disk

From MEPIS Documentation Wiki

Jump to: navigation, search

How to create a GRUB diskette:

  1. Type "kdesu kwrite" in "Run Command" and enter the root password.
  2. Copy the following code into kwrite windows:
#!/bin/sh 
# 
# This script formats the floppy and writes the current grub configuration to floppy. 
# A write-enabled floppy must be in the drive.  Its present contents will be lost.
# 
mkfs.ext3 /dev/fd0 
mount /dev/fd0 /mnt/floppy 
cd /mnt/floppy 
mkdir boot 
cd boot 
mkdir grub 
cd /boot/grub 
cp * /mnt/floppy/boot/grub
umount /dev/fd0 
grub --batch --device-map=/dev/null <<EOF 
device (fd0) /dev/fd0 
root (fd0) 
setup (fd0) 
quit 
<<EOF

Then: File -> Save as -> /sbin/makegrubfloppy

Next, make the file executable:

  1. Open konqueror as root (File Manager - Super User Mode)
  2. Right click on /sbin/makegrubfloppy file and select Properties
  3. Select the Permissions tab of the Properties dialog
  4. Click on the check box for Is executable
  5. Click OK
  6. Close File Manager (konqueror)

Alternatively, you can make it executable in konsole:

su (enter root password)
chmod +x /sbin/makegrubfloppy

You can now insert a floppy disk into the drive, open KMenu > System > Terminal - Super User Mode and execute the command makegrubfloppy to create a bootable floppy disk that will provide exactly the same boot menu you have when booting from your hard drive.

Personal tools
In other languages