On Sat, Nov 22, 2014 at 11:29:20PM +0000, 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)
If you use UUIDs instead of /dev/sd??, you avoid the issue of locations changing. If the new /dev/sda drive has GRUB in the MBR, I believe you should be able to boot from the command line in any case. Grub can boot Windows just fine. regards, Joel > What are the gotchas that are easy to get wrong in an operation like this? > > -- hendrik > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: https://lists.debian.org/m4r68g$o6n$2...@ger.gmane.org > -- Joel Roth -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141123043841.GA16808@sprite