Re: Moving to a new hd
I've done this a few times and it's been a while, but what I recall
doing was:
1. mke2fs /dev/hdb1.
2. mount -t ext2 /dev/hdb1 /mnt
3. 'cp -ax' from / to /mnt each of the directories which do not exist
on a separate partition. Do not include /proc or /tmp. Use mkdir to
create /mnt/proc and /mnt/temp.
4. Edit /mnt/etc/fstab so that it reflects the structure of hdb, if
different than your existing tree.
5. Remove hda and change hdb from slave to master (it will now be hda).
6. Boot with a rescue disk, selecting /dev/hdb1 as your root fs.
7. Run lilo.
8. Pray and reboot.
On Fri, Apr 06, 2001 at 09:52:03PM +0200, Philipp Lehman wrote:
> A while ago a bought a new IDE hd for one of my Debian boxes,
> hooked it up as hdb, moved /home, /usr, and /var there, but left
> the root file system on hda1 (on the old drive). Now I want to
> get rid of the old hd altogether (it's slow and noisy).
>
> So, after performing some extensive surgery on a living Debian
> system, I managed to repartition hdb from scratch (leaving
> /dev/hdb1 unused) and got everything set up and working again.
> But I have yet to move the root filesystem from hda1 to hdb1 and
> hook up hdb as hda.
>
> What's the usual procedure to do that without reinstalling? Some
> step-by-step instructions would be very much appreciated. What is
> puzzling me is how to move the specials in /dev/* (I guess cp -a
> doesn't cut it, does it?) and how do I deal with LILO when
> exchanging the drives.
>
> TIA
>
> --
> Philipp Lehman <lehman@gmx.net>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
--
Bob Nielsen, N7XY nielsen@oz.net
Bainbridge Island, WA http://www.oz.net/~nielsen
IOTA NA-065, USI WA-028S
Reply to: