You are not logged in.

#1 2007-09-11 15:33:24

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

copy existing Arch Linux install to bigger hd?

Hi there,

Since my existing 40GB HD  is failing, I bought a new 80GB and hoped to keep my existing config, so I recreated the same partitions on the new disk except for the /home:

OLD:
55MB /boot (EXT2)
2GB SWAP
10GB / (ReiserFS)
28GB /home (ReiserFS)

NEW:
55MB /boot (EXT2)
2GB SWAP
10GB / (XFS)
68GB /home (XFS)

After creating these partitions / file systems, I made the /boot-partition bootable and copied everything to their counter-directories, using:
cp -Rpv /mnt/root/* /mnt/root2/

Now I thought I only needed to get the MBR-part (grub) right, so I used an Arch-install-cd to boot from, but I get a kernel panic during the bootprocess. This is hopefully due to the old version of my Arch-install-cd (0.7.2), so I'm about to download the newest and use that one.

Am I overlooking something?

Zl.

Offline

#2 2007-09-11 15:38:47

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

Re: copy existing Arch Linux install to bigger hd?

Did you update fstab (root fs change)?

And try booting with fallback initrd image.

Last edited by lucke (2007-09-11 15:40:45)

Offline

#3 2007-09-11 15:52:54

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: copy existing Arch Linux install to bigger hd?

zenlord wrote:

Hi there,

Since my existing 40GB HD  is failing, I bought a new 80GB and hoped to keep my existing config, so I recreated the same partitions on the new disk except for the /home:

OLD:
55MB /boot (EXT2)
2GB SWAP
10GB / (ReiserFS)
28GB /home (ReiserFS)

NEW:
55MB /boot (EXT2)
2GB SWAP
10GB / (XFS)
68GB /home (XFS)

After creating these partitions / file systems, I made the /boot-partition bootable and copied everything to their counter-directories, using:
cp -Rpv /mnt/root/* /mnt/root2/

Now I thought I only needed to get the MBR-part (grub) right, so I used an Arch-install-cd to boot from, but I get a kernel panic during the bootprocess. This is hopefully due to the old version of my Arch-install-cd (0.7.2), so I'm about to download the newest and use that one.

Am I overlooking something?

Zl.

Maybe XFS is acting up, dunno.  btw, XFS is a particularly bad choice of a file system for /, IMO.  Pacman is going to be soooooo sloooooowwwwwwwwww.  Really.  Been there done that, and switched back to reiserfs very quickly.

Offline

#4 2007-09-11 20:47:58

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: copy existing Arch Linux install to bigger hd?

Yeah well, I've given up.

I just installed Arch all over again and copied the /home over to my new installation.

Booting the copied-over-system wouldn't work, not even with the Arch install cd's (both 07.2 and 2007.8.1). And when booting from the HD, all I got was 'GRUB configuration error" or even 'GRUB ". I couldn't edit the menu.lst or anything and that's where I quit.

As for XFS: pacman is indeed slower, but the bootup is much quicker. That was my main reason not to choose ReiserFS again.

THX for your answers!

Zl.

Offline

#5 2007-09-20 12:49:20

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: copy existing Arch Linux install to bigger hd?

Well actually it's pretty simple to do. It's best to do the copying from a different source like a live cd. I did this not long ago and everything worked perfect. It's important that you use the -a switch with cp to preserve all permissions.

For example, This is what I did...

My primary hd is sda and is partitioned like so....

sda1 = ext2 = boot
sda2 = swap
sda3 = ext3 = /

I formatted and created the same partition scheme on my secondary disk (sdb) as I used for my primary disk (sda), and although I didn't have to, I used the same file systems aswell. Then I booted from a usb install that I use for emergencies, (You could use a live cd). Anyway, I mounted the primary (sda1 sda3) and secondary (sdb1 sdb3) partitions under /mnt from my usb install.

then all I did was execute....

# cp -a -v /mnt/sda3/* /mnt/sdb3

I watched the screen scroll for quite a while, and then

# cp -a -v /mnt/sda1/* /mnt/sdb1

After that, I added a boot entry to my primary hd (sda1) /boot/grub/menu.lst to boot the cloned sdb install because I still wanted to boot from my primary hd (sda). Then, as a backup, I copied the (sda1) menu.lst to overwrite the secondary (sdb1) boot/grub/menu.lst, just incase in the future I may need to make sdb the primary boot hd for what ever reason.

Then I had to edit the sdb's fstab to reflect sdb instead of sda.

Then I booted back into my original sda install to make sure I didn't hose anything.
After verifying that everything was cool, I mounted sdb1 and sdb3 to bouble check that /boot/grub/menu.lst and the /etc/fstab were correct.  Then, again as a back up, I installed grub to the mbr of sdb using the grub-install script.....

# grub-install hd1
(in grub terminology, hd1 corresponds to my secondary hd being (sdb)

That's it. I rebooted into my cloned install on sdb. Then, as a test, I booted into the bios setup and made sdb the primary boot disk, and rebooted just to make sure everything worked using sdb as the default boot hd.

Now I'm using sda as my main install, and sdb is for testing only. My whole reason for doing the clone.

Sorry if I explained that in too much detail! I know it's an old fashioned way of cloning, but it worked flawlessly smile

Last edited by Leigh (2007-09-20 13:51:57)


-- archlinux 是一个极好的 linux

Offline

Board footer

Powered by FluxBB