[PLUG] Need Help Editing Grub

Dwight Hubbard dwight.hubbard at efausol.com
Tue Jan 26 03:52:20 UTC 2010


When the grub menu comes up, hit escape to stop it from booting.

>From here you can install a grub boot block on the second drive:

Hit 'C' to enter command mode, then enter the following 2 commands
(assuming the linux /boot partition is the first partition on the second
disk). 

root (hd1,0)
setup (hd1)

That would probably be all that's needed, if your Linux installation is
using UUID or LABELS to find the various partitions.  Otherwise you'll
need to change the fstab before you remove the first disk.

On Mon, 2010-01-25 at 09:25 -0800, Tony Rick wrote:
> On Sun, Jan 24, 2010 at 1:42 PM, Mark Phillips
> <mark at phillipsmarketing.biz>wrote:
> 
> > I have two ide drives in one machine - drive 1 is a Windows drive and drive
> > 2 is a Linux drive. Using grub, I can boot into either windows or debian. I
> > want to remove the windows drive and replace it with a larger, blank drive
> > for backup storage. I have a feeling if I just remove the first drive and
> > put the new one there, the machine will not boot, since the MBR is probably
> > on the first drive (it came with the machine, and I just added the second
> > drive for Linux). My questions:
> >
> > 1. How do I change grub on the Linux drive (hdb) to say "the windows drive
> > is dead, boot here instead, long live linux"?
> >
> > 2. Do I move the second drive to the first ide port, or leave it as the
> > second ide drive and put the new drive in the fist ide port?
> >
> > Thanks!
> >
> > Mark
> >
> 
> What Linux distro are you using?  Some more recent releases (eg Ubuntu
> Karmic) use grub2, a new rewrite of grub, that uses a different device
> numbering scheme and has a different menu.lst format (called grub.conf in
> grub2).
> 
> That said, the simplest approach is to install the new drive as the first
> drive (replacing the Wx drive), and do a fresh minimal installation of Linux
> on the new drive.  The installation process should find all of usable OS
> installations and set up grub on the new drive accordingly.  The drawback
> here is that a default installation will use all of the new drive for one
> linux partition and one swap partition, so you would need to do some manual
> partitioning on the new drive either before or during the installation.
> 
> There are more complicated solutions that require more detailed control of
> the grub install process (as mentioned in earlier responses), which would
> probably be a good exercise for you in any case.  Simply modifying the grub
> info on the existing Linux drive will not work once the Wx drive with the
> active MBR is removed, whether the Linux drive becomes the first or remains
> the second drive.
> 
> - tony
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug





More information about the PLUG mailing list