Upgrading from Red Hat 9
Phil Schaffner
P.R.Schaffner at IEEE.org
Sat Feb 21 02:35:27 UTC 2004
On Wed, 2004-02-18 at 14:14 -0500, Gene C. wrote:
> On Wednesday 18 February 2004 14:01, Paul Iadonisi wrote:
> > On Wed, 2004-02-18 at 13:43, Gene C. wrote:
> >
> > [snip]
> >
> > > What occurs to me is to somehow use grub. The grub stage1 and stage2
> > > files are small enough to fit on a floppy. Unfortunately, grub is not
> > > currently capable of booting a cdrom (as far as I con deteremine) so an
> > > enhancement to grub would be necessary to add this functionality.
> >
> > From the rest of your message, not sure why you mention the need for
> > grub to boot from cdrom...I thought you were talking about booting from
> > floppy. However, if someone really needs cdrom booting capability in
> > grub, take a look at the Xen virtual machine monitor project at
> > http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ as the demo CD that
> > project puts out uses a modified version of grub with this capability.
>
> >From previous messages, some folks are unable to boot a cdrom -- either the
> system does not have one, or the bios is not capable of booting a cdrom, or
> it cannot boot the isolinux cdrom. Since the kernel has grown too large to
> fit on a floppy, I was looking for a way to bootstrap the booting of the
> cdrom through booting of a floppy with grub on it and then have grub boot the
> cdrom. If grub could pull vmlinuz and initrd.img from the dosutils/autoboot
> directory, this could possibly get around the boot-cdrom problem.
>
> This has to be easier than installing something like RHL 9 which is then used
> to boot the cdrom.
Check out the thread "missing boot disk.img":
http://www.redhat.com/archives/fedora-test-list/2004-February/msg00445.html
If you have a linux system of some flavor with grub, mount the FC2T1 CD,
ir start from installation files on disk, then
cd [install_directory]/isolinux
cp vmlinuz /boot/vmlinuz-1.90
cp initrd.img /boot/initrd-1.90.img
(Alternatively, do it over the net via scp, or whatever - many ways to
skin that cat - all equally odious to the cat!)
Add the following stanza to /boot/grub/grub.conf (assuming /boot is in
the first partition of the first hard drive, (/dev/hde1 for me, more
likely /dev/hda1 or possibly /dev/sda1 depending on hardware config and
BIOS settings):
title Fedora test1 (1.90) installer
root(hd0,0)
kernel /vmlinuz-1.90
initrd /initrd-1.90.img
If you want to boot from a floppy, run the following script to create a
bootable VFAT formatted grub floppy with a menu, mount it, and edit the
[mount-point]/grub/grub.conf file to add the above stanza. Then reboot
into the installation kernel, choose CD (or NFS, FTP, ...) installation
and away you go.
-------------------------- mkgrubmenu -----------------------------
#!/bin/bash
# mkgrubmenu
#
# Written by Phil Schaffner <p.r.schaffner at ieee.org>
# based on mkbootdisk by Erik Troan <ewt at redhat.com>
pause=yes
format=yes
device=/dev/fd0
unset verbose
GRUBDIR=/boot/grub
MOUNTDIR=/tmp/mkgrubmenu
PATH=/sbin:$PATH
export PATH
VERSION=0.2
usage () {
cat >&2 <<EOF
usage: `basename $0` [--version] [--noprompt] [--noformat]
[--device <devicefile>] [--grubdir <dir>] [--verbose -v]
(ex: `basename $0` --device /dev/fd1)
EOF
exit $1
}
while [ $# -gt 0 ]; do
case $1 in
--device)
shift
device=$1
;;
--grubdir)
shift
GRUBDIR=$1
;;
--help)
usage 0
;;
--noprompt)
unset pause
;;
--noformat)
unset format
;;
-v)
verbose=true
;;
--verbose)
verbose=true
;;
--version)
echo "mkgrubdisk: version $VERSION"
exit 0
;;
*)
usage
;;
esac
shift
done
[ -d $GRUBDIR ] || {
echo "$GRUBDIR is not a directory!" >&2
exit 1
}
if [ -e "$device" ]; then {
[ -n "$pause" ] && {
echo -n "Insert a"
[ -n "$format" ] || echo -n " vfat formatted"
echo " disk in $device."
echo "Any information on the disk will be lost."
echo -n "Press <Enter> to continue or ^C to abort: "
read aline
}
[ -n "$format" ] && {
[ -n "$verbose" ] && echo "Formatting $device... "
fdformat $device || exit 0
mkfs.msdos $device > /dev/null 2>/dev/null || exit 0
[ -n "$verbose" ] && echo "done."
}
rm -rf $MOUNTDIR
mkdir $MOUNTDIR || {
echo "Failed to create $MOUNTDIR" >&2
exit 1
}
[ -d $MOUNTDIR ] || {
echo "$MOUNTDIR is not a directory!" >&2
exit 1
}
mount -wt vfat $device $MOUNTDIR || {
rmdir $MOUNTDIR
exit 1
}
mkdir $MOUNTDIR/grub
[ -n "$verbose" ] && echo -n "Copying $GRUBDIR files... "
cd $GRUBDIR
cp -a stage1 stage2 grub.conf device.map $MOUNTDIR/grub
[ -n "$verbose" ] && echo "done."
[ -n "$verbose" ] && echo -n "Setting up GRUB... "
grub --device-map=$MOUNTDIR/grub/device.map --batch <<EOF
root (fd0)
setup (fd0)
quit
EOF
[ -n "$verbose" ] && echo "done."
umount $MOUNTDIR
rmdir $MOUNTDIR
[ -n "$verbose" ] && echo "done setting up GRUB."
echo "edit (fd0)/grub/grub.conf to customize."
}
else
echo "$device does not exist"
fi
More information about the test
mailing list