[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: replacing boot and only disk drive



On 22/11/14 06:29 PM, Hendrik Boom wrote:
I have a laptop (an old Asus EEEPC), and I need to replace its only disk
drive with a larger one.  The hardware aspects are easy -- keep static
electricity away and use a screwdriver.  I have the new drive on my desk
already.

And it's not hard to copy the file systems, either.  I can temporarily
access the new drive using a USB adaptor.  fdisk and the lvm utilities
will create the new partitions and then I copy, using dd or rsync  or tar/
untar or even cp --archive.  Perhaps a recursive checksum script afterward
just in case.

It's currently a dual boot between Debian Jessie and Windows XP.  I can
copy the Windows partition using ntfs-3g.  Or maybe dd if that fails.
Windows XP comes with the usual C: drive (/dev/sda1), a hidden Windows
partition (/dev/sda3), and en EFI paritition (/dev/sda4).  All of Linux
hides out in the so-called extended partition (/dev/sda2).  I have no
idea what Windows does with the space at the start of the drive before he
first partition.  Presumably grub messes with this space, too.

But I'm concerned about installing the bootloader.  I presumably have to
do this before I actually swap drives, or the machine won't boot.

Currently I'm using grub-legacy to boot. Presumably I'll want the
configuration file in the new system to be pretty well the same as the
old, but there may have to be changes.  And when I'm installing the boot
loader it's got to set everything up to refer to the new disk drive even
though when that gets used it will be in a different electronic location
on  the machine.  (it'll be /dev/sda instead of /dev/sdb)

What are the gotchas that are easy to get wrong in an operation like this?

-- hendrik


Have you considered getting a USB case for your new drive and doing dd from your current drive to the new one? Afterward you can install the new drive then boot from gparted/rescue disk and resize your partitions.


Reply to: