Caution: The "dd if=... of=... bs=1k count=..." instruction can write to your anywhere on your hard disk system, including your master boot record. You will probably need to be the root user when using it, and as such you can really mess up your system if you are careless or hasty.

If possible, you should already have made a boot disk set based on rote instructions that came with your Linux distribution.

Craig Van Degrift / craig@yosemitefoothills.com / content last revised December 22, 1999

The Simplest (and least useful) Boot Diskette

It turns out that the Linux kernel comes already setup for a direct boot. It has a boot sector as its first 512 bytes, and more boot setup code in the next 2048 bytes that load and transfer control over to the main kernel code. Thus if your kernel image is /boot/bzImage, simply do

dd if=/boot/bzImage of=/dev/fd0 bs=1k

with a blank diskette in your first floppy drive (DOS Drive A) and your done!

(Actually, the command "make zdisk" from the /usr/src/linux even does this step at the end of a kernel build.)

Instead of /boot/bzImage your system's kernel might be /vmlinuz or if you compiled the kernel, at /usr/src/linux/arch/i386/boot/bzImage for a big kernel or /usr/src/linux/arch/i386/zImage for a small kernel. Unless you elected for compilation options that are inconsistent with your current hardware and location of root directory, this kernel will come preset with parameters appropriate to your system.

Just for fun, however, we might look at the set of boot parameters that can be examined and set with the rdev command:

rdev /boot/bzImage
Root device /dev/sdb5

For its root device, this kernel will use /dev/sdb5, the first logical partition of the second SCSI drive.

rdev -r /boot/bzImage
Ramsize 0

No ram disk is to be loaded during boot.

NOTE: The man page for rdev on my system is out of date with respect to the action of rdev -r. The correct behavior is explained in detail in linux/Documentation/ramdisk.txt and in man bootparam.

rdev -s /boot/bzImage
Swap device Boot device

This is a peculiar way of saying that no swap device has been specified. I feel that I have plenty of RAM for the things I am currently doing so that the complication of a swap disk is not worthwhile. If the kernel is compiled on a system with a swap disk, then I am pretty sure that this parameter will come preloaded with the appropriate device specification.

rdev -v /boot/bzImage
Video mode 300

I have a passion for seeing lots of text so my default video mode is set to 132 columns by 60 lines. It should be preloaded with your normal video mode, but you might want to set it to prompt you at boot for the desired video mode by doing

rdev -v /dev/fd0 -3

At the prompt (during boot) if you respond with "ask", it will probe your video hardware and you might discover modes that you didn't know you had!

rdev -R bzImage
Root flags 1

There is only one flag specified, and if it is 1, the root filesystem will be mounted in read-only mode. It may seem unreasonable to mount root as read-only, but this is done to keep the root filesystem in a simple state until it has been checked by e2fsck. Later in the boot process, it will be remounted as read-write.

You can change these flags, but with the exception of the video mode, there is little reason to do so. The big disadvantage of this approach is that you can't insert command-line options into the kernel. That's one of the things that Lilo lets you do.


Last updated: April 10, 2006

Valid CSS!Valid XHTML 1.0 Strict

Contact Craig Van Degrift if you have problems or questions with this web site.