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 Thu 18 Sep 2014, 21:59
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to clone an XP hard disk with Slacko? .. SOLVED
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Author Message
wimpy


Joined: 22 Aug 2012
Posts: 293
Location: Essex, UK

PostPosted: Mon 03 Jun 2013, 12:04    Post subject:  How to clone an XP hard disk with Slacko? .. SOLVED  

I'm not sure if this is the correct area to raise this topic. I'm trying to clone my wife's Dell computer's HD (running windows XP). I got it working again when it refused to boot Windows XP with a registry error, using Slacko 5.5. Since the HD could well be flaky, I installed a second new HD (slightly larger) with the intention of doing a full clone. Dell, in their wisdom, have formatted their disk with 3 partitions (Win32,NTFS and Win98.). Slacko sees these as sda1,sda2,sda3. Parted can see the new disk as sdb1 but I can't get it to mount unless I create a partition. I would like to use dd to do a bit-to-bit copy..
Any help or suggestions would be appreciated

Last edited by wimpy on Wed 30 Apr 2014, 08:08; edited 1 time in total
Back to top
View user's profile Send private message 
nilsonmorales


Joined: 15 Apr 2011
Posts: 485
Location: El salvador

PostPosted: Mon 03 Jun 2013, 12:10    Post subject: start with gnost  

try this

http://www.murga-linux.com/puppy/viewtopic.php?t=54231
Back to top
View user's profile Send private message MSN Messenger 
Sylvander

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

PostPosted: Mon 03 Jun 2013, 14:56    Post subject:  

If you suspect there may be faulty regions on the source HDD....

I suggest you use ddrescue to do the cloning. Very Happy
See this thread of mine on my pleasantly successful 1st use of ddrescue to clone a faulty source HDD [I was forced to scrap it after coloning it] to a new HDD.

You could use the commands I used as guidance, but...
You'd need to figure out how to alter them [if necessary] to suit your own setup.

I suggest you read the manual and tutorial which are linked in the 5th post [present bottom of the page].
Back to top
View user's profile Send private message 
Bligh

Joined: 08 Jan 2006
Posts: 484
Location: California

PostPosted: Mon 03 Jun 2013, 15:38    Post subject:  

Clonezilla has worked well for cloning win partitions and hard disks. I like to keep a separate data partition or disk.
Cheers
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11066
Location: Arizona USA

PostPosted: Mon 03 Jun 2013, 15:56    Post subject:  

It's odd that Slacko sees the second hdd as sdb1 but can't mount it. As far as I know, Linux can't see unformatted media, which means the disk must already be formatted, which means it's probably all one NTFS or FAT32 partition, which means that Slacko should be able to mount it. Is the hard disk new or used?
Back to top
View user's profile Send private message 
wimpy


Joined: 22 Aug 2012
Posts: 293
Location: Essex, UK

PostPosted: Mon 03 Jun 2013, 16:16    Post subject:  

Flash wrote:
It's odd that Slacko sees the second hdd as sdb1 but can't mount it. As far as I know, Linux can't see unformatted media, which means the disk must already be formatted, which means it's probably all one NTFS or FAT32 partition, which means that Slacko should be able to mount it. Is the hard disk new or used?

Yes, I was surprised at this. It's a brand new SATA disk. I'm pretty sure it is not formatted. Windows can see it but will not format it until I've created a partition. Since the source disk contains 3 partitions (with 3 different formats) I'm unsure how to proceed. I'll be looking at some of the other suggestions as well which look quite good.-
@Sylvander I'm not sure if there are any duff sections on the HD. After restoring the Windows registry hives, Winxp proceeded to do a chkdsk (which rather put the frights in me) but I decided it was safer to let it do it rather than pull the plug. After it had found and corrected a lot of orphan files, it booted OK and has been running fine since
@bligh I'll certainly have a look at Clonezilla
@nilsmorales That thread looks fine but I think it's above my league at the moment. I'm still learning .

_________________
Lucid ,Precise, Carolina, Shiba_inu, Lx_pup - all frugal
Back to top
View user's profile Send private message 
Sylvander

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

PostPosted: Mon 03 Jun 2013, 16:58    Post subject:  

1.
wimpy wrote:
@Sylvander...Winxp proceeded to do a chkdsk (which rather put the frights in me) but I decided it was safer to let it do it rather than pull the plug. After it had found and corrected a lot of orphan files, it booted OK and has been running fine since.

a. This is as I'd expect.
My non-expert understanding is as follows:
If you were ever to "improper power-off" whilst windows was running...
It's quite likely that the Windows "partition-file-system" [PFS] would be corrupted as a result.
This might result in this-or-that type of nasty.
e.g. Orphan files or folders.
So it is NECESSARY at next boot of Windows [or prior to that] to scan&fix the PFS.
Windows would automatically scan during the next boot.
However...
In the past, when I used Windows [I no longer do so]...
I would [use something other than the possibly/probably corrupted Windows to] manually scan&fix the PFS [FAT32 in my case] prior to any attempt to boot Windows.
I've done this quite often and successfully.
[I did this because (in my opinion) it isn't a good idea to attempt to use a possibly corrupted Windows to fix itself]
[e.g. A mentally ill doctor aught not to attempt to fix his own mental illness]
But wouldn't leave it at that if there were orhan files.
See b below.

b. Those "orphan files" [or parts of files] have not been "corrected"...
They have been identified and separated out and saved.
I've never managed to re-integrate them; I normally just deleted them.
The orphans are no longer connected as they aught to be, so the files [orphans, or fragments of those are orphaned] are now failing to do their job.
Hence, your presently-in-use Windows has suffered an irreversible corruption.
Cross your fingers and hope that Windows can still function effectively/normally without those.
What I'd normally do under such circumstances, is to restore an image backup, made prior to the introduction of this corruption, when all was uncorrupted and functioning well [normally, and/or to my satisfaction].
You might instead decide to use a "Restore Point", but I would choose not to do that [never use a corrupted Windows to attempt to fix itself].
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 424

PostPosted: Tue 04 Jun 2013, 10:01    Post subject:  

Puppy isn't going to mount a disk without a partition. That would be silly. Why mount something that doesn't exist? In this instance you don't want to mount the drive anyway, you just want to clone to it.

the following command should suffice:

dd bs=4096k if=/dev/sda of=/dev/sdb conv=notrunc

This assumes the disk you want to clone is "sda" and is unmounted, and the new drive is "sdb".

Now, for extra grade points, after cloning the drive, resize the main OS partition with gparted to take advantage of all that new space Cool
Back to top
View user's profile Send private message 
wimpy


Joined: 22 Aug 2012
Posts: 293
Location: Essex, UK

PostPosted: Tue 04 Jun 2013, 10:58    Post subject:  

So far, in Slacko, only parted sees the disk as sdb. On the desktop there are only sda1, sda2,and sda3. There is of course the question of the MBR. Is there any way I can be sure that dd is going to write to the new disk? Actually the 2 disks are not very different in size - the new one being a bit bigger. After, 8 years, her used space is about 20% of the available space.
_________________
Lucid ,Precise, Carolina, Shiba_inu, Lx_pup - all frugal
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4235
Location: Gatineau (Qc), Canada

PostPosted: Tue 04 Jun 2013, 13:12    Post subject:  

Thanks, guys, for the very useful information.
_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

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

PostPosted: Tue 04 Jun 2013, 15:00    Post subject:  

wimpy wrote:
On the desktop there are only sda1, sda2,and sda3. There is of course the question of the MBR. Is there any way I can be sure that dd is going to write to the new disk?

1. Going from memory...
If I remember right...
When using ddrescue:
a. You don't mount the partition-file-systems on the source drive [and there are, as yet, none on the destination drive to mount].

b. Since the destination drive initially has nothing on it [i.e. no partitioning, no formatting, no MBR, no partition file systems]...
Initially there is nothing seen of it on the Puppy desktop.
BUT...

c. Once ddrescue has cloned at least the partitioning and their formatting and partition file systems...
Then the "drives" [actually the cloned partition file systems] appear as if by magic on the desktop.
.
.

Last edited by Sylvander on Tue 04 Jun 2013, 17:58; edited 2 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11066
Location: Arizona USA

PostPosted: Tue 04 Jun 2013, 16:14    Post subject:  

Wimpy, that's a good question. If you format the new disk with Gparted so that Puppy can see it, Puppy will give it a name. If you then use dd, it might completely change the formatting since it might overwrite that part of the disk with the information from the old disk. That would be fine. The question is whether dd will write to the new disk if you use the name Puppy gives it, or will it make up its own names and wind up writing to the old disk. At least, I think that's your question, and I don't know the answer.
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 424

PostPosted: Tue 04 Jun 2013, 21:27    Post subject:  

if gparted sees the new drive you're good to go. YOU DON'T WANT THE NEW DRIVE MOUNTED TO DO THIS.

dd will clone the mbr, fats, partitions, flags, formatting, and all the data to the new drive.

Just run the command I listed above, and it should work.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11066
Location: Arizona USA

PostPosted: Tue 04 Jun 2013, 21:43    Post subject:  

Jafadmin, do you mean he should use Gparted to find out what name to use for the new drive in the dd command?
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Tue 04 Jun 2013, 22:11    Post subject:  

jafadmin's first post

jafadmin wrote:
if gparted sees the new drive you're good to go. YOU DON'T WANT THE NEW DRIVE MOUNTED TO DO THIS.

dd will clone the mbr, fats, partitions, flags, formatting, and all the data to the new drive.

Just run the command I listed above, and it should work.


Sound advice. There is risk of further damaging the original drive, but in this case you have nothing to lose and everything to gain.

To get disk id run this:
Code:
root@work-horse:~# fdisk -l|grep  -w '^Disk'
Disk /dev/sda: 500.1 GB, 500107862016 bytes
Disk identifier: 0x000bfb22
Disk /dev/sdb: 8004 MB, 8004304896 bytes
Disk identifier: 0x00036d56

EDIT: just to be clear, the command you type in console is : fdisk -l | grep -w '^Disk' , or you can just type fdisk -l and search the lines for the relevant information.

Given you know the size of each disk then you now know what command to type in based on jafadmin's first post (linked above for quick reference).

Side note: I have successfully dd'd partitons as against whole drives cloning Windows 7. In that case you need to dd the MBR as well, provided Windows is on the first partition. Since you are NOT doing this, but cloning the whole drive, everything is preserved, right down to the UUID (rfc).

I hope you learn from this that there is no substitute for tested backups!

One more piece of important information

I notice wimpy you wrote: "Parted can see the new disk as sdb1 but I can't get it to mount unless I create a partition."

I believe you misread that because it would not see sdb1 or any other number because there is no partition table on the disk. It would just see sdb. This is important because only partitions are suffixed with the number. Physical entire drives are denoted just by the letters sdX, where X is the letter assigned by the kernel either at bootup or hot plugging. (older kernels use hd). It is very important when using dd to get this right.


Good luck!

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0940s ][ Queries: 11 (0.0052s) ][ GZIP on ]