Re: dd question

Top Page
Attachments:
Message as email
+ (text/plain)
+ (application/pgp-signature)
Delete this message
Reply to this message
Author: Bill Jonas
Date:  
To: plug-discuss
Subject: Re: dd question
On Sat, Jul 17, 2004 at 09:12:59AM -0700, Charlie Bullen wrote:
> Will the above dd command do what I want, namley copy all the contents
> to the larger partiton on the second disk?


Stricly speaking, yes. However, the filesystem will still only be the
same size. Some filesystems have a growfs command and others do not.
For those that don't, parted may help, but it's another layer.

What is wrong with using cp or tar? dd is not the end-all and be-all.
Make your filesystem on the other partition and mount it, we'll assume
at /mnt, and run "cp -a /home /mnt" or (my preferred method) "(cd /home
&& tar -cpf - .) | (cd /mnt && tar -xpvf -)". (I prefer the latter
simply because of a greater trust of tar, most likely irrationally. I
was introduced to that construction by
<http://www.tldp.org/HOWTO/Tips-HOWTO-2.html#ss2.6>.)

> Also when all this is done, I am only going to be using the second
> disk, currently the /etc/fstab file on the second disk refers to the
> devices as /dev/hda1 , dev/hda2 etc. When I modify this file, should I
> refer to what in the copying process, I refered to as /dev/hdb4 as
> /dev/hda4 as that will then be the only disk that exists.


Yes.

A page that might help is
<http://www.slackware.com/faq/do_faq.php?faq=zipslack#1>. The boot disk
method it mentions is probably the easiest to do. Otherwise, the method
you use depends on whether you're using lilo or grub.

-- 
Bill Jonas    *        *    http://www.billjonas.com/
"It's a dangerous business, Frodo, going out your front door.  You step
into the Road,  and if you don't keep your feet,  there  is  no knowing
where you might be swept off to."  --  Bilbo Baggins