You are not logged in.
Pages: 1
I've got an Arch install on a HD that's going bad. I want to preserve the Arch install, but move it over to a new HD. I've hatched a plan for accomplishing this and I'd like to ask for feedback and alternate suggestions.
First, I need to point out that the new HD is larger than the one Arch is currently installed to. This precludes the simplest way of doing this sort of migration (that way being to put both drives in the same machine, boot from a suitable Linux CD, and issue something like
dd if=/dev/archinstall of=/dev/newdrive
from the command line).
I've decided on the following plan of action. First, I'll put the new drive in a machine by itself, boot from the Arch live CD in that machine, and do a minimal Arch install on the drive. That will make it bootable. The next step is to put the drive with the Arch install I want to preserve into that machine along with the new drive and boot the machine from a capable Linux CD. Once that's done, I would mount the two HDs--say, one at /mnt/oldarch and the other at /mnt/newarch. Then, I tar up the entire content of the Arch install I want to preserve and stick the tar file in the root of the new drive. Something like
cd /mnt/oldarch
tar -cvvf /mnt/newarch/oldarch.tar *
Once the tarball is made and placed at /mnt/newarch, just cd to there and untar it, letting it add (and overwrite where relevant) all those files/directories to the fresh install on the new HD.
Sound like a plan? Alternative suggestions?
Thanks,
James
Offline
I'd suggest using the Clonezilla LiveCD. Worked perfectly for moving from my old-old laptop to my old-laptop.
Another alternative to for the tar|
cd /mnt/oldarch
tar cvf - * | (cd /mnt/newarch ; tar xf -)
tar and untars at the same time, and saves having to create an intermediate archive.
But I'd still recomment using the Clonezilla LiveCD over tar.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thanks for the pointers. As you can see, I'm sort of a bash neanderthal. Your tar solution is a lot more elegant and efficient. Guess I should done some web searching on cloning drives--hadn't heard of clonezilla. It really does look like just the ticket.
Thanks,
James
Offline
No stress - just a perfect example of how there's more than 1 way to fsck a cat /dev/sda in Linux
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
I recently did this when I decided to move my arch install on my desktop to my laptop. Minus the things I needed to change due to hardware differences, I just plugged in a usb HD. The system sees it as sdb. My arch install is on primary sda. after patitioning the usb drive they way I wanted it, I booteda live cd and mounted both sda and sdb and just copied everything recursively and in verbos mode so I can watch .. example...
cp -a -v /location-of-hd/sda3/* /location-of-hd/sdb3
Same for sda1 to sdb1 and so on. It's pretty simple if your partition scheme is the same on both drives. Of course after recopying to my laptop from the usb. I needed to do some configuration tweaking which was quite a bit due to the differences in hardware, but I was up and running in much less time than if I had just reinstalled arch on the laptop from scratch.
That might be a very old fashioned way, but it worked really well for me. Anyway, I thought it was worth mentioning.
-- archlinux 是一个极好的 linux。
Offline
That might be a very old fashioned way, but it worked really well for me.
Not at all, this is a quick and most simple solution for his situation. Mount the new disk. Copy everything except /proc (but you create the dir on the new disk) while preserving permissions/ownership/timestamps... (-a). You can then mount /proc and /dev (bind) on the new disk (if boot loader needs to be (re)installed), chroot there, edit fstab, edit lilo.conf and reinstall lilo, reboot.
You need to install an RTFM interface.
Offline
Pages: 1