GRUB question

Craig White craigwhite at azapple.com
Thu Aug 6 15:35:11 UTC 2009


On Thu, 2009-08-06 at 08:23 -0700, 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?
----
I didn't realize gparted could copy partitions from one drive to another
but the MBR is not in any partition but rather the first 446 bytes of
the 512 bytes reserved in the boot blocks

The best way is to have installer DVD/USB and boot into rescue mode,
chroot to /mnt/sysimage and then simply run 'grub-install /dev/sda'

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the users mailing list