Re: replacing boot and only disk drive

2014-11-30 Thread Hendrik Boom
On Sun, 23 Nov 2014 13:17:24 -0800, seeker5528 wrote:

> On 11/23/2014 12:03 PM, Doug wrote:
>> Yes, grub can boot Windows _just fine_ if Windows is bootable. Windows
>> wants to be "activated" and I found that GParted's activation does not
>> suffice.That's why I mentioned obtaining a program to activate Windows.
>> If you only have one computer, you should get that before you mess
>> around.
>> (I don't pretend to know why this happens, only that it does. That's
>> why there are programs available to take care of that problem.)
>>
>> --doug
> 
> Windows activation is a separate issue, but I'm assuming you meant...
> Windows needs to be on the active partition.
> 
> Setting the partition flag to bootable/active in gparted works fine for
> this.

My laptop uses the old BIOS with an MBR.  I understand gparted converts 
the driver to the new partition structure.  Can XP handle that?

> It's the PBR (Partition Boot Record) that is the issue.
> 
> If I remember correctly using the copy/paste feature in gparted to copy
> the partition to the new drive will copy the PBR, if someone knows
> different please correct me.

Would dd'ing the entire partition suffice?  As long as the new partition 
is the same size or  slightly larger? 

> 
> If you need to write a new PBR.
> 
> Booting off the XP install disk, going to the recovery console and using
> the fixboot command will write a new PBR.

No XP install disk.  Any chance of using the old Windows XP to do this to 
the new drive when it's on a USBtoIDE interface?

Well, I might be able to find an XP  disk somewhere, but it won't be for 
the same version of XP.
   
> 
> Booting from Vista or Windows 7 install disk, going into the recovery
> tools,
> command prompt, and using the bootsect command also works
> 
> bootsect /?
> 
> for a list of options. Bootsect has an option for writing  an XP
> compatible PBR.

Might work.  I'll have to see if I can find such a Windows disk.

> 
> Later, Seeker



-- 
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/m5gr0m$m22$2...@ger.gmane.org



Re: replacing boot and only disk drive

2014-11-25 Thread Pascal Hambourg
Hendrik Boom a écrit :
> 
> The laptop now uses MBR partitions.  Since the new drive is only 2T, I 
> don't expect to need GPT.  Thanks for the details, though I won't need to 
> worry about these until my *next* hard disk enlargement.  And ... will 
> Windows XP know what to do with GPT?

Windows XP 32 bits cannot boot from GPT nor UEFI. It's not clear to me
yet whether Windows XP 64 can or not.


-- 
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/5474f7fa.7050...@plouf.fr.eu.org



Re: replacing boot and only disk drive

2014-11-23 Thread seeker5528


On 11/23/2014 12:03 PM, Doug wrote:
Yes, grub can boot Windows _just fine_ if Windows is bootable. Windows 
wants
to be "activated" and I found that GParted's activation does not 
suffice.That's

why I mentioned obtaining a program to activate Windows. If you only have
one computer, you should get that before you mess around.
(I don't pretend to know why this happens, only that it does. That's 
why there

are programs available to take care of that problem.)

--doug 


Windows activation is a separate issue, but I'm assuming you meant...
Windows needs to be on the active partition.

Setting the partition flag to bootable/active in gparted works fine for 
this.

It's the PBR (Partition Boot Record) that is the issue.

If I remember correctly using the copy/paste feature in gparted to copy the
partition to the new drive will copy the PBR, if someone knows different
please correct me.

If you need to write a new PBR.

Booting off the XP install disk, going to the recovery console and using the
fixboot command will write a new PBR.

Booting from Vista or Windows 7 install disk, going into the recovery tools,
command prompt, and using the bootsect command also works

bootsect /?

for a list of options. Bootsect has an option for writing  an XP 
compatible PBR.


Later, Seeker


--
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/54724ee4.2060...@comcast.net



Re: replacing boot and only disk drive

2014-11-23 Thread Joel Roth
On Sun, Nov 23, 2014 at 03:03:53PM -0500, Doug wrote:
> On 11/22/2014 11:38 PM, Joel Roth wrote:
> >Grub can boot Windows just fine.

> Yes, grub can boot Windows _just fine_ if Windows is bootable. Windows wants
> to be "activated" and I found that GParted's activation does not 
> suffice.That's
> why I mentioned obtaining a program to activate Windows. If you only have
> one computer, you should get that before you mess around.

I think that goes with OS installation. I was thinking
the narrower issue of booting. I was able to shink a factory
windows 7 partition and boot it with grub/lilo without
affecting any activation codes.

> (I don't pretend to know why this happens, only that it does. That's why there
> are programs available to take care of that problem.)

I speculate that windows startup code looks for changes in
partition parameters recorded during the install. 

> --doug
> 
> 
> -- 
> 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/54723da9.9080...@optonline.net
> 

-- 
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/20141123202520.GA27459@sprite



Re: replacing boot and only disk drive

2014-11-23 Thread Doug

On 11/22/2014 11:38 PM, Joel Roth wrote:

On Sat, Nov 22, 2014 at 11:29:20PM +, Hendrik Boom wrote:


/snip/



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


Yes, grub can boot Windows _just fine_ if Windows is bootable. Windows wants
to be "activated" and I found that GParted's activation does not suffice.That's
why I mentioned obtaining a program to activate Windows. If you only have
one computer, you should get that before you mess around.
(I don't pretend to know why this happens, only that it does. That's why there
are programs available to take care of that problem.)

--doug


--
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/54723da9.9080...@optonline.net



Re: replacing boot and only disk drive

2014-11-23 Thread Hendrik Boom
On Sat, 22 Nov 2014 18:38:41 -1000, Joel Roth wrote:

> On Sat, Nov 22, 2014 at 11:29:20PM +, 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.

Actually, grub2.

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

So I create partitions, copy all the files, edit my grub--config to add 
stanzas just like the existing ones but with the new UUIDs (possibly 
changing menu entries by adding 'old' or 'new'), copy *it* to to the new 
drive too, and then
  grub-install /dev/sdb
or whatever the new drive happens to be at the moment.

If necessary (thought from what you say it probably won't be), repeat 
this after the new drive has been properly installed in the machine so it 
can still find Windows.

And there shouldn't be any show-stopping gotchas.  Just minor ones from 
miscopying UUIDs and the like.  Normal debugging.

-- 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/m4snt2$jbg$1...@ger.gmane.org



Re: replacing boot and only disk drive

2014-11-23 Thread Hendrik Boom
On Sun, 23 Nov 2014 12:14:25 +0100, Pascal Hambourg wrote:

> Pascal Hambourg a écrit :
>> Hendrik Boom a écrit :
>> 
>>> Unless the MBR or something related to it contains information about
>>> the size of the entire disk, which will now be wrong.
>> 
>> 2) If Windows boots from UEFI, I suppose that the original disk
>> partition table is in the GPT format. This format stores two copies of
>> the GPT header, one at the beginning (primary header) and one at the
>> end of the disk (secondary header). Each header has a pointer to the
>> other, so in a way the primary header has a reference to the end of the
>> disk where the secondary header is located. So, if you use dd to copy
>> the whole disk, the secondary header will not be at the end of the new
>> disk.
>> Maybe tools such as gdisk can fix this.
> 
> Looking more carefully, there is more than just the address of the
> secondary GPT header. The GPT header contains also the last usable
> address for partitions which is near the end of the disk, just before
> the secondary partition table. Also, the protective MBR contains a GPT
> partition of the size of the disk - up to 2 TiB due to limitations of
> the MBR partition table format.
> 
> See 
> 
> However, parted will detect that the disk is bigger than the partition
> table reports and ask to fix it. gdisk allows to fix it too.

The laptop now uses MBR partitions.  Since the new drive is only 2T, I 
don't expect to need GPT.  Thanks for the details, though I won't need to 
worry about these until my *next* hard disk enlargement.  And ... will 
Windows XP know what to do with GPT?  But maybe by then I will have 
successfully left Windows, even for the very last commercial applications.

-- 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/m4sjl5$10c$1...@ger.gmane.org



Re: replacing boot and only disk drive

2014-11-23 Thread Pascal Hambourg
Pascal Hambourg a écrit :
> Hendrik Boom a écrit :
> 
>> Unless the MBR or something related to it contains information about the 
>> size of the entire disk, which will now be wrong.
> 
> 2) If Windows boots from UEFI, I suppose that the original disk
> partition table is in the GPT format. This format stores two copies of
> the GPT header, one at the beginning (primary header) and one at the end
> of the disk (secondary header). Each header has a pointer to the other,
> so in a way the primary header has a reference to the end of the disk
> where the secondary header is located. So, if you use dd to copy the
> whole disk, the secondary header will not be at the end of the new disk.
> Maybe tools such as gdisk can fix this.

Looking more carefully, there is more than just the address of the
secondary GPT header. The GPT header contains also the last usable
address for partitions which is near the end of the disk, just before
the secondary partition table. Also, the protective MBR contains a GPT
partition of the size of the disk - up to 2 TiB due to limitations of
the MBR partition table format.

See 

However, parted will detect that the disk is bigger than the partition
table reports and ask to fix it. gdisk allows to fix it too.


-- 
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/5471c191.8050...@plouf.fr.eu.org



Re: replacing boot and only disk drive

2014-11-23 Thread Pascal Hambourg
Hendrik Boom a écrit :
> On Sun, 23 Nov 2014 00:45:38 +0100, Pascal Hambourg wrote:
> 
>> Gary Dale a écrit :
>>> 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.
>>
>> If the original disk already uses LVM, no need to resize partitions.
>> Just create another PV in the extra space.
> 
> dd-ing the whole drive would lead to the extra space being after all four 
> partitions.  Unfortunately, it's the second partition that contains the 
> LVM stuff.

So what ? LVM does not care about the locations of the PVs.

>  I'd end up having to move partitions 3 and 4 to the end of 
> the disk to get the space int partition 2 where it's needed.

Huh ? Why the hell would you need to move partitions ?
There are two situations :

a) You need the extra space only to extend LVs. Then you create a new
partition in the extra space, define it as a PV (pvcreate), use it to
extend the existing VG (vgextend) and extend your LVs as needed
(lvextend or lvresize). All this can be done online while the system is
running. If the LVs contain ext2/3/4 filesystems, the filesystems can be
extended online to the new LV size with resize2fs.

b) You need to extend non-LVM partitions. Only then you have to resize
and possibly move partitions.

> I have no 
> idea whether Windows cares about whether the hidden and the EFI 
> partitions re actually partitions 3 and 4.

Anyway, you do not need to change the partition numbers. Moving a
partition does not mean changing its number.

> But dding the start of the disk, enough to copy the entire windows 
> partition and the stuff before the first one might be a good idea.
> Unless the MBR or something related to it contains information about the 
> size of the entire disk, which will now be wrong.  And it;s the space 
> before the first partition which is likely to contain the crucial boot 
> information that Windows might want.  That ans the EFI partition, of 
> course.

So your system boots from UEFI. This make things a bit different.

1) UEFI booting does not require the MBR and blocklist kludge used for
BIOS booting. The UEFI booloaders are just regular files in the EFI
system partition. So you could just create partitions on the new disk
and copy the files (you may have to update some UUIDs where needed), or
the raw partitions using dd.

2) If Windows boots from UEFI, I suppose that the original disk
partition table is in the GPT format. This format stores two copies of
the GPT header, one at the beginning (primary header) and one at the end
of the disk (secondary header). Each header has a pointer to the other,
so in a way the primary header has a reference to the end of the disk
where the secondary header is located. So, if you use dd to copy the
whole disk, the secondary header will not be at the end of the new disk.
Maybe tools such as gdisk can fix this.


-- 
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/54719ca2.1010...@plouf.fr.eu.org



Re: replacing boot and only disk drive

2014-11-22 Thread Joel Roth
On Sat, Nov 22, 2014 at 11:29:20PM +, 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



Re: replacing boot and only disk drive

2014-11-22 Thread Gary Dale

On 22/11/14 11:04 PM, Hendrik Boom wrote:

On Sun, 23 Nov 2014 00:45:38 +0100, Pascal Hambourg wrote:


Gary Dale a écrit :

On 22/11/14 06:29 PM, Hendrik Boom wrote:

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/

[...]

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.

If the original disk already uses LVM, no need to resize partitions.
Just create another PV in the extra space.

dd-ing the whole drive would lead to the extra space being after all four
partitions.  Unfortunately, it's the second partition that contains the
LVM stuff.  I'd end up having to move partitions 3 and 4 to the end of
the disk to get the space int partition 2 where it's needed.  I have no
idea whether Windows cares about whether the hidden and the EFI
partitions re actually partitions 3 and 4.

But dding the start of the disk, enough to copy the entire windows
partition and the stuff before the first one might be a good idea.
Unless the MBR or something related to it contains information about the
size of the entire disk, which will now be wrong.  And it;s the space
before the first partition which is likely to contain the crucial boot
information that Windows might want.  That ans the EFI partition, of
course.

It's possible that this might not work well if the hard drive has
significantly different fake geometry.  It's just possible that some
things still have to start on cylinder boundaries, however undefined
those are nowadays.

It will contain information about partitions 2, 3, and 4, which I can
delete and change with fdisk. And then still copy partitions 3 and 4 with
dd some some such.  I think those partitions are FAT partitions of some
flavour.  The EFI has to be if it conforms to standards.

-- hendrik


I've DD'd disks many times without incident. Drives don't really care 
about geometry too much anymore.



--
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/5471629c.6010...@torfree.net



Re: replacing boot and only disk drive

2014-11-22 Thread Hendrik Boom
On Sun, 23 Nov 2014 00:45:38 +0100, Pascal Hambourg wrote:

> Gary Dale a écrit :
>> On 22/11/14 06:29 PM, Hendrik Boom wrote:
>>>
>>> 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/
> [...]
>> 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.
> 
> If the original disk already uses LVM, no need to resize partitions.
> Just create another PV in the extra space.

dd-ing the whole drive would lead to the extra space being after all four 
partitions.  Unfortunately, it's the second partition that contains the 
LVM stuff.  I'd end up having to move partitions 3 and 4 to the end of 
the disk to get the space int partition 2 where it's needed.  I have no 
idea whether Windows cares about whether the hidden and the EFI 
partitions re actually partitions 3 and 4.

But dding the start of the disk, enough to copy the entire windows 
partition and the stuff before the first one might be a good idea.
Unless the MBR or something related to it contains information about the 
size of the entire disk, which will now be wrong.  And it;s the space 
before the first partition which is likely to contain the crucial boot 
information that Windows might want.  That ans the EFI partition, of 
course.

It's possible that this might not work well if the hard drive has 
significantly different fake geometry.  It's just possible that some 
things still have to start on cylinder boundaries, however undefined 
those are nowadays.

It will contain information about partitions 2, 3, and 4, which I can 
delete and change with fdisk. And then still copy partitions 3 and 4 with 
dd some some such.  I think those partitions are FAT partitions of some 
flavour.  The EFI has to be if it conforms to standards.

-- 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/m4rmc2$6pf$2...@ger.gmane.org



Re: replacing boot and only disk drive

2014-11-22 Thread Hendrik Boom
On Sat, 22 Nov 2014 19:04:52 -0500, Doug wrote:
...
> 
> 
> You may find that Windows won't boot. There are a number of ways to fix
> that. If you have a "real" install disk, I think that will work. Or
> Google for "Windows won't boot after copy," or something like that.
> There are a couple of free programs that will fix it. Unfortunately, I
> can't give you any better details than that--I went thru it last Spring.
> If you have to fix the Windows booter, it will surely destroy your Linux
> boot setup, so you'll need a live Linux disk to get back to that. It's
> all a pain, but it's doable.
> (I'm thinking of doing the same basic thing myself, to put a SSD in my
> laptop.)
> Good luck!
> --doug

Where does Windows keep its boot information, anyway?

-- 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/m4rlml$6pf$1...@ger.gmane.org



Re: replacing boot and only disk drive

2014-11-22 Thread Doug

On 11/22/2014 06:34 PM, Hendrik Boom wrote:

On Sat, 22 Nov 2014 23:29:20 +, 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.


OOPS!  It's grub2, not grub-legacy.


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



You may find that Windows won't boot. There are a number of ways to fix that.
If you have a "real" install disk, I think that will work. Or Google for
"Windows won't boot after copy," or something like that. There are a couple of
free programs that will fix it. Unfortunately, I can't give you any better
details than that--I went thru it last Spring. If you have to fix the Windows
booter, it will surely destroy your Linux boot setup, so you'll need a live
Linux disk to get back to that. It's all a pain, but it's doable.  
(I'm thinking of doing the same basic thing myself, to put a SSD in my laptop.)

Good luck!
--doug


--
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/547124a4.7020...@optonline.net



Re: replacing boot and only disk drive

2014-11-22 Thread Pascal Hambourg
Gary Dale a écrit :
> On 22/11/14 06:29 PM, Hendrik Boom wrote:
>>
>> 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/
[...]
> 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.

If the original disk already uses LVM, no need to resize partitions.
Just create another PV in the extra space.


-- 
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/54712022.6000...@plouf.fr.eu.org



Re: replacing boot and only disk drive

2014-11-22 Thread Hendrik Boom
On Sat, 22 Nov 2014 23:29:20 +, 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.

OOPS!  It's grub2, not grub-legacy.

> 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



-- 
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/m4r6hp$o6n$3...@ger.gmane.org



Re: replacing boot and only disk drive

2014-11-22 Thread Gary Dale

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.



--
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/54711d93.10...@torfree.net



replacing boot and only disk drive

2014-11-22 Thread Hendrik Boom
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


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