Mailing List Archive

Installing new boot disk.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all.

I'm trying to (finally) retire the 6Gb drive I'm using as my boot drive (hda).

I've copied / and /boot onto hdb. I understand the changes that I'll have to
make to fstab.

What I want to do is remove the current hda and replace it with the current
hdb. Then I have a new 200Gb drive which will be my new hdb. I end up with
the 6Gb to give to my 4 year old.

When I tried it the other day, I got a system that wouldn't boot. It just
printed GRUB all over the screen.

My understanding is that I needed to get into the grub shell and type:

root (hd1,0)
setup (hd1)
quit

This should install grub onto hdb. Then when I move hdb into the hda
position, it should just work, right? Maybe I mistyped something?

- --
Mike
gpg key: http://diehlnet.com/~mdiehl/mdiehl.asc
83AD D927 758D 4BFC A800 0277 4B26 75A4 F0D1 C7EB

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBUQ+KSyZ1pPDRx+sRAldrAKCAdVG4qUX64LWIUSZdMR9BfW5dbgCfdsPA
PYDxvrS5BAmkMc8ZcQcn4Xw=
=d9/A
-----END PGP SIGNATURE-----

--
gentoo-user@gentoo.org mailing list
Re: Installing new boot disk. [ In reply to ]
Mike Diehl (Encrypted email preferred) wrote:
> Hi all.
>
> I'm trying to (finally) retire the 6Gb drive I'm using as my boot drive (hda).
>
[snip]
>
> My understanding is that I needed to get into the grub shell and type:
>
> root (hd1,0)
> setup (hd1)
> quit
>
> This should install grub onto hdb. Then when I move hdb into the hda
> position, it should just work, right? Maybe I mistyped something?
>
It might or might not (I'm not so deep within GRUB) that the stage1 file
which is installed into the bootsector of your hdb is told to load something
from the bootsector of the first partition on the _second_ drive.

I don't know if there's a way to fool GRUB into taking hd0,0 during install
and using another hd0 for running, so I'd rely on the more complicated way:
Replace hda with hdb, start from CD, chroot into your running system and
install GRUB with

root (hd0,0)
setup (hd0)
quit

Hope, this helps.
Greetings,
Felix
Re: Installing new boot disk. [ In reply to ]
On Wed, 22 Sep 2004 08:47:22 +0200, Felix Tiede <lists@pc-tiede.de> wrote:
> Mike Diehl (Encrypted email preferred) wrote:
> > Hi all.
> >
> > I'm trying to (finally) retire the 6Gb drive I'm using as my boot drive (hda).
> >
> [snip]
> >
> > My understanding is that I needed to get into the grub shell and type:
> >
> > root (hd1,0)
> > setup (hd1)
> > quit
> >
> > This should install grub onto hdb. Then when I move hdb into the hda
> > position, it should just work, right? Maybe I mistyped something?
> >
> It might or might not (I'm not so deep within GRUB) that the stage1 file
> which is installed into the bootsector of your hdb is told to load something
> from the bootsector of the first partition on the _second_ drive.
>
> I don't know if there's a way to fool GRUB into taking hd0,0 during install
> and using another hd0 for running, so I'd rely on the more complicated way:
> Replace hda with hdb, start from CD, chroot into your running system and
> install GRUB with
>
> root (hd0,0)
> setup (hd0)
> quit
>

I don't believe you can do this in a single step. What I would do is this.

1. Edit the fstab on your new drive to work when cabled as hda.
2. Create a grub boot floppy
(1) format your floppy as ext2 or vfat
(2) mount the floppy and create /mnt/floppy/boot and /mnt/floppy/boot/grub
(3) copy the stage files from /boot/grub to /mnt/floppy/boot/grub
(4) edit a /mnt/floppy/boot/grub/grub.conf (or if you used vfat
this must be ....../menu.lst) with a boot stanza for your new drive as
hda? (hd0,?).
3. Move your drive to the hda position.
4. Boot from the floppy and select your new boot stanza
5. Once running from the new drive, redo the grub setup, i.e.
grub
root (hd0,?)
setup (hd0)
quit
6. Edit your /boot/grub/grub.conf or ....../menu.lst to look like the
version on the floppy

Of course, if you are using a /boot partition, make allowances for
mounting it and adjusting the grub stanzas accordingly.

HTH,


--
/\/\
(CR) Collins Richey
\/\/ "I hear you're single again." "Spouse 2.0 had fewer bugs than
Spouse 1.0, but the maintenance ... was too much for my OS."
- Glitch (tm)

--
gentoo-user@gentoo.org mailing list
Re: Installing new boot disk. [ In reply to ]
Collins Richey wrote:
> On Wed, 22 Sep 2004 08:47:22 +0200, Felix Tiede <lists@pc-tiede.de> wrote:
>
[snip]
>>
>>I don't know if there's a way to fool GRUB into taking hd0,0 during install
>>and using another hd0 for running, so I'd rely on the more complicated way:
>>Replace hda with hdb, start from CD, chroot into your running system and
>>install GRUB with
>>
>>root (hd0,0)
>>setup (hd0)
>>quit
>>
>
>
> I don't believe you can do this in a single step. What I would do is this.
>
[snap]

Yes, I've left out the steps of editing /etc/fstab and grub.conf / menu.lst,
but I did it my way more than once (since I have no floppy drive in most of
my boxes I have no choice ;-) ) and it always worked fine.

Greetings,
Felix