[SuSE Linux] Relocate '/' after replacing HDD
I am planning to replace the small HDD where my / partition and swap partition are located (along with a Win95 FAT-16 partition for Win swap and misc stuff) with a bigger HDD. Here is how I plan to do it. Does anyone see any (hidden) danger here? 1. Tar the / filesystem to my /opt partition on a 2nd HDD. "Mount" shows 49041 blocks used for / and 79838 blocks available on /opt. I will exclude /proc from the tar file. I do not have access to a tape unit. 2. Remove old HDD, install new HDD, set up Linux ext2 partition and Linux swap partition with Linux fdisk. 3. Using boot/rescue disks, untar to the new / partition. Modify fstab to reflect the new partition /dev names where necessary. Add a /proc directory under / with mkdir. 4. Boot Linux with loadlin as usual. Where can I go wrong? TIA, Howard Arons -- Powered by SuSE Linux 5.2 -- kernel 2.0.33 Communications by Mutt 0.93.2 - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
Howard Arons wrote:
I am planning to replace the small HDD where my / partition and swap partition are located (along with a Win95 FAT-16 partition for Win swap and misc stuff) with a bigger HDD. Here is how I plan to do it.
Does anyone see any (hidden) danger here?
1. Tar the / filesystem to my /opt partition on a 2nd HDD. "Mount" shows 49041 blocks used for / and 79838 blocks available on /opt. I will exclude /proc from the tar file. I do not have access to a tape unit.
2. Remove old HDD, install new HDD, set up Linux ext2 partition and Linux swap partition with Linux fdisk.
3. Using boot/rescue disks, untar to the new / partition. Modify fstab to reflect the new partition /dev names where necessary. Add a /proc directory under / with mkdir.
4. Boot Linux with loadlin as usual.
Where can I go wrong?
Here are some things to remember, just in case you run into trouble. I come from using the mbr for lilo, so it may not apply to loadlin. So you can probably ignore most of what I say about lilo. But if loadlin fails, and you resort to lilo in the mbr, readon. Funny things happen in those big disks, especially if your boot partition straddles the 1024 cylinder limit. For me, it's like being in "uncharted territory"...anything can happen. A big adventure. :-) Different everytime. 1. Remember to set the master-slave jumper properly on your new drive. I know it sounds simple, it's just a reminder. And also reset your ide drives in bios. 2. Depending on how you put your fat16 partitions back in, then your entries in /etc/mtab may change. I have to change the mtab entries when I move my system. 3. You may "luck out" on this one, because you use loadlin. I've never used loadlin, always lilo, and I'll relate what happened to me. Just in case, "something weird happens" :-) This is the biggest "gotcha". Your new hard drive will have a different geometry, and lilo(or loadlin) may not work anymore. This happened to me when I replaced a 1.2 gig /dev/hda with a 5 gig. I'm talking about putting lilo in the mbr, which is standard. I had to resort to creating the smallest possible /dev/hda1 in the first position on /dev/hda and mount /boot there. In any event, expect to have to run lilo ( or loadlin)again to generate a new /boot/map file. This is because the map keeps an exact location of the kernel by ionode location?? Loadlin must do something similar to locate the kernel. Anyways, your kernel will be at a different location on your new drive, so you will have to boot from the floppy and run lilo (or loadlin) once to generate the new map. Finally, if things go bad don't panic, just boot "the installed system" from the floppy, and run lilo(or loadlin), check mtab and fstab, and if neccessary, get Partition Magic ready to make a /dev/hda1. I did this once, panicked because the mtab had changed, and was so freaked out over messing my system up that I just reinstalled. I'm a little smarter now, not much though. :-) I would make the /dev/hda1 just as a wise precaution, when you first fdisk the new drive. You can leave it empty, it'll be there just in case. It will only need to be 1 block, 10 or 20 megs. If you try to create it later with PM, you can put it in the first position on /dev/hda, but it will get labeled something else, like /dev/hda4, or whatever the next available primary partition number is. Anyways, that's my 2 cents. I hope I didn't just add confusion, it's kinda clear to me now. :-) - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
On Jan 15, 1999, Howard Arons wrote:
I am planning to replace the small HDD where my / partition and swap partition are located (along with a Win95 FAT-16 partition for Win swap and misc stuff) with a bigger HDD. Here is how I plan to do it.
Does anyone see any (hidden) danger here?
1. Tar the / filesystem to my /opt partition on a 2nd HDD. "Mount" shows 49041 blocks used for / and 79838 blocks available on /opt. I will exclude /proc from the tar file. I do not have access to a tape unit.
I can now ask a more specific question. One of my main concerns was how tar would handle the /dev directory. As far as I can tell, there is only one anomaly, and I don't know what it means. The directory /dev contains a 'log' device of type 'socket': srw-rw-rw- 1 root root 0 Jan 16 12:30 /dev/log whereas the directory *regenerated* from a tar archive shows the same name for a different type of device (a pipe, I believe): prw-r--r-- 1 root root 0 Jan 16 12:30 /opt/dev/log AFAIK the 'log' device seems to have been created at boot time. Will this behavior thwart my regeneration of the /dev directory from a tar archive? I'm way over my head here. Howard Arons -- Powered by SuSE Linux 5.2 -- kernel 2.0.33 Communications by Mutt 0.93.2 - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
participants (2)
-
hlarons@ComCAT.COM
-
zentara@netfrog.net