Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 31st July 2008, 12:27 PM
crainey69 Offline
Registered User
 
Join Date: Oct 2007
Location: Macon, MO
Age: 44
Posts: 330
migrate f9 to new hard drive question

Good morning

Yesterday, my Fedora hard drive decided it was time to fail. I've actually got it to boot again but, shortly after the failure, the controller stopped even seeing the drive.

I have a new drive on the way but, I have a question.. Once the new drive is in, can I just copy the partitions over from the old drive to the new one? I know I'll have to mess with grub some but, beyond that, should it work?

Thanks

Cory
Reply With Quote
  #2  
Old 31st July 2008, 12:55 PM
oneofmany's Avatar
oneofmany Offline
Registered User
 
Join Date: Aug 2006
Posts: 226
yes, you can disk image the drive and that image should be fine on a new drive.

i've done it before to entirely different hardware and even had it work
Reply With Quote
  #3  
Old 31st July 2008, 03:01 PM
A.Serbinski Offline
Registered User
 
Join Date: Jul 2006
Posts: 1,123
Assuming that its possible to read the disk (given what you've said, that is definitely in question), then yes. The easiest way would be to "dd if=/dev/sd? of=/dev/sd?" (if=old_disk of=new_disk) and let it run to completion. You don't just dd the partitions, you dd the entire disk. If you are getting read errors, then you might try something more like "dd if=/dev/sd? of=/dev/sd? conv=noerror", which will continue after read errors. If you do this, then you'll definitely have to do an fsck on the partitions after the copy. Once done, you will also want to grow your partitions to fill the entire disk -- easiest way would be to use gparted off a livecd, though it is possible to expand active ext2/3 filesystems (with or without LVM).

Note1: if you do what I mention above, you do NOT need to mess with grub.
Note2: if you can't read the disk, you can't copy it.
Note3: it is possible that your disk is fine -- your controller could be fried or you could have a loose/bad wire.
Reply With Quote
  #4  
Old 1st August 2008, 01:52 PM
crainey69 Offline
Registered User
 
Join Date: Oct 2007
Location: Macon, MO
Age: 44
Posts: 330
Thanks

I had thought about the controller but, this drive came from a computer that I worked on at work. Windows crashed on it about a year ago. At work, I can just say the drive is bad and replace it. I don't always have the luxury at home. The boss let me bring the drive home and I ran some tests on it and began to use it.

I can read it hit and miss. When I do get it to read, I can boot fedora for about 2 hours then it locks up with I/O errors on that drive.

New drive will be here today so we'll see.

Cory
Reply With Quote
  #5  
Old 1st August 2008, 02:20 PM
crainey69 Offline
Registered User
 
Join Date: Oct 2007
Location: Macon, MO
Age: 44
Posts: 330
Oh, question??

Assuming I get it to read the old disk. Do I need to partition the new disk in anyway before I use dd? I assume I"m doing this from the old install? and the sd? means the whole drive or do I need to fill in something in place of ?

Cory

Edit: Sorry had a stupid moment sd(a) with no partition information.

Last edited by crainey69; 1st August 2008 at 02:22 PM. Reason: stupid moment
Reply With Quote
  #6  
Old 1st August 2008, 03:34 PM
A.Serbinski Offline
Registered User
 
Join Date: Jul 2006
Posts: 1,123
I take it you understand now...

But just for clarity (in case someone else comes across this thread)...

Disks are treated much like regular files with their own (albeit simple) filesystems called partition tables. The disks themselves are listed under /dev/ and have file names of sda, sdb, sdc, etc. The partition table on those disks is stored at the beginning of the disk and describe the size and location of additional containers within the disk. These containers are called partitions and, like the disk itself, partitions are handled much like regular files. These files are identified by NUMBER, hence sda1, sda2, sdc1, etc. Since the partition table and partitions are stored on the disk, copying the whole disk copies the partition table and all of the partitions in a manner that makes them precisely identical to the original.

And of course, this only works if the destination disk is at least as large as the source disk. If the destination is smaller, additional steps must be taken, such as shrinking partitions, reproducing the partition table, copying the disk partition-by-partition, etc. Note this of course: if you want to copy the partition table identically without copying the whole disk, you can use dd to just copy the first little bit of the disk, force a re-read of the partition table (command "partprobe"), then copy partitions individually.
Reply With Quote
  #7  
Old 1st August 2008, 03:44 PM
crainey69 Offline
Registered User
 
Join Date: Oct 2007
Location: Macon, MO
Age: 44
Posts: 330
Yes, I and I understood all along if I would have just thought about it before I posted.

This is funny though. Put an extra gig of Ram in the system 2 days before that happened. Suddenly I couldn't access my Fedora drive. Windows booted but was really weird slow to start right at the splash screen then all went well. Downloaded a live CD today in possible preparation to put f9 back on the new drive and it wouldn't start (lots of page errors).

I pulled the memory back out and all is back to normal. Should have been easy to blame the memory as it was new but errors didn't seem memory related to me.

On the bright side, Tigerdirect is sending me another one free shipping and sent me a return label for the defective memory and I have a new 500gig sata drive even though I'm a little broker now.

Cory
Reply With Quote
Reply

Tags
drive, hard, migrate, question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you migrate a Fedora Core 5 LVM installation to a new hard drive? LinuxHat Using Fedora 15 22nd January 2007 12:29 AM
Hard Drive Question glennzo Hardware & Laptops 11 5th December 2006 07:55 PM
A Hard Drive Question linuxfan Hardware & Laptops 7 28th November 2006 06:35 AM
Hard drive question Flatron Hardware & Laptops 3 27th August 2005 11:01 AM


Current GMT-time: 04:36 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat