You are not logged in.

#1 2012-07-15 00:25:13

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

[SOLVED]Shift my Arch install to a new (smaller) PC/HDD?

Hey all, I've looked around all sorts of forums for the answer to this, but none of them seem to cater exactly to my need, so I'll post my problem here!

Essentially I bought a new harddive. Well actually, I bought a whole new PC-worth of parts, but it's the harddrive causing problems.

I've had this Arch install for quite a while, and as such it's pretty well tweaked and messed about with, so I REALLY don't want to start again with a clean install, so I want to (For lack of a better terminology) Copy-paste my entire Arch install into the new harddrive.

I looked into Clonezilla, but there's a slight issue... My new drive is smaller than my old one. I know this was a dumb mistake on my part, but really I don't need anything bigger (Even with a load of movies, VM's and Wine games that can easily be deleted I'm only using 60-70GB of drive right now) And the only reason I really needed a new drive was because the new motherboard doesn't have an IDE slot, and my old drive is an IDE (I know there's adaptors for that, but they sound a bit dodgy at best)

My current partitions on my drive are also numbered a bit funny, which I think is where this went wrong when I attempted it, due to me distro-hopping a bit before landing on Arch.

So, is there an easy way to go about this, that I'm overlooking? Are there more config files that I should have editted (All I did upon clonezilla-ing the main partition was change the grub menu.lst file to say sda1 instead of sda3, and the same in fstab)

What I tried first time round, was to use Clonezilla, and only clone my /dev/sda3 partition (That's the one with Arch installed, sda1 is just an empty box that I occasionally store junk in) And this put a partition on the new drive, sda1, which was the reason for editting the menu.lst/fstab.

I then (Upon the above failing to boot) used GParted (Using a Mint LiveCD) To shrink my partitions down so they're approx. 65GB each (My current drive is 200GB, split equally in half, and my new drive is 160gb) Hoping Clonezilla would believe my drive was only 130GB (This still didn't work, it still told me the destination drive's too small)

Is there anything else I can do that I'm missing?

Last edited by Reded (2012-07-15 17:12:58)


"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."

Offline

#2 2012-07-15 01:22:33

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,542

Re: [SOLVED]Shift my Arch install to a new (smaller) PC/HDD?

If you have your package files on the old harddrive that are still readable, you could speed up the installation of Arch, but this might be unreliable.
Clonezilla would be considered also duplicating errors from the old drive to the new drive. 
If your partitions were managable enough, the drive not being fully utilized, would make the process easier.
Size does not matter as long as you could snail copy the files back into the partitions in the right order, but this is probably not the case. 
If nothing else, you could snail copy the files into their proper partitions on the new drive, but with an unreliable drive this is still trivial.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2012-07-15 01:31:15

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]Shift my Arch install to a new (smaller) PC/HDD?

- Partition the new drive
- Format the new partitions and tweak things like reserved space and fsck interval.
- Copy all files from old disk to new disk (probably you want to use rsync)
- Adjust fstab and menu.lst to point to the new partitions
- Install grub to the new disk (might require a bit of trial and error until you get it right)
- Boot with the fallback image
- Regenerate the initramfs
- Profit

No need to reinstall or other complicated procedures.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2012-07-15 17:12:31

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED]Shift my Arch install to a new (smaller) PC/HDD?

Phew, thread is solved!

To R00KIE, your post actually helped me quite a lot - It turns out I was missing installing grub + regenerating initramfs tongue

So how I did it:

GParted the new drive so it had a filesystem
Boot from a Ubuntu LiveCD,
mount both drives
copy-paste drive-to-drive (literally... used the cp command)
chroot into the new drive
adjust fstab/menu.lst
grub-install /dev/sda
mkinitcpo -p linux
reboot
???
PROFIT!

You're right ROOKIE, that whole process was far simpler than some websites make it out to be wink Thread closed!


"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."

Offline

#5 2012-07-16 00:04:31

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]Shift my Arch install to a new (smaller) PC/HDD?

Well, cp -ar (and maybe a couple more switches) will do, but usually I use rsync as it will allow you to safely resume transfers. Make sure permissions and ownership of files have been copied correctly or it might come back to bite you later.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB