Replacing HDD

G

Gordon

It's been a very long time since I last replaced a HDD. (Doing it now
for capacity not failure).
I'm perfectly fine with the physical actions required to replace the
disk, but what happens when I have?
Do I just boot from my Windows 7 disk and format and install? Is that
all I need to do?
 
P

Paul

Gordon said:
It's been a very long time since I last replaced a HDD. (Doing it now
for capacity not failure).
I'm perfectly fine with the physical actions required to replace the
disk, but what happens when I have?
Do I just boot from my Windows 7 disk and format and install? Is that
all I need to do?
You didn't say what the overall size of the drive was.

If it was a 2TB or less drive, the treatment is ordinary.

If it is > 2TB, then there is more research to do. (GUID or GPT partitioning,
or alternately, a special driver to wedge a 3TB drive, in a 2.2TB world.
The disk manufacturer site has some FAQ info on what to do with 3TB drives.)

If you find the "support" page on the disk manufacturer web site,
they have software for cloning one disk to another. You can use
that software, to transfer the old disk to the new disk. There
is no need to reinstall the OS.

If the new drive is "in addition" to the old drive (running two drives),
then the Disk Management box (type in "diskmgmt.msc") can provide the necessary
interface. You right click on the new drive in the table and create
a partition.

But if the intention is to temporarily install the two drives, and
transfer the contents of the old small drive, to the new large drive,
the disk manufacturer cloning software can do that. In some cases,
it's just a copy of Acronis. The web site will also have a manual,
maybe 70 pages or so, covering the options available.

I have other ways of doing it, but the nice manufacturer software
takes all the command line magic out of it.

If you only own one computer, say a laptop, it only has one bay,
you may not physically have enough places to connect the two
drives, to arrange a transfer. You can get USB enclosures or USB
adapters, to hold one of the two drives, while transferring the data.
Then, you can use the Acronis-like software, to do the cloning,
once both drives are connected. Once the transfer is complete, you
disconnect the USB enclosure, and make the final transfer of the
disk into the single laptop bay.

Paul
 
G

Gordon

You didn't say what the overall size of the drive was.

If it was a 2TB or less drive, the treatment is ordinary.

If it is > 2TB,
Thanks for the reply - the new drive is 160GB - that's all the BIOS will
take!
And yes it's a laptop but I have a 500Gb external HDD with plenty of
space on the save all my data first.
 
G

GlowingBlueMist

It's been a very long time since I last replaced a HDD. (Doing it now
for capacity not failure).
I'm perfectly fine with the physical actions required to replace the
disk, but what happens when I have?
Do I just boot from my Windows 7 disk and format and install? Is that
all I need to do?
One last thing I'd add to Paul's message.

What trips up many who clone a drive using what ever cloning software is
that you must physically unplug the old drive the first time you boot
the newly cloned drive. If you don't the newly cloned Windows on the
new drive usually gets confused, usually requiring you clone the old
drive all over again.

Windows only likes to see one valid boot drive and will make all other
drives a secondary drive and try to keep the original drive as the boot
drive if given the chance. The last booted drive based on date/time is
the one it will accept and use as the boot drive.

After booting the cloned drive the first time and the system is shut
down (and powered off unless all drives are SATA) you can plug the old
drive in along with the new drive and it will continue to keep the new
drive as it's "boot" hard drive and treat the old drive as a secondary
drive.
 
P

Paul

Gordon said:
Thanks for the reply - the new drive is 160GB - that's all the BIOS will
take!
And yes it's a laptop but I have a 500Gb external HDD with plenty of
space on the save all my data first.
Then, you'd want to back up the entire laptop drive to the external,
install the new drive, then "restore" from the external.

old_internal --> backup image on 500GB external

install new drive...

new_internal <-- backup image from 500GB external

You could potentially use the Windows 7 "System Image" function to do
that, plus burn the recovery CD they specify on the System Image page.
The CD gives you something to boot from, while doing the restoration.
Using the CD, there is an option there, to take the System Image stored
on the external, and put things back on the new_internal.

I don't know if the free cloning software on the Seagate or WDC site,
would be good enough for that or not. They try to give you enough
software to support cloning, but I don't know if it's good enough
to do the transfer in two stages, as in the diagram above.

Also, you have to be careful with a laptop drive, because
it will have perhaps three partitions. One partition might be
a 15GB recovery partition, which can be used to return the
laptop to "factory state". Windows 7 has a SYSTEM RESERVED
partition, which is tiny and about 100MB or so. It's part
of booting. And then the remaining partition is the much
larger C:. That's a typical layout. When backing up, you
want to make sure you get *all* of the disk including the
factory recovery partition. The Acronis-like software
may be able to arrange that for you. I don't know if
the System Image function in Windows 7, is smart enough
to get everything.

You can use PTEDIT32, to review the partition table on the
hard drive. You right click this, and do "Run as Administrator"
to avoid getting "error 5".

ftp://ftp.symantec.com/public/english_us_canada/tools/pq/utilities/PTEDIT32.zip

This is an example of a laptop partition table, as viewed from
PTEDIT32. In this example, three of four partitions are
evident. So if I was doing my backup to the external drive,
I'd be checking that the method is transferring all three
partitions during the backup. Later, I'd verify after
restoration to the new drive, that all three partitions
are there.

http://www.goodells.net/dellrestore/files/dell-tbl.gif

Paul
 
G

Gordon

Then, you'd want to back up the entire laptop drive to the external,
install the new drive, then "restore" from the external.

old_internal --> backup image on 500GB external

install new drive...

new_internal <-- backup image from 500GB external
My current HDD does not have Windows on it!
Also, you have to be careful with a laptop drive, because
it will have perhaps three partitions. One partition might be
a 15GB recovery partition, which can be used to return the
laptop to "factory state". Windows 7 has a SYSTEM RESERVED
partition, which is tiny and about 100MB or so. It's part
of booting. And then the remaining partition is the much
larger C:.
The "recovery" partition was never there. This laptop originally came
with Vista and then I installed Win 7 on it from a genuine Windows 7
install disk, not a recovery disk!

The reason for the larger HDD is so that I can dual boot properly. The
current HDD is only 80GB, which is too small to dual boot.

So after the installation of the new HDD, all I need to do is to boot
from the Win 7 disk - nothing else needs doing first?
 
P

Paul

Gordon said:
My current HDD does not have Windows on it!


The "recovery" partition was never there. This laptop originally came
with Vista and then I installed Win 7 on it from a genuine Windows 7
install disk, not a recovery disk!

The reason for the larger HDD is so that I can dual boot properly. The
current HDD is only 80GB, which is too small to dual boot.

So after the installation of the new HDD, all I need to do is to boot
from the Win 7 disk - nothing else needs doing first?
OK, so now we know what kind of user you are.

An experienced Linux user.

So "dd" is no mystery to you.

You don't need any fancy utilities to do this, as long as you have the space.

------+
Step 1|
------+

Boot the laptop with your Linux LiveCD.

In "Places", click the icon for the external USB drive, so it
is mounted. You need room to store the laptop drive image.
If the laptop drive is 40GB in size, this will create a 40GB file
on the external. Let's say the external mount is /media/PETUNIA

Open a terminal window and from the shell...

sudo dd if=/dev/sda of=/media/PETUNIA/mylaptop.dd

That will copy the entire laptop drive, including sector 0 MBR,
GRUB boot stages hiding in the reserved sectors, and so on. A
complete copy will be made.

*******

If you're clever, you can also give that command a block side (bs)
and count parameters. To figure out those, you can try the Linux
fdisk command, before doing the "dd" step. This portion is optional
if you don't mind "dd" taking three times longer than it should.

sudo fdisk /dev/sda

p <--- this prints the disk parameters
q <--- quit the tool

Now, if that works, there will be a total byte count in the printout.
Now, use the "factor" command.

factor 42949017600

That returns:

42949017600: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 5 5 17 257

We count up the number of two's there. In this example (from my
Linux virtual machine in fact), the number is 2**17 or 131072.
If you divide 42949017600 by 131072, you should get a nice round
number as well. Now, we can modify our "dd" command a bit.

sudo dd if=/dev/sda of=/media/PETUNIA/mylaptop.dd bs=131072 count=327675

By specifying a block size, the command runs about three times faster,
so you don't have to wait as long.

An alternate form of the command, is like this, with no count. If you
do it this way, the transfer runs until there is no source disk left
to read from. The actual count is printed on the screen. You compare the
count printed on the screen, to the value you computed (327675), to see
whether all the data was transferred.

sudo dd if=/dev/sda of=/media/PETUNIA/mylaptop.dd bs=131072

*******

------+
Step 2|
------+

Now, sudo umount /media/PETUNIA, do a shutdown of the laptop, install
the new hard drive. Boot the Linux LiveCD again.

------+
Step 3|
------+

Click the icon for your external disk. We'll again assume it ends up
as /media/PETUNIA. Use the "dd" command, to transfer from the external,
to the new internal laptop drive. We'll assume the new drive ends up at
/dev/sda as well. You can use "sudo lshw" or "sudo ls /dev" to perhaps
figure that bit out. Mounting the new drive, by clicking the icon
(as new drives are typically formatted), then using "df" is another
way to confirm the block level ID of the new drive. Dismount the
new drive partition, before using "dd".

OK, assuming we've verified it's /dev/sda again, we can do:

sudo dd if=/media/PETUNIA/mylaptop.dd of=/dev/sda bs=131072

Which should take as long as Step 1 did.

Now, sudo umount /media/PETUNIA, shutdown the laptop. Time to
reboot from the internal hard drive, and confirm the transfer
was a success.

Result - the partitions in Linux, are exactly the same size
as they were originally. There is now a 40GB or larger "unallocated"
section at the end of the disk. And that's where new partitions
will go. There is no need to resize the Linux partitions with
"sudo gparted", unless you want to. You could do that from
your Linux LiveCD as well.

*******

Now, you need to find a dual boot recipe, for Linux + Windows 7.

Plug something like this into your search engine:

dual boot linux plus windows 7

This one is no good, because it assumes Windows 7 is on there already,
and Linux installs second. This doesn't help us a bit. That's because,
it is dead easy to use GRUB, to beat Windows into submission at boot time
(chain load).

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfect-harmony

In the example here, they install Windows after Linux.

http://www.ehow.com/how_7488102_install-windows-xp-linux-system.html

The key part there, is Windows is going to wipe out some of GRUB. You
install Windows, like your Windows 7, shut down, boot the Linux LiveCD,
restore GRUB with the commands they use, then on next reboot, you're
booting Linux again. Using the GRUB menu, you add Windows 7 as a chain
load. To find that, I used "install windows on a linux machine" as
a search term.

Before you start, there have to be enough partitions for the install
of course. I don't know how many partitions your original Linux
was using, in which case Windows 7 will use one or two. Windows 7
uses one partition, if doing a BitLocker full drive encryption incompatible install.
Windows 7 uses two partitions (like a 100MB SYSTEM RESERVED partition),
if the install is BitLocker compatible. Only the higher end versions
of Windows 7 (like Ultimate), include BitLocker, as far as I know.
You might want to review the necessary procedures for specifying
one or two partitions, for the Windows 7 install, before you
do your Windows install.

http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html?filter[2]=General Tips

"If you do not want to have the 100 MB System Reserved partition
and only the Windows 7 C: partition on a HDD or SSD after installation,
then select a formatted partition or drive to install Windows 7 on.
If there are any partitions on the disk, you won't get the 100 MB
System Reserved."

To do that with your Linux LiveCD, or from the existing Linux,
you'd use "sudo fdisk /dev/sda", and add a partition. Change the
partition type for the new partition, to "7" for NTFS. Enter
"W" to write out the new partition information. Then "Q" to quit.
That defines a partition. Next, use "man mkfs.nfts" to review
the commands for formatting the new partition. It'll be
something like "sudo mkfs.ntfs -L Windows7 -v -f /dev/sda2",
assuming the new partition created in fdisk was partition 2.
Obviously, you have to be careful with the mkfs.ntfs command,
as you could overwrite an existing partition if you get the
partition number wrong. A safer way, might be to create an
NTFS partition from "sudo gparted".

Then, hope Windows 7 installer DVD, finds your offering of an
NTFS partition, so you can do a single partition install.

HTH,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top