Swap partition for FreeBSD
rootkea at gmail.com
Sat May 16 09:47:17 UTC 2015
On Sat, May 16, 2015 at 2:43 PM, Matthew Seaman <matthew at 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
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)
More information about the freebsd-questions