LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 06-23-2010, 09:03 PM   #1
vincebs
Member
 
Registered: Oct 2003
Location: Mississauga, ON
Distribution: Ubuntu 9.04
Posts: 494

Rep: Reputation: 30
Wrote to partition while making image file w/ dd: Did I mess it up?


Hi everyone,

I recently bought a 500 GB hard disk to replace my 120 GB one. I have an external hard drive so I did:

sudo dd if=/dev/sda of=/media/LaCie/harddisk.img

in order to make an image of the entire hard disk on my external LaCie hard drive. But being bored (and stupid), I decided to go around and edit* a couple of files on the drive during the 12 hours it took to create the image file.

Now I took out the old hard disk and put in the new hard disk and booted using a Ubuntu 9.04 LiveCD and issued the command:

sudo dd if=/media/LaCie/harddisk.img of=/dev/sda

When I come back tomorrow, will my computer boot up? Or did my editing screw up my files?

*The "editing" is because I was using Ubuntu 10.04 on the hard disk I was trying to copy, so I probably moved things in and out of swap and temporary internet files, as well as accessing (but not editing, except for the time-stamps) of the other partitions on the hard disk.
 
Old 06-23-2010, 09:53 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
I don't think there is any way of knowing what was affected until you try to restore from the disk image.

As you doubtless already know, what you did was not a good idea. BUT: The first thing to do is make sure the original HD is OK. If so, then just make a new image file.
 
Old 06-23-2010, 10:52 PM   #3
vincebs
Member
 
Registered: Oct 2003
Location: Mississauga, ON
Distribution: Ubuntu 9.04
Posts: 494

Original Poster
Rep: Reputation: 30
The restoring of the image went better than expected, I had both Mac OS X and Ubuntu installed, both reported errors when they booted up on the new larger disk, but they managed to fix themselves. It sort of makes sense, since I probably affected only a couple hundred files out of 20,000+ files on the hard disk when I was making the image.

The main problem I have now is to convince Mac OS X and Ubuntu that the hard disk is now 500 GB and not 120 GB...
 
Old 06-24-2010, 09:18 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
I don't recall if you stated what your partitioning setup is. For example, I would NEVER want to have a 500GB drive with only one partition.

Regardless, if you clone a partition to another drive, you get the same size partition that you started with. You can then re-size the partition using any of the standard tools. The GParted live CD is always good to keep handy.
 
  


Reply

Tags
clone, disk, drive, hard, partition


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing partition of an image file galapogos Linux - Software 12 11-26-2008 08:40 PM
Making an image of my partition in Win2k? Jorophose General 5 06-20-2007 09:00 PM
make complete image file from partition file for qemu lbdgwgt Linux - Newbie 2 11-16-2006 09:04 AM
Help Making Topologilinux 5 Image File Larger Garibaldi3489 Slackware 1 10-31-2004 12:06 PM
Making a partition image PhuckFonix Linux - General 6 06-27-2004 02:06 PM


All times are GMT -5. The time now is 05:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration