![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Linux Support Linux - Operating Systems and Applications Support |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
|
[SOLVED] Converting HDD
I recently got a 500BG HDD for my birthday. I need to know how to convert all of my data from my current HDD which is only 80GB to my new 500GB HDD. I am currently running Ubuntu 8.04. Any help that you can give me is much appreciated.
Cheers!
__________________
Linux Forever! Learning is doing, not being able to follow steps put forth by others. |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Jul 2008
Posts: 26
OS: XP_SP2, Debian, Server 2003, Freebsd
|
Re: Converting HDD
When you say convert what do you actually mean? If you mean transfer then I would hook them both up.
one should be on /dev/sdax and the other on /dev/sdax where x will represent some number. I believe Ubuntu should auto mount them. |
|
|
|
|
|
#3 (permalink) |
|
Registered User
|
Re: Converting HDD
Samuraltux, you are right I actually ment transfer. When I hook the new one up and it reads it, how do I transfer all my files from one to the other?
Cheers!
__________________
Linux Forever! Learning is doing, not being able to follow steps put forth by others. |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Jul 2008
Posts: 26
OS: XP_SP2, Debian, Server 2003, Freebsd
|
Re: Converting HDD
mount both of the drives then do a cp So an example would be
Code:
cp /dev/sda1/*.* /dev/sda2/*.* Code:
cp /media/usbdisk/*.* /media/usbdisk2/ |
|
|
|
|
|
#5 (permalink) |
|
Moderator
Join Date: Sep 2004
Location: Colorado
Posts: 690
OS: Mac OS 9.1, Mac OS X 10.5.4, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: Converting HDD
cp -r might work, but it might have issues with symlinks. What I did when moving a Gentoo install from an external drive to an internal one was use rsync.
Something like Code:
sudo rsync -avh old_drive_partition new_drive_partition Make sure the install is working fine from the new drive before deleting stuff from the old one.
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Oct 2007
Location: Littleton, Colorado USA
Posts: 385
OS: xp 64 sp2 Fedora Core 8 (vmware xp core 8 x32) Minix
|
Re: Converting HDD
For a really obscure copy of directories use the following:
#to copy an entire directory tree. 1) mkdir <TARGET DIR> 2) cd <FROM DIR> 3) tar cf - . | ( cd <TARGET DIR> ; tar xBf - ) This series of command was used before the cp command had "-R" option that would recurse down directory trees. The 3rd line pipes one tar command into another tar command after changing into the target directory. The tar command preserves file dates. I would suggest if you use the cp command to use the -Rp to recurse directories AND preserve time stamps on the files. None of these commands will make the new disk bootable. You will have to re-register the GRUB with the kernel image and the boot file system. I think your 80 Gbyte disk has two partitions on it. One is /boot and the other is / (root). If you set up the new disk with /boot EXACTLY the same as the old one, then run the "dd" command on /boot, I think you will preserve the booting ability. Use "dd in=/dev/sda1 of=/dev/sdb1. Note: that you are copying RAW disk sectors and not file systems. "dd" will read raw disk sectors and write them to the output. Once the boot has been copied, then the root file system can be copied with "cp" or tar or backup and restore. GRUB has to be able to find the root file system when it boot the kernel. If it doesn't find the root file system the kernel panics and the boot will hang. You can edit all the parameters when the initial GRUB screen is seen. I hope this helps a little. |
|
|
|
![]() |
| Thread Tools | |
|
|