From owner-freebsd-current Sat Aug 26 14:33:51 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id OAA02696 for current-outgoing; Sat, 26 Aug 1995 14:33:51 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id OAA02655 for ; Sat, 26 Aug 1995 14:33:42 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id HAA17541; Sun, 27 Aug 1995 07:28:28 +1000 Date: Sun, 27 Aug 1995 07:28:28 +1000 From: Bruce Evans Message-Id: <199508262128.HAA17541@godzilla.zeta.org.au> To: freebsd-current@freebsd.org, j@uriah.heep.sax.de Subject: Re: my Linux swap partition again Sender: current-owner@freebsd.org Precedence: bulk >Well, trying to automate the swap partition sharing... >fdisk -i /dev/rwd0 >/dev/null 2>&1 <... >Does here somebody say we'd need a command-line modus for fdisk? :--) And a robust version of fdisk... >Anyway, i can succesfully re-convert Linux' swap partition into a >valid FreeBSD slice by the above, but >disklabel -r -w wd0s3 >always fails: >disklabel: ioctl DIOCSDINFO: Label magic number or checksum is wrong! >(disklabel or kernel is out of date?) fdisk doesn't synchronize the changes with the kernel, so there are problems if wd0s3 doesn't already exist or if you changed its size. sysinstall uses the DIOCSYNCSLICEINFO ioctl to sync. You can also sync by closing all minors on the disk, but this is impossible if the device has root or swap on it. wd0s3 must have existed for disklabel to get as far as the DIOCSDINFO attempt, so perhaps you gave the wrong size to fdisk, or is inconsistent. The fdisk step shouldn't be necessary. Just write a label. Bruce