Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wife's dying hard drive - grub question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sun Apr 23, 2017 5:51 pm    Post subject: Wife's dying hard drive - grub question Reply with quote

Running grub1, not grub2, by the way.

SMART recently alerted me that my wife's computer had a dying hard drive. So it's upstairs now connected to a USB toaster with a new hard drive. I'm still booted to the old hard drive, but am copying the stuff, sometimes in odd fashions, over to the new drive. I'm keeping to mount points for things like /proc, /sys, /run, etc.

At the end of all of this I hope to have everything on the new hard drive, though I'm going to need to fiddle a bit with /etc/fstab and a few other spots. My problem is grub.

Clearly at the moment grub stage1 or stage1.5 is not currently installed on the new hard drive. My problem/question is the relative issue of hd0 and hd1. Right now the old, dying drive is hd0 and the new drive is hd1. I think I want to do "root (hd1,0)" followed by "setup (hd1)". This seems logical, because grub should be looking on what is currently hd1 for it's configuration stuff, and I want to install it into the MBR of the new hard drive. But when I do the hardware switch, that drive will become hd0.

Is something about to go wrong when I do the hardware switch, do I just need SysRescueCD for my first boot with the new hard drive installed?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43223
Location: 56N 3W

PostPosted: Sun Apr 23, 2017 6:08 pm    Post subject: Reply with quote

depontius,

Once you have removed the old HDD, boot with system rescuce CD, do the chroot dance and install grub to the MBR.
Unless you use UUIDs, the old grub.conf and fstab should just work.

If you feel really confident, you can use dd to copy the installed grub stage1 from the old MBR and the stage1.5 from the space before the first partition.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Mon Apr 24, 2017 1:25 pm    Post subject: Re: Wife's dying hard drive - grub question Reply with quote

If it help you, remember the "e" key in grub, you could still boot from hd1 (old disk) once you made the swap.

- set old disk as hd1
- set new disk as hd0
boot
-> working ok
--> not working, reboot, hit e key and you can on the fly change hd0 with hd1 reference to boot from your old disk instead of the new one (so, no sysrecuecd or anything need), changes made hit the b key to boot it
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum