From owner-freebsd-questions@FreeBSD.ORG Sat May 16 09:47:17 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E6B816D; Sat, 16 May 2015 09:47:17 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B20210CB; Sat, 16 May 2015 09:47:17 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so15791137igb.1; Sat, 16 May 2015 02:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=1wbewx0jE9aRqGWimlxzWvtD9YLHa6VvRkrCZOIVk2E=; b=az7KdUqrabGp8D/Ba34apRkczU0oM9o+HPyZj1p0282rFK4t3mIHQiI0wgm/J1Zn3c EA6BBEn1HLkMrB7t0ooj0rBlRmeQiHU4PnKSf/djp63dizN8D4dVH4GNty1T+A5o3EFe 5q0oeF5cRD3Xi53i6MnkN4Z71Cs4DNv8PcLfrZgjo+potC4sGXMgNov5vnrF2TAw4rpj C18JXnQQXrQKTcAqv/yVzY93fGtiRySCYAHJWpvKKOxIuSveOrYb2DKEXr+4ZnMLdl09 CNwb/VGkTajJZ3VEPyBW4hw6GmxZPRYEpKp6ZXvEW4ewdARg9BzdUQt/jU/p2PEgpcvk JF1w== X-Received: by 10.50.79.196 with SMTP id l4mr3357067igx.48.1431769636629; Sat, 16 May 2015 02:47:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.121.1 with HTTP; Sat, 16 May 2015 02:46:56 -0700 (PDT) In-Reply-To: <55570A54.2080107@FreeBSD.org> References: <55570A54.2080107@FreeBSD.org> From: Avinash Sonawane Date: Sat, 16 May 2015 15:16:56 +0530 Message-ID: Subject: Re: Swap partition for FreeBSD To: Matthew Seaman Cc: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 09:47:17 -0000 On Sat, May 16, 2015 at 2:43 PM, Matthew Seaman 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