Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Oct 1998 20:46:20 -0700 (PDT)
From:      jimd@mail.starshine.org
To:        freebsd-questions@FreeBSD.ORG
Cc:        jimd@mail.starshine.org
Subject:   cpio segfaults on /dev/???
Message-ID:  <199810070346.UAA00288@strawberry.adc.rsv.ricoh.com>

next in thread | raw e-mail | index | archive | help

  Yuck!  I don't have a real editor! Blasted lame lynx configuration!

  Okay, here's the problem.  My wife had one of her servers suddenly
  forget how to boot. (I don't know what's up with that --- but they
  were planning on swapping out that hardware for another box anyway
  --- so this just accelerated the process a bit.

 We boot this thing into the "holoshell?" (rescue shell), configure
 the other box to let us rsh to it, and issue something like the 
 following commands:


             rcp /etc/passwd other:/etc/passwd
             rcp /etc/group  other:/etc/group


    That's to make sure that the ownership gets preserved in the 
  next step --- I've had problems with GNU cpio's -n --numeric-uid-gid
  switch so this is the workaround.  (Does the FreeBSD cpio have that
  bug?).

  Next we do something like:

            cd /mnt/oldroot
            find . -print0 | cpio -o0BH crc | rsh other "( cd / && cpio \
             -ivumd )"

  ... which goes for a short time then segfaults on one of the rd* 
  nodes.

  We're now working around that by using -print | grep -v "^./dev/" | ...
  which seems to be working (actually we also moved the "v" (verbose)
  switch from the remote cpio back to the local one --- but I doubt that's
  relevant).

  So, why does cpio/FreeBSD barf when writing over one of the device 
  nodes?  cpio is supposed to "know" about device nodes and properly
  handle the appropriate unlink and mknod system calls, isn't it?

  All answers, even flames, appreciated.  TIA.

  Jim Dennis,
  Proprietor, Starshine Technical Services
  (Linux Gazette, ``Answer Guy'')

  PS:  Okay -- it *seemed* to be working.  Now it segfaults in the /bin
  directory.  We'll try the old 'tar | rsh other "(cd ... && tar xf - )"
  trick.   I moved away from that method on Linux (using GNU tar) when
  I found a bug in setting the perms on empty directories; luckily they
  fixed that awhile ago.  Geeeezzzz!



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810070346.UAA00288>