Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Moving installed Gentoo from a partition to another
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
MehdiYM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2003
Posts: 82
Location: France

PostPosted: Sat May 31, 2003 7:58 am    Post subject: Moving installed Gentoo from a partition to another Reply with quote

Is it possible to move easily an installed Gentoo from a partition to another, precisely from a HDD to another ?

Can I copy all files with a
Code:
# cp -r / /mount_point

then modify /etc/fstab ?

and what about /proc, /dev, .... ?
Back to top
View user's profile Send private message
iwasbiggs
Apprentice
Apprentice


Joined: 17 Jan 2003
Posts: 203

PostPosted: Sat May 31, 2003 8:23 am    Post subject: Reply with quote

if you're just trying to mirror stuff, and you have another partition of similar size (and plan on swapping the disks), I would just use dd if=/dev/old of=/dev/new

Then double check /etc/fstab and your boot stuff.
_________________
www.ruinedsoft.com
Freeware development.
Back to top
View user's profile Send private message
MehdiYM
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2003
Posts: 82
Location: France

PostPosted: Sat May 31, 2003 9:04 am    Post subject: Reply with quote

and if my another partition have a different size ?
Back to top
View user's profile Send private message
Cossins
Veteran
Veteran


Joined: 21 Mar 2003
Posts: 1136
Location: Copenhagen, Denmark

PostPosted: Sat May 31, 2003 9:14 am    Post subject: Reply with quote

Just ensure that the one you're copying to is larger than the original.

- Simon
Back to top
View user's profile Send private message
infirit
l33t
l33t


Joined: 11 Jan 2003
Posts: 778
Location: Hoofddorp / The Netherlands

PostPosted: Sat May 31, 2003 3:34 pm    Post subject: Reply with quote

Code:
cp -pR / /mountofnewpartition
should also work i think.
Greetz
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20503

PostPosted: Sun Jun 01, 2003 12:50 am    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
iwasbiggs
Apprentice
Apprentice


Joined: 17 Jan 2003
Posts: 203

PostPosted: Sun Jun 01, 2003 10:37 am    Post subject: Reply with quote

If you do end up using cp, try to use the -p for saving permissions.
_________________
www.ruinedsoft.com
Freeware development.
Back to top
View user's profile Send private message
StuBear
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 157
Location: Melbourne,AUSTRALIA

PostPosted: Sun Jun 01, 2003 11:59 am    Post subject: Reply with quote

cp -ax / /mntpoint

the -a will keep permissions and modtimes etc and the -x will only copy stuff on the same partiton - /dev/ and /proc won't be copied to the new partiton, make sure you mkdir /mntpoint/dev and mkdir /mntpoint/proc after you finish copying.

You can do some stuff like piping into tar and untar, but I've never had a problem with cp -ax
_________________
Since it is the optimal DVD-RAM correspondence for backup of personal computer data, and lighting soft needlessness, it is data preservation by floppy disk feeling.
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Thu Jun 05, 2003 12:15 am    Post subject: Reply with quote

Sooooooo... has anyone actually had any success with this? I'm gonna wipe my XP off my dual boot sometime soon, and I'd like to bump Gentoo up to /hda3 instead of /hda6 (and move around /home/steve at the same time too ... ), but I'd feel a lot better if I saw a success story. :wink:
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
MacFlecknoe
Apprentice
Apprentice


Joined: 11 Feb 2003
Posts: 189
Location: Ann Arbor, MI

PostPosted: Thu Jun 05, 2003 1:13 am    Post subject: Reply with quote

I JUST did this 4 days ago. I moved my gentoo distro from a 20gig drive to an 80gig drive. I used cp -ax as described above. The only trick is reinstalling grub in the MBR... but to do that without much thought you can simply use a boot cd/disk (at least I did... you can also just copy it to the akternate hd by running grub and specifying the new drive in your 'root' and 'setup' commands but I get confused easily and a boot disk seemed more straightforward).

Incidently... dont copy /proc.. that file system is dynamically created by the kernel. You will need to copy /dev over however (esp if youve created new nodes).

This is a good tutorial:
http://www.tldp.org/HOWTO/mini/Hard-Disk-Upgrade/index.html

Best of luck!
Back to top
View user's profile Send private message
StuBear
Apprentice
Apprentice


Joined: 26 Feb 2003
Posts: 157
Location: Melbourne,AUSTRALIA

PostPosted: Thu Jun 05, 2003 3:20 am    Post subject: Reply with quote

I've done this at least 10 times with about 4 different linux distros - always trying to get the "optimum" partition layout. :)

Unless you move your /boot parttion there is on need to reinstall grub, just add a new entry in grub.conf pointing to your new / partition.

Reboot and try it out, this way if it doesn't work properly you can always reboot back into your old setup and correct any errors (like forgetting to update /etc/fstab to point to your new partions).

Only when I'm happy that everything is working will I reomve the old partition.
_________________
Since it is the optimal DVD-RAM correspondence for backup of personal computer data, and lighting soft needlessness, it is data preservation by floppy disk feeling.
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Thu Jun 05, 2003 12:43 pm    Post subject: Reply with quote

StuBear wrote:
I've done this at least 10 times with about 4 different linux distros - always trying to get the "optimum" partition layout. :)


That's one thing I was wanting to do too.... any suggestions? I've got 40 gigs in two partitions from Gentoo right now, on an 80 gig HD (xp took up the other 40), so Ive got a 10, 30, 20 and 20 gig partition setup right now.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20503

PostPosted: Wed Aug 04, 2004 11:15 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic.php?t=75699
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum