drive change

Collins Richey crichey
Sat Feb 3 18:54:31 PST 2007


On 2/3/07, Ken Moffat <kmoffat at drizzle.com> wrote:
> I have a noisy hda drive, making a whining sound. I have set it to spin
> down in a few seconds to quite it, but would like to remove it. My linux
> install is on hdb, but the mbr is on hda, which contains an old windows
> install and some backup partitions. Can I remove hda, plug hdb in as
> hda, reinstall grub, edit /etc/fstab  and reboot? Or is this just
> wishful thinking? Or reinstall grub to hdb prior to switching drives?
> or.... ?  just swap and reinstall?
>

It's quite simple with a livecd

1. Remove the old drive, set the new drive as primary and recable
2. Boot from the livecd
3. mount the /dev/hd? /mnt (the / partition)
4. If separate /boot, mount /dev/hd? /mnt/boot
5. chroot /mnt
6. grub
7. root (hd0,?)
8. setup (hd0)
9. quit
10. Edit /mnt/boot/grub/grub.conf (or menu.lst)
11. Fix the boot stanza 'kernel ... root=/dev/hd?
12. exit chroot
13. umount
14. reboot and enjoy

Enjoy,

-- 
Collins Richey
     If you fill your heart with regrets of yesterday and the worries
     of tomorrow, you have no today to be thankful for.



More information about the Linux-users mailing list