Re: Upgrading hard drives



ray <ray@xxxxxxxxxx> writes:

On Wed, 29 Aug 2007 12:05:53 +0100, Darius wrote:

Before I begin, I have noticed a similar question recently on this
group, but not quite the same questions I have, so it's not 100%
duplicate.

I wish to get a bigger hard drive to replace a long-in-tooth drive.
The way my pc is organised is Windows (on a bootable partition) and
also GRUB, is on one drive, and the entire Linux OS (non-bootable
partitions) is on a second drive, which also has one FAT32 partition.
It is easy to copy the FAT32 partition, the hard drive manufacturer
software can do that, but it doesn't understand "Linux" partitions.

My Linux newbie questions are:

1. Is there any easy "bootable" software to copy exactly the
files/permissions etc. from the old drive to the new one for Linux
partitions, also graphically create new Linux partitions on the new
drive and format them?

You boot a Live CD such as the Gparted Live CD. Use partimage to copy the
entire partition and gparted to create and format partitions.

Yes, that is another way. Then you want to mount both the old drive and the
new.
mkdir /hda
mkdir /hdb
mount /dev/hda1 /hda
mount /dev/hdb1 /hdb
rsync -av /hda/ /hdb


Yes, that is another way. Then you want to mount both the old drive and the
new.
mkdir /hda
mkdir /hdb
mount /dev/hda1 /hda
mount /dev/hdb1 /hdb
rsync -av /hda/ /hdb


Yes, that is another way. Then you want to mount both the old drive and the
new.
mkdir /hda
mkdir /hdb
mount /dev/hda1 /hda
mount /dev/hdb1 /hdb
rsync -av /hda/ /hdb


Yes, that is another way. Then you want to mount both the old drive and the
new.
mkdir /hda
mkdir /hdb
mount /dev/hda1 /hda
mount /dev/hdb1 /hdb
rsync -av /hda/ /hdb


(Note rsync -av /hda/ /hdb
meand copy the contents of the directory /hda to /hdb
while
rsync -av /hda /hdb
means copy also the directory hda to hdb. Ie you will have /dev/hdb/hda
directory in this case.)


2. If there is no bootable software, how can you copy the Linux
partitions without booting the entire system (which means that files
would change)?

Boot one of the many Live CDs (or Live DVD if you prefer).


3. Does it matter if the new drive has different partition types
compared to the old drive (ie. Rieser vs Ext3)?

If you simply copy file with, e.g., cp - no. If you use a partition backup
tool like partimage, yes.

Use rsync not cp. (You would wnat to use cp -pr, but it is inefficient and
somewhat dangerour for this kind of job)



4. Does it matter that the new drive would have larger partitions then
the old one when copying the files?

With partimage, you copy to a new partition of the exact size and then
boot the Live CD and use gparted to expand the partitions.

not a great way of doing it but possible.



5. Would GRUB have to be edited in some way when replacing the old
drive with the new drive? In Windows you can copy say C and D, and
just do a straight swap old for new drive and the drive letters will
still be C and D.

Don't quite understand what you're getting at. If it is a direct
replacement, no. For example: when I replaced the 40gb drive in my laptop
with a 120, I used partimage to backup the partitions to an external USB
drive - then swapped hard disks and restored them. Then resized using a
Live CD and then booted up. No sweat.

Uh, no, because you need grub on the MBR and it needs to know where to look
for its next files.
Ie, yes you do need to reinstall grub onto the MBR




Thanks
Darius

.



Relevant Pages

  • Re: Upgrading hard drives
    ... partitions) is on a second drive, which also has one FAT32 partition. ... but it doesn't understand "Linux" partitions. ... Then you want to mount both the old drive and the ... mkdir /hda ...
    (comp.os.linux.misc)
  • Re: [SLE] Need help mounting a USB disk drive
    ... > be able to move that device between my Windows machine and my Linux machine. ... > The idea would be to convert one of those partitions into either an EXT2 ... > to create a high-level directory entry for use as a mount point and issue ...
    (SuSE)
  • Re: Networking under SuSe
    ... principals on how to do this under Linux. ... NFS is what you best can use. ... machine with the standard three partitions, ... You can, with NFS, easily mount any partition on any machine. ...
    (alt.os.linux.suse)
  • Re: formatting hardrive
    ... > as easy to use fdisk and disklabel directly. ... you have to newfs each of the partitions except for swap. ... > Now mount partition a on /mnt so you can make the mount points for ... > mkdir tmp ...
    (freebsd-questions)
  • Re: System partition icons do not show up
    ... Other partitions on the drive do have their icons ... Disk utility also seems to unmount and mount them although ... "SetFile" tool which is part of the developer tools, ...
    (comp.sys.mac.system)