[svlug] Consider my mini-HOWTO

Bill Jonas bill at billjonas.com
Sat Mar 17 10:54:02 PST 2001

On Sat, Mar 17, 2001 at 12:11:48AM -0800, Aaron Lehmann wrote:
> What's wrong with:
> 	cp -a source dest
> Tar seems counterproductive because you end up concatenating all files
> to a single file (a pipe in this case) just to extract them into
> separate files once again.

I've heard that cp's -a flag doesn't do as good of a job as tar; tar will
preserve permissions and even hard links and such.  I don't know; after
using the "pipe tar to tar" method, it seems rather intuitive and logical
to me.  YMMV.

A couple other nitpicks with the document; there's no need to reboot just
to go to single-user mode.  Simply issue a 'telinit S' (or 's', or '1'; on
my Debian 2.2 box, they all seem to do the same thing).  Muck with the
copying, unmounting, and remounting, and then issue a 'telinit 2' (or
whatever is the default runlevel for your distribution) to get back to
multi-user mode.  To my knowledge, the only time that changing which
partition is mounted at a given mount point requires a reboot is if you're
moving / around.  (The only other times I can think of that need a reboot
are if you're changing the kernel (but even this might no longer be
required; see "Two Kernel Monte") or if you're changing the command-line
parameters for the kernel.)

I do have a bit of experience with this.  Most recently, on two different
occasions, I have done the partition shuffle on my laptop, in order to
rebuild filesystems as a different type.  The first time, it required
moving around *all* the partitions twice, as it was an installed ext2
system.  The second time (I was reinstalling my favorite distribution
after briefly trying another one), I had installed everything in one
partition to start with, in order to prepare for running mkreiserfs on the
"regular" partitions.  (Yes, I know about the Debian boot-floppies someone
made for installing as ReiserFS, but the creator apparently didn't rebuild
the PCMCIA modules for the set that he made. (Search Freshmeat for 'Debian
Reiser'.  It's the only result, at least as of a few weeks ago.))

Note that you'll probably want to leave your old partition just as it is
for a few days/weeks, just to make sure everything's working properly.
The old partition will also function as a safety net; if anything goes
wrong with the new partition, just mount the old one in its place.

Bill Jonas                | "In contrast to the What You See Is What You
bill at billjonas.com        |  Get (WYSIWYG) philosophy, UNIX is the You
http://www.billjonas.com/ |  Asked For It, You Got It operating system."
http://www.debian.org/    |  --Scott Lee, as quoted by Lamb and Robbins

More information about the svlug mailing list