Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] new hdd for root partition,what to do ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
michael_
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2007
Posts: 76

PostPosted: Thu Nov 05, 2009 8:17 am    Post subject: [solved] new hdd for root partition,what to do ? Reply with quote

hi there,

i plan to use a new hdd for my root,boot and swap partition, currently 160gb with ext3 (boot ext2) , the new one would be a 500gb with ext4 (boot ext2)

so is there a simple (and perhaps fast) way of copying the contents of the old one to the new, like cp -r / /path/to/newhdd ?
are there any important things to observe, except correct fstab and grub.conf

or have i to rebuild my hole system ?


thanks for any help

greetings
michael


Last edited by michael_ on Thu Nov 26, 2009 12:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
noice
Guru
Guru


Joined: 05 Dec 2005
Posts: 473
Location: italia, Ischia

PostPosted: Thu Nov 05, 2009 8:32 am    Post subject: Reply with quote

i think you need
Code:
cp -a old_path new_path

_________________
Noice

when you post remove comments
Code:
grep -vh '^[[:space:]]*\(#\|$\)' "$@"
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Thu Nov 05, 2009 8:40 am    Post subject: Reply with quote

as long as you stick to the same system, only fstab and grub can cause problems...

for consistency reasons, I would suggest to use a liveCD for the move.
  • boot up the live cd
  • partiton and format the new hdd
  • mount both hdds, (i.e new one to /mnt/gentoo, the old one to /mnt/oldsystem; don't forget boot)
  • copy your system (cp -av /mnt/oldsystem/* /mnt/gentoo/)
  • mount proc and dev to the new system
  • chroot, and install grub (don't forget to adjust grub.conf)
  • fix fstab (i.e sda -> sdb)



cheers
V.


Last edited by Veldrin on Thu Nov 05, 2009 2:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Nov 05, 2009 12:45 pm    Post subject: Reply with quote

You can use a Stage 5 to backup your things.
Back to top
View user's profile Send private message
Januszzz
Guru
Guru


Joined: 04 Feb 2006
Posts: 367
Location: Opole, Poland

PostPosted: Thu Nov 05, 2009 5:28 pm    Post subject: Reply with quote

No, no and no. All of above solutions are too complicated! Fast, easy and perfectly reliable is only mine :wink:

Rsync is used here to synchronize two directories, x option says it should stay on one filesystem, avH stands for all verbose, H for preserving hard links, progress is just for progress.

Code:
rsync -avHx --progress / /mnt/root/


Then adjust grub.conf and fstab, install grub on your new drive (using manual) or adjust your existing grub (if you want to boot from the old disk).

Oh, and I've forgot to mention that you need to be on runlevel 1 or instead you agree to lost data written after your last rsync.

All done :-)
Back to top
View user's profile Send private message
michael_
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2007
Posts: 76

PostPosted: Thu Nov 26, 2009 12:32 pm    Post subject: Reply with quote

thanks for the tipps,
i tried the last one,the rsync-thing, with my home/- hdd.
connecting the new hdd directly to the sata controller. about 1 or 1 1/2 half hour for ~400GB of data.
the great thing was that i not really felt whats going on.
so i could continue work and later simply changed the hdd ...
and forgot to change the fstab filesystem line to ext4 ^^


for the root partition i am going to wait, because i've not really time to do this at the moment

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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