Products > Computers

Cloning Win HP to smaller SSD

(1/5) > >>

soldar:
This is a continuation of
Failing Win XP HDD
https://www.eevblog.com/forum/general-computing/failing-win-xp-hdd/
where I managed to successfully clone a 1TB HDD to a 3TB HDD and Win XP runs fine there.

But that 3 TB HDD is for something else and too big anyway so I want to clone the 336 GB Win XP partition to a smaller 500 GB SSD.

So this is what I want to do

Origin:
sda = MBR, total 3TB, HDD
- sda1 : 336 GB NTFS Win XP
- sda2 : 663 GB NTFS Storage
- Empty space : 2 TB

Destination:
sdb : 480 GB, empty, SSD
I want to clone the Win XP partition here.

I did
sudo ddrescue -- force --size 350GB /dev/sda /dev/sdb /home/user/Desktop/mapfile.txt

and after a couple hours it completed the cloning successfully. So far so good.

Now the SSD has the WIN XP 336 GB partition but when it tries to boot it crashes and it restarts the computer and then just crashes again and again.

I thought maybe the second, incomplete partition on the SSD was causing the problem. In Linux it shows a second partition which extends outside the size and boundaries of the SSD. Y tried to delete this (defective) partition but I get the following error:

Error deleting partition /dev/sda2: Command-line 'parted --script "/dev/sda" "rm2"' exited with non-zero exit status 1: Error: Can't have a partition outside the disk!

gparted gives the same error and will not even start.

Well, yes, so now what? How can I make that bad partition just empty space?
I think that might correct the problem and let Win XP start.


shapirus:
It's weird that those partition editing tools crash/error out like that.

Try the normal standard "fdisk" (linux). Let's see if it works.

soldar:

--- Code: ---sudo fdisk -l /dev/sda
Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3d1f3d1e

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sda1  *           28  655359767  655359740 312.5G  7 HPFS/NTFS/exFAT
/dev/sda2       655359768 1953523655 1298163888   619G  f W95 Ext'd (LBA)
/dev/sda5       655359796 1953523655 1298163860   619G  7 HPFS/NTFS/exFAT

--- End code ---

sda2 and sda5 are bad and need to be deleted.   But how? Now what?

shapirus:

--- Quote from: soldar on May 30, 2024, 10:45:59 am ---
--- Code: ---sudo fdisk -l /dev/sda
Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3d1f3d1e

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sda1  *           28  655359767  655359740 312.5G  7 HPFS/NTFS/exFAT
/dev/sda2       655359768 1953523655 1298163888   619G  f W95 Ext'd (LBA)
/dev/sda5       655359796 1953523655 1298163860   619G  7 HPFS/NTFS/exFAT

--- End code ---

sda2 and sda5 are bad and need to be deleted.   But how? Now what?

--- End quote ---
Well, 1) make sure you have a backup image
2) sudo fdisk /dev/sda
3) use the interactive command prompt: Command (m for help):

Halcyon:
Why do we need another thread, that's just a continuation of the other?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod