[Q] tar - Mode or device-type changed

Dale R Worley worley at world.std.com
Wed Nov 13 09:44:36 EST 1996


   From: "Bosco So" <bso at acm.org>

   Keep in mind that I'm trying to move/resize a partition as simply as
   possible.  What I did was to boot up on hda3, mount hda2 as /mnt/2/, and
   tarred from within there.  Since I booted from hda3 and was using was using
   it as root, /mnt/2/tmp and /mnt/var/tmp should not have been affected.

It might be easier to use "cp -ar", which I think will copy "special
files" correctly, rather than use "tar" (which is oriented to saving
and restoring data).

   Lets say I exclude /dev when I tar hda2.  Then I subsequently trash hda2. 
   If I restore hda2 from the tar archive and then try to boot from hda2, will
   Linux build all the /dev devices on the fly during startup?  If not, what
   happens?

No, Linux will not build the /dev entries.  What happens is that
everything works OK, except those things that use the /dev entries
(like mounting other disks).  However, you can rebuild your /dev
manually using mknod, so you can recover.  Many distributions also
have scripts that build all or most of /dev.

Dale



More information about the Discuss mailing list