You are not logged in.
Pages: 1
I just got a new faster and bigger HD and would like to move my Arch installation from the old one to the new. What would be the simplest way to do this? We're talking about two IDE drives, no SATA, no nothing.
My HD layout is as follow:
/dev/hda1 is /boot
/dev/hda2 is swap
/dev/hda3 is /
I found some advice using Google but it seems to be quite a hassle. Surely there's an easier way to do this? Although making a clean install wouldn't be a bad thing, I'd much rather keep my old installation.
Just your basic anime otaku some might even call nijikon.
Offline
you could use dd to transfer the image across, but this will leave spare capacity on the new drive as its bigger. you would then have to maybe make new partitions outside your transferred image.
Offline
First I make sure that I don't make my current install unbootable...
Then carefully set-up partitions using fdisk or qparted.
Next I use
cp -a
to copy everything from hda over to hdb.
I then edit the copied fstab on hdb drive to ensure that the new installation will be reading from the hdb disk when it first boots. (Of course if you want to keep hda1 as your boot then leave it as hda1.)
I then add a new entry to grub pointing to the new install on hdb. Then reboot and cross fingers.
fck art, lets dance.
Offline
the most consistent way to do this is using a regular tarball with preserved permissions for one fs each. in your case:
tar cfpl / | tar xfvp - -C /your/new/
tar cfpl /boot | tar xfvp - -C /your/new/boot
then bind all necessary pseudo-filesystems to the new root and chroot to install grub/lilo. that should be it.
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
Done, I copied all files from the old drive to the new, edited fstab, booted with boot CD and re-installed grub. That's it, works nice.
Thanks!
Just your basic anime otaku some might even call nijikon.
Offline
Congratulations! I've been wanting to do a similar move so tell me: did you follow the method proposed by clarence or the one by kth5? I don't understand what kth5 means by pseudo-file systems :oops:
I originally installed Arch in a rather small partition as an experiment (I play around with lots of different distros looking for "the keeper" among those out there). Arch has turned out to be so good that I think my search is over! 8) I plan now on moving the current installation to a different hard disk and giving it more space.
Regards,
-- Dr.U
----------------------------------------------------------------------
"You can observe a lot just by watching." -- Yogi Berra
Offline
Congratulations! I've been wanting to do a similar move so tell me: did you follow the method proposed by clarence or the one by kth5? I don't understand what kth5 means by pseudo-file systems :oops:
pseudo-filesystems are for example devfs, proc and sysfs. by binding them to a new root i mean doing something like this:
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
this is necessary to install grub or lilo from within a chrooted environment. they both need to read /proc/partitions to figure out how to match the setup with the physical layout of the disks. the above method does work with every directory by the way.
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
Thanks for the explanation, kth5!
Am I correct that, if I perform the move to another hard disk or a larger partition on the same disk, but already have grub installed in yet another location, then I can skip the chroot-stuff (i.e. binding the pseudo-filesystems) and just correct the grub menu.lst file's information for the Arch entry?
Regards,
-- Dr.U
-----------------------------------------------------------------------------
"I'm taking viagra and drinking prune juice --
I don't know if I'm coming or going." -- Rodney Dangerfield
Offline
Am I correct that, if I perform the move to another hard disk or a larger partition on the same disk, but already have grub installed in yet another location, then I can skip the chroot-stuff (i.e. binding the pseudo-filesystems) and just correct the grub menu.lst file's information for the Arch entry?
it depends on wether you leave the hdd with the original grub setup in the machine or not. even if you do, this can complicate things a bit as your menu.lst is still being read from the old location instead out of the new rootfs (if you copied /boot too). in my opinion it would be easier to just switch the order of the discs (hda <=> hdb) after copying and rerun grub-install so that it installs itself onto the new system disc.
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
OK, kth5, thanks for the help and quick answers!
Arch is not only the best, it also has the best support for old farts like me.
Regards,
-- Dr.U
-------------------------------------------------------------------------------
"A man's only as old as the woman he feels." -- Groucho Marx
Offline
Pages: 1