Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 26 Jan 2020, 11:54
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to clone a hard drive so the clone will boot?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
number77

Joined: 22 Oct 2010
Posts: 772

PostPosted: Sun 28 Nov 2010, 12:23    Post subject:  How to clone a hard drive so the clone will boot?  

Hello
Is it possible to clone one hard drive to another and include the boot sector so that the new hard drive will boot. Its got puppy 511 on it
Thanks
thyristor44
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 4424
Location: West Lothian, Scotland, UK

PostPosted: Sun 28 Nov 2010, 12:44    Post subject:  

I think "Menu->Utility->Pudd" will do that.

I've not done exactly that with Pudd, but I have made an image backup of the whole of the contents of a drive [I believe it includes the MBR+track0] to a file.

Can't remember if I've restored the whole of a HDD using Pudd, but I've definitely restored a partition, and I remember discovering that Pudd only copied the MBR whilst copying the whole of a HDD, not when copying a partition alone.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2647

PostPosted: Sun 28 Nov 2010, 12:51    Post subject:  

dd if =/dev/device-to-clone of=/dev/target-device bs=512k

device-to-clone should be the whole device, like sda, sdb; not a partition like sda1. Specifying the partition would cause the MBR to be skipped when copying. target-device should also be a whole device.
This will cause the target-drive to have the same partitions and partition table as the device-to-clone. If the drives are not identical this may not be exactly what you want, but you could run fdisk on the target drive(whole drive) and add any partitions needed.
Back to top
View user's profile Send private message 
number77

Joined: 22 Oct 2010
Posts: 772

PostPosted: Tue 30 Nov 2010, 15:09    Post subject:  

Not managed to get it working yet but Im still trying.
Thanks.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12942
Location: Stratford, Ontario

PostPosted: Tue 30 Nov 2010, 15:37    Post subject:  

Cloning a hard drive with dd is not a sure thing. If the destination drive has different geometry than the source drive, it may not boot.

You would be better off using a cloning tool like egnost, then reinstalling the bootloader.
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2955
Location: USA

PostPosted: Tue 30 Nov 2010, 15:40    Post subject: Re: How to clone a hard drive so the clone will boot?  

number77 wrote:
Hello
Is it possible to clone one hard drive to another and include the boot sector so that the new hard drive will boot. Its got puppy 511 on it
Thanks
thyristor44


OK, the regulars will recall that I have been very critical of Clonezilla in the past (Clonezilla is a live boot CD for backing up disks) -- that older version had twice produced a "backup copy" that was not complete (thus, it was a truly false sense of security). It had silently "errored out", neither complaining nor crashing.

I recently tried the newest version, and found that it did correctly copy (and that it did complain when the copy operation went badly). I have now migrated from using Partimage, to using Clonezilla for my backups.

Since you're migrating a system, you still have the functional master, if the copy doesn't work.

http://clonezilla.org/

Use the "beginner" instructions, and have a disk to place the image (I would store an image, then burn that image to your new drive).

I migrated my tri-boot system (Win98, Puppy, Debian) to a larger HDD using this.

Boot Clonezilla, and back up the master drive. Shut down, and put in a blank drive, boot Clonezilla and push the image onto that blank drive. Reboot.

Note: it does not resize the restored partitions, so you'll have to do that afterwards, if your drive is larger. And the new drive must be as large as the old one.

_________________
Add swapfile
WellMinded Search
PuppyLinux.US Search
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2647

PostPosted: Tue 30 Nov 2010, 15:51    Post subject:  

I agree that using dd is not the best thing unless the two drives are identical.

Creating a clone is pretty easy, though, Create and format the target partiton and then mount it. Then cd into the root '/' of your running system and run:
cp -a list-of-dirs target-drive-mountpoint
You'll want to explicitly list the dirs to copy and avoid certain ones, like /mnt, /proc, /tmp and /sysfs since they contain dynamic and temporary items. Instead, create them manually in the target partition. Then, once done, you'll need to modify the /etc/fstab file of the target, unless you are going to physically switch the cables to use the new drive. I've done this many, many times and is really just as simple as described.
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2955
Location: USA

PostPosted: Wed 01 Dec 2010, 14:32    Post subject:  

amigo wrote:
I agree that using dd is not the best thing unless the two drives are identical.

Creating a clone is pretty easy, though, Create and format the target partiton and then mount it. Then cd into the root '/' of your running system and run:
cp -a list-of-dirs target-drive-mountpoint
You'll want to explicitly list the dirs to copy and avoid certain ones, like /mnt, /proc, /tmp and /sysfs since they contain dynamic and temporary items. Instead, create them manually in the target partition. Then, once done, you'll need to modify the /etc/fstab file of the target, unless you are going to physically switch the cables to use the new drive. I've done this many, many times and is really just as simple as described.


The clonezilla route did the whole operation for me, backup and restore as a bootable disk. Smile

My only complaint with the program was that an earlier version had silently failed during the backup (I knew this because I had backed up with Partimage which had noisily failed, and Clonezilla silently produced a save file even smaller than that failed image). Evil or Very Mad

The latest version I used failed noisily on errors, as it should (not all NTFS systems can be cleanly backed up -- as NTFS is rather "peculiar" -- on those broken systems, I use manufacturer HDD software to clone the old drive to a new drive, then back up the image).

_________________
Add swapfile
WellMinded Search
PuppyLinux.US Search
Back to top
View user's profile Send private message 
pemasu


Joined: 08 Jul 2009
Posts: 5485
Location: Finland

PostPosted: Wed 01 Dec 2010, 16:08    Post subject:  

My vote for clonezilla also. Their rescue boot cd worked just fine for me.
I copied one sane partition from broken hdd with it and it worked. I saved factory vista partition and was able to install vista to new hdd from that partition.

Clonezilla was the only which worked with that badly broken hdd and i tried several dos and linux apps.
Back to top
View user's profile Send private message 
Bruce B

Joined: 18 May 2005
Posts: 11488
Location: The Peoples Republic of California

PostPosted: Wed 01 Dec 2010, 16:15    Post subject:  

RetroTechGuy wrote:

My only complaint with the program was that an earlier version had silently failed during the backup (I knew this because I had backed up with Partimage which had noisily failed, and Clonezilla silently produced a save file even smaller than that failed image). :evil:


Silent failure you say ! ?

If you wanted to scare me, you done it.

I think I'll use dd with a bs=512

The command example amigo gave, dd will fail on error.

Has this been mentioned? That most hdd manufacturers provide software
for making copies from drive to drive. And that the software has ways of
dealing with target drives larger than the source drive.

~

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
PaulBx1

Joined: 16 Jun 2006
Posts: 2307
Location: Wyoming, USA

PostPosted: Wed 01 Dec 2010, 16:33    Post subject:  

Quote:
If the destination drive has different geometry than the source drive, it may not boot.


Really? This is news to me. I thought all that mattered was that the destination drive was no smaller than the source drive. I also thought that geometry is no longer an issue these days since the drive firmware does all the appropriate conversions, and you can't even see the actual drive geometry. I'm guessing the tracks don't even have a constant number of sectors any more.

Try dd with bs=512 as Bruce suggests, not bs=512k!
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2955
Location: USA

PostPosted: Wed 01 Dec 2010, 16:39    Post subject:  

Bruce B wrote:
RetroTechGuy wrote:

My only complaint with the program was that an earlier version had silently failed during the backup (I knew this because I had backed up with Partimage which had noisily failed, and Clonezilla silently produced a save file even smaller than that failed image). Evil or Very Mad


Silent failure you say ! ?

If you wanted to scare me, you done it.


Scared? I was quite pissed, instead. I wouldn't have known except that Partimage had failed prior, and I still have that incomplete image sitting on the drive. Nothing worse than false disaster recovery...

However, the latest Clonezilla version did complain when it hit errors.

In the usage here, the master disk would still exist, so it could be recopied if needed.

Quote:

I think I'll use dd with a bs=512

The command example amigo gave, dd will fail on error.

Has this been mentioned? That most hdd manufacturers provide software
for making copies from drive to drive. And that the software has ways of
dealing with target drives larger than the source drive.

~


Yes, that's what I've used for systems that won't back up correctly (I suspect that the failure is the result of fussy/slow sectors, or NTFS fragmentation).

_________________
Add swapfile
WellMinded Search
PuppyLinux.US Search
Back to top
View user's profile Send private message 
peppyy


Joined: 27 Jun 2005
Posts: 443
Location: VT USA

PostPosted: Sun 24 Nov 2019, 08:42    Post subject:
Subject description: Full tahr 64 install
 

Greetings again all. Thought this might be helpful.

I recently upgraded to a new SSD on a full install of Tahr 64 and although Clonezilla failed multiple tries for my main partition, it did copy the boot sector and the storage partition. It would create the partition and then warn that the file system (ext4) needed to be repaired although I had done that from a live cd several times. When I would check, the partition was always the right size but unknown file system.

After almost giving up I read that you can clone a hard drive with gparted. I used copy and paste in gparted. Highlighted sda1 on the old drive and hit the copy then used the pull down to select sdb, selected sdb1 and used paste to copy it to sdb1. It checked the file system and in no time at all finished without errors.

I changed the menu.lst to sdb1 and rebooted to the drive and everything was perfect. Faster and quiet. Haven't found anything broken or missing.

Hope this helps someone else out.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0757s ][ Queries: 11 (0.0108s) ][ GZIP on ]