Home
Projects
Downloads
About me
Lang
HR EN

mkbootdisk-loop

NAME
mkbootdisk-loop - Shell script for generating boot floppy image

SYNOPSIS
mkbootdisk [ --mkinitrdargs args ] [ --device devicefile ] [ --loop ] [ --compact ] [ --kernelargs args ] kernel

DESCRIPTION
Mmkbootdisk is a shell script which usually comes with RedHat and RedHat-like distributions of Linux. Mkbootdisk creates a stand-alone boot floppy for the running system which can be used for booting the system if something bad happens.
Original mkbootdisk which comes with RedHat distribution of Linux was unable to make the image file on the disk instead of creating boot floppy on-the-fly. I had one computer with broken floppy controller and I needed that feature in mkbootdisk. I have modified RedHat's mkbootdisk in order to support creating image on the disk when --loop parameter is used. I named it mkbootdisk-loop to prevent confusing with original mkbootdisk from RedHat. Based on experience I can say that --loop parameter is rarely needed but when you need it, you need it desperately.
Image created with this script contains ramdisk which can load necessary SCSI modules. The script will look for rootfs in /etc/fstab file. The only argument required for normal script execution is version of kernel we want to put into image.

SCREENSHOTS
There is no need for screenshots but the usual output look like this:

First, with help of /dev/zero we will create file with size of 1440k:
# dd if=/dev/zero of=image_file.img bs=1440k count=1
1+0 records in
1+0 records out
And then we can run mkbootdisk-loop:
# mkbootdisk-loop --noprompt --device image_file.img --loop 2.4.25

This is the output without --noprompt option, don't let yourself confused by "Insert a disk..." line:
# mkbootdisk-loop --device image_file.img --loop 2.4.25
Insert a disk in image_file.img. Any information on the disk will be lost.
Press <Enter> to continue or ^C to abort:

DOWNLOAD
mkbootdisk-loop download

OPTIONS
--device devicefile
Boot image will be created on device defined by this option. If --device is not defined, /dev/fd0 will be used. --device does not have to be floppy, it can also be an image file. This is very useful in case when --loop option is used.
--loop imagefile
If --loop argument is used, boot image will be copied into image file instead into floppy. Before using --loop option you will have to create image file by hand. For example, if you want to create an image file of 1.44M, you can create this file by using command like this:
dd if=/dev/zero of=imagefile bs=1k count=1440
--mkinitrdargs args
This option will pass the list of arguments to mkinitrd program which is used to create initrd image. Any mkinitrd argument may be specified.
--noprompt
Normally, mkbootdisk-loop instructs the user to insert a floppy and waits for confirmation before continuing. If --noprompt is specified, no prompt is displayed.
--verbose
This option instructs mkbootdisk-loop to write out information about what it's doing. Normally, there is no output from mkbootdisk-loop.
--version
Displays the version of mkbootdisk-loop and exits.
--compact
Use the "compact" argument with lilo program which is used in the script.
--kernelargs args
This option adds defined list of arguments to the kernel command line.

BUGS
Current version of mkbootdisk-loop does not contain known bugs.

FILES
/etc/fstab - in this file script will look for rootfs

SEE ALSO
mkinitrd(1)

AUTHORS
Erik Troan ewt@redhat.com - original author
Josip Deanovic djosip@linuxpages.org - added --loop option