View previous topic :: View next topic |
Author |
Message |
dasPaul Apprentice
Joined: 14 Feb 2012 Posts: 243 Location: Dresden
|
Posted: Sat Jul 20, 2013 4:49 am Post subject: dd clone gpt disk (Sony Vaio recovery) |
|
|
Hi there
I would like to ask you if it is possible to clone my whole SSD from my new Sony Vaio. I need an exact copy with partition table because the drive contains the Win8 Recovery Data (UEFI,GPT).
I found the following procedure here:
using dd to read the drive, pipe it to gzip and save it over nfs mount:
Code: | # dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c > /mnt/nfsmount/sda.img.gz |
and Iam confused about this:
Code: | 5. Save extra information about the drive geometry necessary in order to interpret the partition table stored within the image. The most important of which is the cylinder size.
# fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info
|
Why do I need this? This will not work on my GPT Partition as fdisk complains, Isnt the drive geometry already stored in the image and if not, do I have to write it later back?
and later I would like to restore the drive to the original state with:
Code: | # gunzip -c /mnt/nfsmount/sda.img.gz | dd of=/dev/sda |
Questions over questions |
|
Back to top |
|
|
smartass Apprentice
Joined: 04 Jul 2011 Posts: 189 Location: right behind you ... (you did turn around, didn't you?)
|
Posted: Sat Jul 20, 2013 5:55 am Post subject: |
|
|
AFAIK dd does a byte copy of the drive, so I also think there should be no need to reconstruct GPT after that manually. Of course, that is if the drive you copy to is almost identical for the sectors to correspond.
However, I always also store a fdisk -l (or gdisk -l for GPT) output too, makes it possible to mount the partitions on loopback with parted as you can find the offset in the output. And it would help a lot if you're copying back onto a slightly different drive.
So most likely the article assumes that you may not have an identical drive.
On a different note, perhaps this thread would fit better in a different, more support oriented subforum |
|
Back to top |
|
|
zexo n00b
Joined: 21 Aug 2013 Posts: 1
|
Posted: Wed Aug 21, 2013 12:20 am Post subject: aaaaaa |
|
|
asdsdfs |
|
Back to top |
|
|
srs5694 Guru
Joined: 08 Mar 2004 Posts: 434 Location: Woonsocket, RI
|
Posted: Wed Aug 21, 2013 1:31 am Post subject: Re: dd clone gpt disk (Sony Vaio recovery) |
|
|
dasPaul wrote: | I would like to ask you if it is possible to clone my whole SSD from my new Sony Vaio. I need an exact copy with partition table because the drive contains the Win8 Recovery Data (UEFI,GPT). |
Yes, it's possible; but a whole-disk copy such as you suggest won't be restorable to a smaller disk, and if you try to restore it to a larger disk, you'll need to fix the partition table because the backup GPT data won't be at the end of the disk. Note that two disks of the "same" size might not be exactly the same size -- a replacement "120GB" SSD might be a few sectors smaller or larger than your original 120GB SSD.
Quote: | I found the following procedure here: |
You posted a "file:///" link that can't be read by others. This isn't really critical; I just wanted to point it out so you can be more careful about that in the future.
Quote: | and Iam confused about this:
Code: | 5. Save extra information about the drive geometry necessary in order to interpret the partition table stored within the image. The most important of which is the cylinder size.
# fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info
|
Why do I need this? This will not work on my GPT Partition as fdisk complains, Isnt the drive geometry already stored in the image and if not, do I have to write it later back? |
GPT doesn't use disk CHS geometry information at all. In fact, even on MBR, such information is pointless on disks larger than about 8GB, since the CHS values max out at that size.
Instead, you might want to back up the GPT data separately from everything else. You can use gdisk or sgdisk for this; the "b" option in gdisk, or the "-b" option to sgdisk, will create a backup file containing the partition table data. This isn't vital for restoring a low-level backup such as you describe; but it can be handy if you accidentally trash a partition. You could also use it as part of an alternative partition-by-partition backup strategy -- that is, back up the partition table and each partition separately. Because filesystem-specific or file-level backups are likely to be more efficient than a "dd" backup, this may be a preferable strategy. |
|
Back to top |
|
|
salahx Guru
Joined: 12 Mar 2005 Posts: 530
|
Posted: Wed Aug 21, 2013 5:52 am Post subject: |
|
|
As far as backing up the Sony Vaio recovery partition, its probably NTFS. You can use the "ntfsclone" utiilty (part of ntfs-3g) with the --save-image to efficiently back up an NTFS filesystem. |
|
Back to top |
|
|
|
|
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
|
|