ciphergoth: (bam)
[personal profile] ciphergoth
It seems like the hard drive in [livejournal.com profile] ergotia and [livejournal.com profile] 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!

Date: 2010-06-19 10:49 am (UTC)
From: [identity profile] pengshui-master.livejournal.com
Robocopy old new /s /e /copyall

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.

Date: 2010-06-19 11:58 am (UTC)
From: [identity profile] cairmen.livejournal.com
My hearty, hearty recommendation, echoed from Joel Spotsky, is to buy a copy of Acronis True Image. It costs £40 or so, but it works first time and prevents you having to fuck around with reinstalls and/or semi-working tools.

Date: 2010-06-19 02:53 pm (UTC)
From: [identity profile] deliberateblank.livejournal.com
My usual method, for Windows 2000 though it should work with later versions is:

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.

Date: 2010-06-19 03:22 pm (UTC)
From: [identity profile] drdoug.livejournal.com
Are you sure this is what you want to do? If the problem isn't the disk hardware but is somewhere in Windows' innards you will only succeed in duplicating it on the new drive, assuming you create no new problems in the process.

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).

Date: 2010-06-19 11:25 pm (UTC)
lovingboth: (Default)
From: [personal profile] lovingboth
If you are happy with how Windows is now, get a drive image program and let it at the problem. TrueImage is the most well known, but alternatives exist from Ghost (the original one) to some free suites.

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)
From: [identity profile] kingginger.livejournal.com
Install / mount both hard drives on the PC at the same time...

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)
From: [identity profile] ciphergoth.livejournal.com
Won't the MBR be wrong unless I do something to set it up?

Re: for free

Date: 2010-06-20 10:41 am (UTC)
From: [identity profile] kingginger.livejournal.com
That's just the boot flags to change... Just make sure they match the original...

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)
From: [identity profile] ciphergoth.livejournal.com
My understanding was that when a PC boots from a hard drive, it reads and runs a short program from the MBR. On a Windows PC, this program looks for the partition with the boot flag set and uses that partition to continue the boot process. On a Linux machine this program will usually be GRUB, and will offer a boot menu. But on a new hard drive, the MBR will be all zeroes and an attempt to boot it will fail. So I need to put some program on the MBR if the machine is to boot successfully.

[livejournal.com profile] ergotia's asked me to install Ubuntu on the machine as well, so I might end up using GRUB, but I wanted to know what my options were if I wanted to do things the standard Windows way.

Many thanks for your help so far!

Re: for free

Date: 2010-06-20 10:52 am (UTC)
From: [identity profile] kingginger.livejournal.com
Yes, that is sort of the case, but effectively, the boot flags do the MBR mucking for you... No flag, no boot...

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!

Date: 2010-06-20 12:40 pm (UTC)
lovingboth: (Default)
From: [personal profile] lovingboth
You will doubtless end up using GRUB, but Windows will write a MBR over whatever is there on request (and often if you do not request) wiping what's there so get Windows working first. Ubuntu will co-operate with Windows in a way that Windows simply will not do with anything else, so install it second.

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!)

Profile

ciphergoth: (Default)
Paul Crowley

January 2025

S M T W T F S
   1234
5678 91011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 30th, 2025 02:31 pm
Powered by Dreamwidth Studios