![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
It seems like the hard drive in
ergotia and
lilithmagna's ageing Dell PC might be dying; it keeps refusing to boot from it. I've bought them a new hard drive which is 1 TB instead of 160 GB; what I'm trying to work out is the best way of transferring the system on to it.
The old drive has four partitions: one big one and three little ones. I've taken byte-for-byte images of all four. So what I think I want to do is this:
* duplicate the partition structure of the old drive onto the new, with all the extra space left after the biggest partition
* Copy the partitions in
* [the tricky bit, read on]
* Boot from the new hard drive and let Windows repair the partitions which were not shut down cleanly
* Boot from gparted, and make the biggest partition take up all the available space
* Boot back into Windows and hope it doesn't complain
The tricky bit is, how should I sort out the boot partition? Should I copy over the MBR from the old drive, and if so how? I'm using Linux to do the copying, so something starting "dd if=..." would be perfect. Or is there some other way I should be going about this?
One other weird thing is that SMART reports that the drive is perfectly healthy, which means I'm worrying that the problem might be elsewhere, but I can't think where.
Thanks!
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
The old drive has four partitions: one big one and three little ones. I've taken byte-for-byte images of all four. So what I think I want to do is this:
* duplicate the partition structure of the old drive onto the new, with all the extra space left after the biggest partition
* Copy the partitions in
* [the tricky bit, read on]
* Boot from the new hard drive and let Windows repair the partitions which were not shut down cleanly
* Boot from gparted, and make the biggest partition take up all the available space
* Boot back into Windows and hope it doesn't complain
The tricky bit is, how should I sort out the boot partition? Should I copy over the MBR from the old drive, and if so how? I'm using Linux to do the copying, so something starting "dd if=..." would be perfect. Or is there some other way I should be going about this?
One other weird thing is that SMART reports that the drive is perfectly healthy, which means I'm worrying that the problem might be elsewhere, but I can't think where.
Thanks!
no subject
Date: 2010-06-19 10:49 am (UTC)Copies Windows filesystems cleanly. This is best done fromt a live windows disk such as Vistas install dvd.
Windows may need the bootstrap code written to the new disk with fixmbr/ fixboot.
Diskpart can extend. windows partitions so you cab extend ntfs with ms utilities.
no subject
Date: 2010-06-19 11:58 am (UTC)no subject
Date: 2010-06-19 02:53 pm (UTC)1) Do a minimal Windows install to a spare disk or a throwaway partition on the new disk. Boot into it.
2) Copy the system from the old disk to the new partition using "XCOPY /S /E /C /F /H /K /O M: N: >xcopy.out 2>&1"
3) Reboot with a Windows install disk and select the basic repair options to get the MBR and boot files regenerated. You don't want to let it repair all system files though!
4) You should now be able to reboot into the new system. Sometimes weird ACLs will mean bits didn't copy in (2). Cygwin for example installs itself with permissions that stop it from being copied from the "unknown" user you will be running as in the staging system. These will be highlighted by errors in xcopy.out which is why you generated it in (2). Once you are rebooted into the copied system you should be able to manually fix these up. You may also need to fix up drive letter assignments then reboot to have them take effect.
5) Once all looks well, the staging system can be removed. Or kept, because it's always useful to have a known bootable OS lying around in emergencies.
Done it several times and it seems to work without requiring any 3rd party tools.
no subject
Date: 2010-06-19 03:22 pm (UTC)I'd go for a reinstall. Tedious but is worth doing regularly to delint a Windows system (up to and incl XP - I avoided Vista and don't know 7 well enough yet to opine authoritatively).
no subject
Date: 2010-06-19 11:25 pm (UTC)If you are not, time to bite bullets and do a install a fresh Windows on the new drive. Image it. Install the other programs and do the various tweaks you had before or would have had, then image it again.
Get a copy of the SpinRite and have it look at the drive. It finds (and can often repair) some really low level stuff.
for free
Date: 2010-06-20 10:37 am (UTC)Use Gparted
http://gparted.sourceforge.net/
Download and burn the ISO...
Then just copy the partition over (and apply), change the boot flag on the copied partition to match the old one (and apply), and then expand the copied over 160Gb (and apply).
Reboot
Easy - Done it tens of times and works more or less flawlessly.
There is also Clonezilla you can use too... But Gparted suffices just fine.
Re: for free
Date: 2010-06-20 10:38 am (UTC)Re: for free
Date: 2010-06-20 10:41 am (UTC)You may spot other smaller partitions being recovery partitions or diagnostic paritions - whether you want to copy them or not aswell is up to you... (Dell Diags can run off a CD downloaded from Dell).
Re: for free
Date: 2010-06-20 10:44 am (UTC)Many thanks for your help so far!
Re: for free
Date: 2010-06-20 10:52 am (UTC)But indeed, you can dual boot easily enough - Either using a totally separate partition or using the Wubi method if you don't want to muck about with having multiple paritions (my preferred method, as partitioning causes more grief than its worth IME, unless you are multi-OSing with different versions of Windows etc).
But yeah, no worries for the help, any time!
no subject
Date: 2010-06-20 12:40 pm (UTC)The issue with Windows is getting it to agree with you what partition maps to which drive letter. They often don't match and, without using an imaging program, it can take more than one go to get it working.
(See a post from me a couple of years ago where Windows decided it was on H: the first time!)