You are not logged in.

#1 2005-03-14 16:08:04

killerfish
Member
Registered: 2004-11-24
Posts: 41

How to move Arch to a bigger Partition?

Hello gang, 

I currently have Arch installed on the 3rd partition of my second hard drive.  It's a 10 gig partition. 

I've been VERY pleased with Arch, and I am using it as my primary distro.  As such, I want to move it to the 1st partition on my second hard disk because it's 60GB.  Here's the steps I was going to take, anyone see any issues?

1) Boot Arch Live CD to ensure proc tmpfs, etc. aren't mounted
2) Mount old and new as follows:
   > mount -t reiserfs /dev/discs/..../part3 /mnt/OldArch32
   > mount -t ext /dev/discs.../part1 /mnt/NewArch32
3) Copy contents and perserve permissions,links,etc. as follows:
   > cp -a /mnt/OldArch32/* /mnt/NewArch32

4) Update /mnt/NewArch32/etc/fstab to point / to part 1 instead of part 3
5) Add Grub menu entry to /mnt/OldArch32/boot/grub/menu.lst for new Arch32
6) Reboot and test both
7) If successful, re-install grub's root to point to hd(1,0) instead of hd(1,2)

Thanks for input!
KF

Offline

#2 2005-03-14 17:37:38

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: How to move Arch to a bigger Partition?

Sounds good to me.

Offline

#3 2005-03-14 17:45:29

killerfish
Member
Registered: 2004-11-24
Posts: 41

Re: How to move Arch to a bigger Partition?

Yep, it worked...  Typing this on a 60GB Arch partition.  Wow that was easier than I expected....

Offline

#4 2005-03-14 18:36:59

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: How to move Arch to a bigger Partition?

Now try doing that with Windows. :-D

I remember saying 'that was easier than I expected' when I tried this procedure with an LFS system years ago. And somebody responded "Now try doing that with Windows"

What goes around comes around. :-D

Dusty

Offline

#5 2005-03-14 18:43:40

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: How to move Arch to a bigger Partition?

I would have tried dd if=/dev/hd_src of=/dev/hd_dst bs=512 count= (dunno to lazy to calculate it and my calculator is broken). but then the partion would still have to be resized, so I think cp could be easier wink.

Offline

#6 2005-03-14 19:03:17

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: How to move Arch to a bigger Partition?

I did the same moving from 8.5GB HDD to 120GB HDD (SATA).
It was amaizingly easy (except for: I forgot to use -a option and I realised that only after I had started using the cloned system).

The original ArchLinux installation now serves as a server for the home network.

IceRAM

P.S.1 I installed ArchLinux only once in my entire life (more than one year ago). I remember it took me one week to get everything going (firewall, NAT etc. because I didn't know a think about it).

P.S.2. I haven't tried doing the same thing with Windows, but I admit I had thought about how it would NOT handle it smile

Offline

#7 2005-03-14 19:59:08

killerfish
Member
Registered: 2004-11-24
Posts: 41

Re: How to move Arch to a bigger Partition?

Dusty wrote:

Now try doing that with Windows. :-D

Exactly!!!  But why would I want to move Windows to a larger partition? smile

Offline

#8 2005-03-14 20:13:11

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: How to move Arch to a bigger Partition?

as soon as the virtual memory file grows bigger than 5gb wink

Offline

#9 2005-03-14 20:32:32

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: How to move Arch to a bigger Partition?

Use cp -ax if you try to copy the current root system. The -x forces the copy to stay on the same filesystem so that you won't also copy all mounted filesystems like /proc, /sys, /mnt/*.

Offline

#10 2005-03-14 20:43:19

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,366
Website

Re: How to move Arch to a bigger Partition?

Dusty wrote:

Now try doing that with Windows. :-D

well ... try to install windows. this is in the meantime more complicated and more tricky than almost every linux distro i know. i had to help a friend reinstall win2k and we lost an afternoon booting from the cd, making floppies, emergency floppies, boot-floppies, formating the harddrive in ntfs then in fat16 then manually in fat32 untill we finally had the basic win2k running - then about half an hour ago, this installation was going automagically on the net updating windows but on this way got some virus and is dead. 5 hours lost! in this time you can install 10 time archlinux! (unfortunately some people need win for their daily work and wine is missing directx or something like that (the wine that comes with archlinux))

anyway: windows is more complicated than the ms-marketing is trying to let us know. why would they preinstall it? surely not because of the userfriendly installer and fairness ;-)

yet another thing: try running something like rosegarden for free, for legal on windows - doesn't exist? cant build rosegarden on win32? he he ... use (arch)linux or OSX :twisted:


The impossible missions are the only ones which succeed.

Offline

#11 2006-07-20 05:38:11

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: How to move Arch to a bigger Partition?

I have a question, with regard to copying "special" directories:

/dev
/proc
/sys

Is there anything special which needs to be done? I did not copy them and just did mkdir instead (i should have read this topic before) - and my system fails to boot with "Unable to open initial console" - which accoring to google can be caused by missing /dev.
So please can someone write an exact cmd to copy those? Is

cp -a  /mnt/old_root/dev /mnt/new_root/dev/
cp -a mnt/old_root/proc /mnt/new_root/proc
cp -a /mnt/old_root/sys /mnt/new_root/sys

enough?
Is there other way to recreating these directories (since my old h/d might be unreadable)?

Offline

#12 2006-07-20 09:24:31

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: How to move Arch to a bigger Partition?

you'll want to chroot into the drive and run migrate-udev. it creates static device nodes for consoles and other important devices (like null, for instance) so the system can boot before udev starts.

if you can't chroot, just mount and cd into your root partition and do this:

rm -rf dev/console dev/null dev/zero
mknod dev/console c 5 1
mknod -m 666 dev/null c 1 3
mknod -m 666 dev/zero c 1 5

that's pretty much what migrate-udev does. i took that right from the script.

Offline

#13 2006-07-20 10:15:51

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: How to move Arch to a bigger Partition?

And what about /proc and /sys?

Offline

#14 2006-07-20 11:44:09

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: How to move Arch to a bigger Partition?

drakosha wrote:

And what about /proc and /sys?

They're created at boottime.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#15 2006-07-20 12:22:02

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: How to move Arch to a bigger Partition?

Thanks, so i guess i need to create the devices as paranoos suggested above.

Thanks a lot!

Offline

#16 2006-07-20 12:58:07

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: How to move Arch to a bigger Partition?

killerfish wrote:

Hello gang, 

I currently have Arch installed on the 3rd partition of my second hard drive.  It's a 10 gig partition. 

I've been VERY pleased with Arch, and I am using it as my primary distro.  As such, I want to move it to the 1st partition on my second hard disk because it's 60GB.

Why do you want a 60G partition for Arch? Even 10G is much much more than you need.

Another thing about moving/cloning the system: You don't have to boot from a live cd, you can use the Arch system you are trying to clone.

Offline

#17 2006-07-20 19:08:18

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: How to move Arch to a bigger Partition?

paranoos's suggestion worked like a magic!

Offline

Board footer

Powered by FluxBB