LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Can I do this? Hard drive swap. (http://www.linuxquestions.org/questions/linux-hardware-18/can-i-do-this-hard-drive-swap-39366/)

bulliver 12-25-2002 06:52 PM

Can I do this? Hard drive swap.
 
Hello, and Merry Christmas.

One of my presents is a new computer. I currently have a dual boot system with windows on one HD and my three Linux installs on a second HD. I ordered my new computer with no HD so as to save some money.

So, I want to put my linux HD in the new box, and leave win on the old one. This is what I was thinking:

1. Physically install linux HD in new computer.
2. Use install cd to boot in rescue mode
3. Install Grub
4. Live merrily ever after.

This seems too easy though...am I missing something? Are my kernels hardwired for /dev/hdc (where the are now) thus breaking when they are moved to /dev/hda (where they will be). Can I use rdev to fix them? Am I resigned to reinstalling?

Any advice/help is appreciated.

oulevon 12-25-2002 10:48 PM

Well, unless your computer has the same cdrom/soundcard/video-card/ etc. I don't think this is possible. I'm no expert, but the kernel is configured to load the right drivers for the hardware on your computer, so I don't think it's possible. But again, I'm no expert, so gather some more opinions before you abandon your plan.

Good luck.


The more I think about it, this is probably possible, but I don't think it's going to be as simple as installing Grub. I think you're going to have to install a new kernel, or reconfigure it somehow, which I think is possible if you do do something in Rescue mode etc.

DavidPhillips 12-25-2002 10:57 PM

you should be able to get it going, rdev is not really use any more the boot loader will load the kernel, you just need to probably change a few things in /etc/modules.conf

if you know the hardware's not there just remove the entry in modules.conf

bulliver 12-25-2002 11:50 PM

Yeah, I was wondering about the kernel modules and all, but if I use kudzu to detect the new hardware it should work alright I think. I'll give er a shot anyway, as I was thinking I would have to reinstall anyway, but with Redhat, slackware, and LFS that's quite a chore.

DavidPhillips 12-26-2002 12:13 AM

if it won't boot go to single user and see if you can fix it.

UnTamed 12-26-2002 08:10 AM

I'd use an install disk in rescue mode to get into each fs and edit module.conf and fstab and depending on the distro, check rc.modules and rc.local if you put stuff into it.
chroot into the one you got grub already installed, and reinstall to mbr.
...reboot and see if you forgot anything, ...well if I forgot anything :o

Malicious 12-26-2002 08:59 AM

Should not be a major ordeal. RH80 runs kudzu during the boot ("detecting new hardware") and pops a screen to allow you to take appropriate action on all new or missing devices. I did something similar by putting a new pentium motherboard in a box replacing an old AMD board. kudzu picked up all the changes and came up with the new video, sound and nic.

For the hdc/hda, a couple of things. You could attach the drive to the second ide controller, in which case it would still come up as hdc. OR, look in the /etc/fstab. Newer Redhat installs will define the drives with LABEL=/xxx instead of /dev/hdxn. If this is the case, you are home free. Otherwise, change the /dev/hdcn lines to /dev/hdan. This can be done before the last shutdown or during the rescue boot where you are adding grub.

bulliver 12-26-2002 01:54 PM

Good advice, thanks folks.


All times are GMT -5. The time now is 12:45 PM.