Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2015 15:16:56 +0530
From:      Avinash Sonawane <rootkea@gmail.com>
To:        Matthew Seaman <matthew@freebsd.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Swap partition for FreeBSD
Message-ID:  <CAJ9BSW-uBVM=dj%2Bd2_1AxDxsoRpUG2s=-XpWe=auib1jMf32uQ@mail.gmail.com>
In-Reply-To: <55570A54.2080107@FreeBSD.org>
References:  <CAJ9BSW9cVmd8c%2B4E5rWAd9FPDvgpwqVKDSh7962FW3-g_W9jMQ@mail.gmail.com> <55570A54.2080107@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 16, 2015 at 2:43 PM, Matthew Seaman <matthew@freebsd.org> wrote:

> partitioning and is incompatible with the gpt disk labels you have.

No. I don't have GPT disk labels. I have MBR partitioning scheme.

> Now, in order to fix your problem: you can't change the type of a
> partition.  Instead, you need to delete the partition and then create a
> new 'freebsd-swap' partition using the same chunk of disk space.  Try
> and quiesce the system as much as possible before you do this -- it
> might be worth booting from a LiveCD.  Also the index numbers look
> pretty strange to me.  Possibly the OS that created those partitions has
> different ideas on the layout of a gpt partition table, and it might be
> necessary to boot back into that OS in order to remove the partition
> cleanly.

When I tried to delete the said partition from freebsd as `gpart
delete -i 2878773 ada0s4` it says "gpart: pre-check failed: Operation
canceled". So I booted to Debian and deleted that partition using
Gparted and then when I tried to create freebsd-swap in FreeBSD (from
previously freed 8GB) as `gpart add -t freebsd-swap -b 181362690
ada0s4` it again said "gpart: pre-check failed: Operation canceled"

After searching a bit on the web I came to know that default kernel
build options specify "options GEOM_PART_EBR_COMPAT" which prevents
GEOM from editing EBR partition schemes. So to create a partition of
type freebsd-swap in extended partition it looks like I need to
recompile the kernel without the GEOM_PART_EBR_COMPAT kernel option.

Any other way beside this?

> There's no formatting required for a swap area: the system just uses it
> as a blob of available space and writes what it needs to.

Ok. But I am getting really annoyed by that error message during boot
and and a feeling that my 8GB freebsd swap partition won't be able to
store the kernel dumps.

-- 
Avinash Sonawane (RootKea)
PICT, Pune
http://rootkea.wordpress.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ9BSW-uBVM=dj%2Bd2_1AxDxsoRpUG2s=-XpWe=auib1jMf32uQ>