Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Aug 1995 07:28:28 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-current@freebsd.org, j@uriah.heep.sax.de
Subject:   Re: my Linux swap partition again
Message-ID:  <199508262128.HAA17541@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Well, trying to automate the swap partition sharing...

>fdisk -i /dev/rwd0 >/dev/null 2>&1 <<eof
>...

>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 <mysliceinfo>

>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 <mysliceinfo>
is inconsistent.

The fdisk step shouldn't be necessary.  Just write a label.

Bruce



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