[mdlug] Flakey hard drive

R. Kannan rkannan at peoplepc.com
Sun Aug 19 20:53:53 EDT 2007


Thanks. I used 'cp -a' and copied the 'partition boot record' of the windows partition using 'dd'. But after I cahnged /etc/fstab and /boot/grub/menu.lst and followed Car. T Miller's instructions on installing grub to MBR, I ran into a problem

Boot from a Knoppix CD.
su -
mkdir /mnt/restore
mount /dev/hda1 /mnt/restore
mount /dev/hda2 /mnt/restore/boot
mount -t proc proc /mnt/restore/proc
mount -o bind /dev /mnt/restore/dev
chroot /mnt/restore

At this point, I enter a new shell and I find that the mount points are all screwed up and I see 'df -l' seems to indicate old partitions (Not the one in the updated /etc/fstab and not the ones as I mounted using the above instructions. But the one that was there in the old hdb drive. Since the boot is in a different partition, the following command did not work.

grub-install /dev/hda

I see that I have a /etc/mtab that reflects the 'old' fstab. This seems to be leftover from the last successful boot with the old drive. 

How did chroot screw everything up this way? Is it looking at /etc/mtab for some reason? Should I unmount everything and try installing the grub in MBR?

Thanks for any pointers.

-----Original Message-----
>From: Drew <drew4096 at gmail.com>
>Sent: Aug 19, 2007 1:36 PM
>To: "R. Kannan" <rkannan at peoplepc.com>, MDLUG's Main discussion list <mdlug at mdlug.org>, Brian Hurley <brian at detroitindustrial.org>, mdlug at mdlug.org
>Subject: Re: [mdlug] Flakey hard drive
>
>At 11:28 AM 8/19/07, R. Kannan wrote:
>>But I cannot use plain old 'cp' to copy partition boot record. Can 
>>I? So it looks like I need to use 'dd'.
>>
>>But will there be an issue with using dd on partitions that are 
>>different in size as long as the destination partition is bigger 
>>than the source partition? For example, if I use
>
>     dd'ing from smaller to larger *should* work, but the extra space 
>will be wasted/unavailable as a
>result. Use cp -a, or better yet cp -av so as to monitor the progress.
>
>----
>
>- Drew.
>


________________________________________
PeoplePC Online
A better way to Internet
http://www.peoplepc.com



More information about the mdlug mailing list