LWN.net Logo

Grub From the Ground Up (Troubleshooters.com)

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 14, 2005 23:21 UTC (Mon) by JoeBuck (subscriber, #2330)
In reply to: Grub From the Ground Up (Troubleshooters.com) by roskegg
Parent article: Grub From the Ground Up (Troubleshooters.com)

Looks like the guy who wrote that document doesn't know about GNU tar's --one-file-system flag (so he thinks he needs to build exclusion lists to keep from copying the proc filesystem and mounted disks).


(Log in to post comments)

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 14, 2005 23:41 UTC (Mon) by ballombe (subscriber, #9523) [Link]

Look like you are a GNU/Linux afficionado then: this document state that:

"The version of GNU Tar that comes with the BSD's and any recent GNU/Linux will work; other tars may, but I have not tested them. GNU/Linux afficionados will note that some of the zoomier features of GNU tar are not used here; that is because the free BSD's use an older version of GNU tar."

(This document is dated Oct. 2000.)

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 15, 2005 0:02 UTC (Tue) by roskegg (subscriber, #105) [Link]

Look closer; the example disk migration in the article assumed there were three different partitions that needed copying. At one filesystem per partition, that is hardly a candidate for use of the --one-filesystem option to tar.

Back in the old days, we used separate partitions for stuff; we didn't have one huge gigantic root partition.

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 15, 2005 0:39 UTC (Tue) by JoeBuck (subscriber, #2330) [Link]

I don't understand your criticism. You want to copy each source partition to a different destination partition. To do this, you can use one tar command for each partition copy.

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 15, 2005 0:49 UTC (Tue) by roskegg (subscriber, #105) [Link]

Sure. You can do multiple tar commands. Or you make up the list of excludes once, then reuse it each time you upgrade your harddrive. Fewer commands to type means fewer commands to mess up.

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 15, 2005 1:46 UTC (Tue) by brouhaha (subscriber, #1698) [Link]

Sure, but if you want to do a single tar of three filesystems, it's even easier to just say something like "tar -clf - /etc /usr /var".

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 15, 2005 7:53 UTC (Tue) by kasperd (guest, #11842) [Link]

Why even use tar? I find a simple cp -a easier to use. (Unless I need to transfer it across a network, in which case tar is my prefered way to serialize the data).

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 15, 2005 17:34 UTC (Tue) by ceswiedler (subscriber, #24638) [Link]

Aren't there some issues with permissions, devices, setuid bits, etc when using cp -a? I've been bit by that stuff before. I think tar handles these cases better.

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 17, 2005 21:46 UTC (Thu) by kael (guest, #1599) [Link]

I have cloned many a system (Linux with Gnu tools) over the years.

Works fine.

Grub From the Ground Up (Troubleshooters.com)

Posted Mar 18, 2005 22:53 UTC (Fri) by haraldt (guest, #961) [Link]

Look up the man pages of "cp". The "-a" switch covers a lot, but you may want to add some more.
One silly little detail: "cp" isn't allowed to copy all the settings when not running as root.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds