On Sat, 15 Feb 2014, André Nunes Batista wrote:

> On Mon, 2014-02-10 at 14:13 -0800, Patrick Bartek wrote:
> > Well, the hard drive in my personal desktop machine has been
> > running virtually continuously for 7 years, and I'm gettin'
> > nervous.  So, time to transfer Wheezy to a new, bigger drive;
> > something I've never done before.  I've always clean installed.
> > So, here's what I plan with a few questions.  Opinions and
> > suggestions appreciated before I take the leap.
> > 
> > I'll be using a gparted LiveCD and rsync for the transfers.
> > Everything done as root, of course.  There are other OSes on the
> > old drive, but I won't be transferring them.  The old drive will be
> > removed after Wheezy is transferred, static bagged and stored in a
> > drawer just in case.
> > 
> > 1. Partition and format new 500GB SATA III drive.  No LVM, RAID or
> > GPT. [Note i] 
> > 
> > 2. Is 'rsync -axH <mount point source partition> <mount point
> > destination partition>' sufficient to copy ALL files with
> > permissions, etc?
> > 
> > 3. Move the old grub.cfg out of the new /boot/grub/.
> > 
> > 4. Ditto for old device.map.[Note ii]
> > 
> > 5. Shutdown, remove old drive, reboot with LiveCD.
> > 
> > 6. Chroot to new drive / partition: chroot <mount point /
> > partition> 
> > 
> > 7. Create new grub.cfg: 'grub-mkconfig -o /boot/grub/grub.cfg'
> > 
> > 8. Install grub on new drive's MBR:  'grub-install <new drive's
> > system name, probably /dev/sda>'
> > 
> > 9. Shutdown, reboot without LiveCD.  See if it took.
> > 
> > 10.  Troubleshoot, if it didn't.
> > 
> > 
> > So, any glaring errors?  Any better (read easier) ways to do this?
> > 
> > Thanks.
> > 
> > Patrick
> > 
> > 
> > 
> > i. The new drive will be partitioned, thusly: / on 1st
> > Primary; /home on Second Primary; swap on Third Primary; Primary 4
> > Extended for future use.
> > 
> > ii. Read that grub-mkconfig will create a new device map on the
> > fly, if none exists.  True?  Also, sometimes leaving the old one in
> > place causes problems. True?  If I need to create a new one is
> > there a utility that does that, or do I just decipher it and make
> > the necessary changes manually?
> > 
> > 
> 
> I've never done this -> wouldn't it be possible to "dd-it", boot and
> then extend the home partition?

Yes, dd will clone an entire drive (or a partition) including the
filesystem, partition table, etc.  So, there's no need to partition or
format the new drive. Saves time. But dd also "copies" all the "empty"
space on the source drive, too. So, in that respect, if all you want to
do is backup (or move) data to a new location, it wastes time.  cp
or rsync are better for that.

As to resizing a partition: One should never do that on a partition
that's "in use."  You're asking for trouble.  Even doing so on an
inactive partition, backup your data first just to be safe.

The reason I opted for rsync instead of dd is the source and target
drives are from two different eras with different configurations, and
cloning the old drive to the new had the potential of causing problems
and, at the very least, reducing R/W efficiency.  I won't go into the
details, but suffice to say, I thought it better to partition and
format the new drive first, copy over the files, edit a couple of
configs, and build and install a new grub.  More work?  Yes.  But
I'll have a more efficient, faster system.

B


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140215101845.5ffaa...@debian7.boseck208.net

Reply via email to