Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
Re: mkbootdisk for SuSE?
  • From: Jim Osborn <jimo@xxxxxxxxxx>
  • Date: Wed, 9 May 2001 09:24:36 -0700 (PDT)
  • Message-id: <200105091624.JAA14389@xxxxxxxxxx>
"S.Toms" <smotrs@xxxxxxxxxxxxxx> writes:
>jo>The RedHat utility is just a nice shell script,
>jo>easy enough to hack as necessary for the SuSE environment.
> I use the following within my .alias file to do similar
>function mkbootdisk {
> fdformat -n /dev/fd0h1440
> if [ -f /boot/vmlinuz ]; then
> echo bootdisk: Kernel found, copying to bootdisk...
> cp /boot/vmlinuz /dev/fd0
> else
> echo bootdisk: Enter location of kernel
> read kpath
> if [ "$kpath" ]; then
> if [ -f $kpath ]; then
> echo bootdisk: Kernel found, copying to bootdisk...
> cp $kpath /dev/fd0/vmlinuz
> else
> echo bootdisk: Unable to locate $kpath...
> fi
> else
> echo bootdisk: Unable to locate kernel...
> fi
> fi

Thanks for sharing that script, S.

The really interesting capability of the RedHat script is
its making of the initrd image, which is necessary if,
for example, the kernel uses a modular scsi driver and
can't get to the hard disk without the initial ramdisk.

I do plan to hack that RedHat script eventually, if only
as a learning experience to better understand initrd.
But for now, I've followed the good advice of folks here and
on another list and taken the easy way out.

First, eliminate the need for initrd: compile that scsi
driver right into the kernel. After all, when would it
ever get unloaded?

Lastly, to allow booting with my "backup" image, the
SuSE distro kernel with its modular scsi and accompanying
initrd: let lilo handle the details. I made a special
bootfloppy lilo conf file, "lilo-floppy.conf," containing this:

vga = normal
timeout = 50
boot = /dev/fd0
map = /floppy/lilo-map

image = /boot/vmlinuz
root = /dev/sda2
label = linux

image = /boot/vmlinuz-backup
root = /dev/sda2
label = backup
initrd = /boot/initrd

To make the bootdisk, mount a clean floppy on /floppy and
copy /boot/chain.b to it. Then run

lilo -C lilo-floppy.conf

unmount the floppy. Enjoy. To see all the labels, hit <TAB>.

I'm indebted to Soren Jacobsen on another list for this idea.



< Previous Next >