Re: Upgrade from RH8 to FC1 hangs with GRUB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phil,

Thanks for taking the time to post your detailed response.  I will file 
it for future reference because I was able to solve my problem and 
finally boot from the new disk.  This is how...

When I first used ghost to image my old disk to the new disk, I used 
Ghost 7.5 AND accepted the default sizes that ghost selected for the 
partitions on the new disk.  That is, it increased the size of my boot 
partition (hda1).

I found a document on the Symantec site that talks specifcally about a 
problem using Ghost 7.5 and earlier to image Linux partitions that use 
the Grub loader. Imagine!!  So, I decided to re-ghost my old disk, this 
time using Ghost 8.0.  I also decided to leave the boot partition the 
same size as on the old disk.  When I subsequently tried to boot from 
the new drive everything worked as hoped!!!

Thank you to everyone who offered their assistance. 

The open source community rules!!


John Rumball


> On Wed, 2004-01-21 at 12:19, John Rumball wrote:
> > That line must have been commented out by anaconda.
> 
> My guess as well.  Had wondered about why, but it works that way so
> never dug in to find out.
> 
> > I notice that it 
> > is also commented out on my FC1 box at home (which also has hda1, 
hda2, 
> > hda3 and was recently upgraded from RH8) and on the old drive I am 
> > replacing in this box.
> > 
> > I should also mention that I tried booting off my old drive and it 
> > worked just fine, although it loaded RH8 and not FC1.  I guess this 
> > confirms that my previously attempted yum upgrade never completed 
> > properly!
> 
> Sounds like it.  From your original message it appears the actual
> install of the new RPMS never started.  Haven't used Ghost for this 
kind
> of cloning but it seems that something messed up.  Presumably you had 
to
> configure the old drive as master or single (/dev/hda) to get the 
system
> to boot back to RH8.  If the new drive is configured as slave, can 
still
> boot to the old one?
> 
> If so, and if you still want to try an upgrade to preserve old 
settings
> etc., I'd try "cloning" the running system on the old drive under 
Linux
> to the new one configured as a slave drive (/dev/hdb).
> 
> Something along these lines has worked for me:
> 
> 	dd if=/dev/zero of=/dev/hdb bs=512 count=1 # Kill old MBR
> 	fdisk /dev/hdb	# create partitions as desired
> 	...
> Then
> 	mke2fs -j /dev/hda1
> 	mke2fs -j /dev/hda2
> 	mkswap /dev/hda3
> 	mkdir /alt
> 	mount /dev/hda2 /alt
> 	mkdir /alt/boot
> 	mount /dev/hda1 /alt/boot
> 	cp -aux /boot /alt
> 	cp -aux / /alt
> 
> Make a grub boot floppy so you can boot either instance in a pinch.
> 
> This script (I call it mkgrubmenu and it lives in /root/bin) may help
> (did for Paolo):
> -------------------------------------------------------------------
> #!/bin/bash
> # mkgrubmenu
> #
> # Written by Phil Schaffner <p.r.schaffner@xxxxxxxx>
> #  based on mkbootdisk by Erik Troan <ewt@xxxxxxxxxx>
> 
> pause=yes
> format=yes
> device=/dev/fd0
> unset verbose
> 
> GRUBDIR=/boot/grub
> MOUNTDIR=/tmp/mkgrubmenu
> PATH=/sbin:$PATH
> export PATH
> 
> VERSION=0.1
> 
> 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=$GRUBDIR/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
> 
> ---------------------------------------------------------------
> 
> Configure the new drive as single (recommended to avoid possible MBR
> confusion) or master, with the old one either removed or as slave.  
Boot
> using the floppy, and (assuming success) log on as root and do the
> following:
> 
> 	grub
> 	root (hd0,0)
> 	setup (hd0)
> 	quit
> 
> You SHOULD, with any luck, then be able to reboot from the new disk 
and
> continue with the upgrade.
> 
> Check out 
> http://www.ldeo.columbia.edu/~vschmidt/notes/redhat2fedora/
> for good hints on how to upgrade with yum.
> 
> Should also be possible to boot either instance of Linux with both 
disks
> installed if you appropriately edit /boot/grub/grub.conf, and
> /alt/etc/fstab and /alt/etc/mtab on the /dev/hdb2 partition, but won't
> go into all that detail here.
> 
> Good luck!
> 
> Phil
> 
> 
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> 
> 

-- 




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux