GRUB question [SOLVED]

Daniel B. Thurman dant at cdkkt.com
Fri Aug 7 18:15:16 UTC 2009


Daniel B. Thurman wrote:
>
> Smartd has reported that I have 7 uncorrectable
> errors and it appears to be located in my swap
> partition.  Zeroing out the swap partition and
> mkswap, failed to correct it.  So it seems that
> the drive after less than 1 year has gone bad.
> Looks like I will have to RMA the drive as
> it is still under a 5yr. warrantee.
>
> So, I bought a new drive and used gparted to
> copy over all the partitions sans the swap
> partition from the bad drive over to the new
> drive.  Everything is now copied over but I am
> still in doubt of the new drive's MBR sector.
>
> Question: using gparted, does it also include
> the boot sector MBR when copying over the
> first partition or do I have manually copy the
> boot sector over or to apply the grub-install?
>
> If so, what is the best way to ensure that the
> MBR is on the new drive?
>
> Thanks!
> Dan
I was able to use Ubuntu's LiveCD w/gparted to
copy each of the partitions from the old drive to
the new drive, with exception to partitions that
were damaged beyond repair. Damaged partitions
can be restored from backups, but in my case only,
the swap partition was damaged, not a problem,
just issue command:
mkswap -L <swap-label> <swap-partition>

Of all the suggestions offered so far (dd &| grub-install)
it did not work for me.  This is due to a different
"non-standard" grub setup that I have as follows:

                  boot-sys
                         +
       +=======+===[...]===+
    boot-f8    boot-f9            boot-X

Note: "boot-sys" is a "master" boot setup for
which I can configure as a "jump point"
to each of fedora-version boot partitions, each
partition containing it's own boot areas for which
multiple kernels can be saved therein.

On the HD, the layout is:
[boot-sys]   [     
[boot-f8][root-f8][boot-f9][root-f9][...][boot-X][root-X][...]  ]
^primary   ext   logical ->
^boot flag

In my case, Using the LiveCD, run grub, then issue
the following commands:

grub> root (sda0,0)     (boot-sys)
grub> setup (sda0,0)

Repeat the above two grub commands for every
boot-X partitions.  When finished, make sure
that the device-map & grub-config files have
the correct partition defined therein, i.e (sd[a-z]N,M)
if you change the partitions around as I did. I
did not have to change the fstab files because they
are LABEL driven, but in any case, if the partition
labels are changed, then update fstab file.

======================================
In response to suggestions on using other programs,
here is my response:
======================================
Using gparted boot CD, the problem I had was
that of the video drivers - it did not work for my
ASUS P5??? Intel video chips. So I abandoned
it and used Ubuntu.

With Ubuntu v8.04, I had to use "F4" and "save mode"
in order to get the graphics to work. Ubuntu did not
support the onboard NIC, so I had to add a standard
NIC card that Ubuntu supported.

CloneZilla is cool, but takes awhile to get used to this
program. Setting up the network was confusing but this
program can do remote image backup and restores and
with compression.  I have saved an image backup but
I have not tried a restore. This program is curses/command-line
driven, at least with the version I have.  I prefer using
GUI application, but that is just me.

Cheers,
Dan




More information about the users mailing list