You are not logged in.

#1 2008-01-30 04:10:45

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Transfer an OS across partitions

I'm feeling the need to do some re-organizing of the partitions on my primary hard drive, and I figured that the best way is probably to just back everything up to another drive, wipe the partition table, and copy everything back.

I can make the backup of my Linux install perfect by using dd to copy it to another drive's partition (of equal size). However, when I want to copy the backup back to my primary drive to a partition of a different size, that's where I'm not sure what to do.

Basically, my question boils down to this:
1) What all in my OS (Arch, obviously) is dependent on its location on the partition? Ie, something that must be written to the first X bytes of the partition. I'm assuming the kernel's position on the disk matters? (Never mind my bootloader for this, it's written to a different partition.)

2) Assuming anything is indeed dependent on its position, how can I put it in position coming from one partition to another?

I hope that makes sense, sorry, it makes more sense in my head. tongue

Offline

#2 2008-01-30 04:26:18

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Transfer an OS across partitions

Maybe, just maybe, you can use gparted to move the excess space in your new partition which is above your existing partition size after first identifying it as swap.  Then move it to the end of the drive, leaving space for a new partition which is the same size as your existing partition.

That, maybe, will accept the dd transfer since the partition size is identical.  After all is done, delete the swap.

I hope I made sense.....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2008-01-30 05:38:14

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Transfer an OS across partitions

The thing is I want to lay down several partitions, there won't be any excess space except at the end of the drive, where I absorb the misc rounding and such.

Offline

#4 2008-01-30 07:21:42

gradgrind
Member
From: Germany
Registered: 2005-10-06
Posts: 921

Re: Transfer an OS across partitions

Nothing is so position dependent, except perhaps grub, which you say is not relevant in your case. You can use 'cp -a' to copy stuff around. Just beware that if the partitions change you will need to edit /etc/fstab and grub's menu.lst.

Offline

#5 2008-01-31 09:38:20

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Transfer an OS across partitions

Thanks. I tried it and 'tis so. :-)

Offline

Board footer

Powered by FluxBB