POV-Ray : Newsgroups : povray.off-topic : GRUB uglies : GRUB uglies Server Time
6 Sep 2024 19:21:11 EDT (-0400)
  GRUB uglies  
From: Darren New
Date: 7 Nov 2008 23:42:35
Message: <491518bb$1@news.povray.org>
OK, quick summary of below:
Got SuSE 11 x64 installed on /dev/sda2, all one big primary partition. 
If I tar up all the files, zero out the partition, reformat it, and 
restore the files, how do I fix GRUB so that I can chainloader to 
partition 1 of disk 0 (aka /dev/sda2) and have GRUB boot?




So I have my new 64-bit computer, and I'm putting Linux (SuSE 11 x64)
and Vista on it, and I'm trying to figure out how to recover from
disaster. As in, the main drive fails and has to be replaced.

Vista makes this pretty easy. The drive ghosting works fabulously, and
you just slap the backup drive in and boot the CD and say "Here, put
that back."  If the boot sector's screwed, you can fix that too from the
recovery CD, with a bit of googling.  The file-at-a-time backup program
is really nice, except for the unacceptable glaring hole that MS put in
it, namely that it picks what file extensions it'll back up, and you
can't change that. Sheesh. Yes, really, I want to back up both PHP files
*and* executables, thanks.  Oh well.  Easy enough to script around if
you need per-file backups (assuming you can find the 64-bit versions of
some of the utilities, which was another hour of hunting, since they're 
not labeled with bit size).

Anyway, on to GRUB.  I put Vista in the first partition, and Linux in
the second. Install works fine. I "dd" the boot sector off /dev/sda2 and
copy it to Vista and set up Vista to give me the choice of what to boot.
Picking Linux from Vista gives me the Grub menu. Cool.

Now I boot the Linux rescue CD, mount /dev/sda2 on /tmp/root and my
backup drive on /tmp/back, and then
   cd /tmp/root ; tar cvfzp /tmp/back/linux.tgz .
All goes well.

Now the test:  Wipe the drive to zeros, restore vista (which restores
the partition table since it isn't there), and then use the Linux rescue
  CD to do the following:
   mkfs.ext3 -L SUSE /dev/sda2
   mount /dev/sda2 /tmp/root
   cd /tmp/root
   tar xvfzp /tmp/back/linux.tgz
All the stuff restores correctly.

Now, at this point, I've been unable to get GRUB to do its thing.

grub
   device (hd0) /dev/sda
   root (hd0,1)
   setup (hd0)

This leaves me with a system that when I boot it, just says "GRUB" or
basically never gets anywhere close to the menu or booting.  Using "dd"
to put the boot sector back (from a copy on the backup drive) before or
after doesn't help either.

The partition type is indeed 0x83.

Using the repair option and telling it to repair the boot system leaves
me with a boot menu that doesn't match what I backed up, and boots me
into a text console with an apparently passworded root account. F'ing weird.

Never had this problem with SuSE 10 x86. That was very straightforward
once I figured out GRUB was hiding information outside the file system
and had to be reset. (Or, rather, that it was encoding parts of the file 
system into executable files, or whatever it's doing.)

Any suggestions on what to try?

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.