using swap on a separate slice
walt
wa1ter at myrealbox.com
Wed Dec 20 15:02:40 PST 2006
On Tue, 19 Dec 2006, Ja'far Railton wrote:
> On Tue, Dec 19, 2006 at 11:23:28AM -0800, walt wrote:
> > Joerg Sonnenberger wrote:
> > > On Tue, Dec 19, 2006 at 11:45:22AM +0300, Ja'far Railton wrote:
> > >> I would like to make use of a swap slice left over from a Linux install
> > >> (in order to free up the current DFly swap partition for other use).
> > >> It is therefore an extended partion. I have googled this but need some
> > >> pointers. Can anyone help me with this?
> >
> > > Extended partitions end up as ad?sX with X>=4. It should be the same
> > > order as Linux otherwise.
> >
> > I seem to recall that I've needed to create extended partitions in the
> > /dev directory.
> >
> > If the existing swap partition in linux was e.g. /dev/hda7, then in
> > DragonFly you would do this:
> >
> > # cd /dev
> > # ./MAKEDEV ad0s7
>
> Thanks for the replies.
>
> Well, I tried MAKEDEV with ad0s4 (and other permutations as I had
> been playing around with fdisk, marking the slice 'swap', then 'unused',
> so I thought is might show up ad0s3x or even ad0s5x).
>
> Nothing would swapon. I got 'Device not configured' or 'invalid
> argument' depending on the /dev (e.g. /dev/ad0s4, ad0s4{a,b}, etc.).
I just tried using my linux swap partition/slice on DF. To avoid
the errors you mention I had to add a disklabel to the swap slice:
#disklabel -w -r /dev/ad0s8 auto
#swapon /dev/ad0s8
# swapinfo
Device 1K-blocks Used Avail Capacity Type
/dev/ad1s6b 524160 0 524160 0% Interleaved
/dev/ad0s8 529984 0 529984 0% Interleaved
Total 1054144 0 1054144 0%
I'm guessing that if I now reboot into linux and anything swaps to
disk, my new disklabel will get trashed -- just something to keep
in mind for us OS junkies ;o)
More information about the Users
mailing list