#!/bin/bash
#
#	cramon [blocks]
#
#	Set the boot parameters on a floppy kernel image.  This sets the
#	size of the ramdisk, the root device, sets the video mode to ask,
#	root flags to read-only, and the start of the cramdisk to the block
#	following the kernel image.
#
#	The optional argument `blocks' specifies the size of the ramdisk to
#	create on boot.  The default is 4Mb.
#

#kernel=/usr/src/linux/arch/i386/boot/zImage
kernel=./zImage

start=`ls -s $kernel | awk '{print $1}'`
 
rdev -r /dev/fd0 $[16384+$start]  && {
	rdev -R /dev/fd0 0
	rdev /dev/fd0 /dev/fd0
	dd ${fs:+if=}$fs of=/dev/fd0 bs=1024 seek=$start
}
