From owner-freebsd-questions Tue Oct 6 20:43:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA22534 for freebsd-questions-outgoing; Tue, 6 Oct 1998 20:43:40 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from gateway.crc.ricoh.com (gateway.crc.ricoh.com [205.226.66.126]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id UAA22479 for ; Tue, 6 Oct 1998 20:43:24 -0700 (PDT) (envelope-from star@strawberry.adc.rsv.ricoh.com) Received: by gateway.crc.ricoh.com; id UAA09128; Tue, 6 Oct 1998 20:40:58 -0700 Received: from strawberry.adc.rsv.ricoh.com(172.30.31.68) by gateway.crc.ricoh.com via smap (4.1) id xma009125; Tue, 6 Oct 98 20:40:35 -0700 Received: (from star@localhost) by strawberry.adc.rsv.ricoh.com (8.8.8/8.8.8) id UAA00288; Tue, 6 Oct 1998 20:46:20 -0700 (PDT) (envelope-from star) Date: Tue, 6 Oct 1998 20:46:20 -0700 (PDT) Message-Id: <199810070346.UAA00288@strawberry.adc.rsv.ricoh.com> To: freebsd-questions@FreeBSD.ORG X-URL: http://www.freebsd.org/mailto.html X-Mailer: Lynx, Version 2.7.2 X-Personal_name: Jim Dennis (from wife's account) From: jimd@mail.starshine.org Subject: cpio segfaults on /dev/??? Cc: jimd@mail.starshine.org Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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