From owner-freebsd-questions@FreeBSD.ORG Sat May 16 09:14: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 308F89EE for ; Sat, 16 May 2015 09:14:17 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "ca.infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C40211DE9 for ; Sat, 16 May 2015 09:14:16 +0000 (UTC) Received: from liminal.local ([192.168.100.2]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.1/8.15.1) with ESMTPSA id t4G9E4Yi019358 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sat, 16 May 2015 10:14:04 +0100 (BST) (envelope-from matthew@FreeBSD.org) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk t4G9E4Yi019358 Authentication-Results: smtp.infracaninophile.co.uk/t4G9E4Yi019358; dkim=none reason="no signature"; dkim-adsp=none; dkim-atps=neutral X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host [192.168.100.2] claimed to be liminal.local Message-ID: <55570A54.2080107@FreeBSD.org> Date: Sat, 16 May 2015 10:13:56 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Swap partition for FreeBSD References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pc2qNR7SocS2d5K6oXtfb001lMktgTLle" X-Virus-Scanned: clamav-milter 0.98.7 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on lucid-nonsense.infracaninophile.co.uk 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:14:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pc2qNR7SocS2d5K6oXtfb001lMktgTLle Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 16/05/2015 08:41, Avinash Sonawane wrote: > I was trying to build www/webkit-gtk3 (a dependency for x11/gnome3) > then it abruptly exited with "Out of swap space error" so I created a > separate 8GB partition to be used as freebsd-swap. >=20 > Here is `gpart show`, `gpart show -p`, `swapinfo` and `/etc/fstab` > http://pastebin.com/KSFM49yP >=20 > Now my problem is that I see a message "May 16 12:31:59 titanic > kernel: GEOM_PART: Partition 'ada0s6' not suitable for kernel dumps > (wrong type?)" during bootup. >=20 > And I think that's because though the system is using ada0s6 as swap > partition (evident from the above pastebin) the partition has a wrong > type. More specifically it is linux-data instead of freebsd-swap (See > `gpart show` in above paste) >=20 > So how do I change the type of ada0s6 to freebsd-swap? >=20 > I tried `bsdlabel -e ada0s6` but then it said "bsdlabel: /dev/ada0s6: > no valid label found" >=20 > Then I tried `gpart modify -i 2878773 -t freebsd-swap ada0s4` then it > said "gpart: pre-check failed: Operation canceled" (Here 2878773 is > the index number of ada0s6. See `gpart show` in above pastebin) >=20 > I tried these 2 approaches after `swapoff /dev/ada0s6` too but they > throw same error messages as above. >=20 > So how do I get rid of the above mentioned error message appearing > during boot or how do I format ada0s6 to freebsd-swap from linux-data? You're correct to use gpart(8) to create your new swap partition. Don't use bsdlabel(8) -- that is for dealing with the really old style of disk partitioning and is incompatible with the gpt disk labels you have. 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. 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. Cheers, Matthew --pc2qNR7SocS2d5K6oXtfb001lMktgTLle Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) iQJ8BAEBCgBmBQJVVwpbXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAThBAP/0LlznS7ktRyaglDrBiLaVV7 DOHvhFJcX3VFvnV4xMXh+7BXyeUgb2b2SfxrU/mKcJ62U0JP1nDM48s64Ib4UFRx L4PdVoRxcRDE3Blbr7wmpcY0DNF4NrYSewwGDqOVKfBrjC5dJzg6218u/dO2YXh6 UuhcmPSAiIG04DEK5li9WeRpql13Ni68KxYC9NDJW33zqOytahg+M0YntCRE6t8L 6PipQfY6A7M4a37W+E5C3ERxtWCLK7cqZNNvly221wJjVRMrXhyEA3tNuTLIG0iz y/WR7lGJEMOAtACx8DRQXSBh8CPMGza95MQr/FUef0uoxB7GO1gS9QHCnoWS7Ght Wq6j+ZHAv9k1ZpUrw6oip5Hp5xQsVXYEF/hXkJeIancp9cZ+bbDnlCaPB97wvLh6 /2umItglrPgTFptXinniOMDk6MDWRdCRw5R52SjnXAB8H0UeWuVR8ZlP9d0FTMm4 C6Ckhgp2pF7uvcwjOsGJabq05eG3IvGJns2JL+0tvbTqzAHft/X1VLXbIytiUGdA IQ5gww1vgttgwZWlHpEIjO1uHw/CmojUcUp/TeEE/LVdolLivU2j9j4KY3uUfC6K QkwmyrYWvDCsiaXp3NXKkVX3XtXuIOS2MYs9Vqg29vwqSxO0hyetg3A+SclKwkIv 0m2mEgwwAqPpP3SWbaZh =723A -----END PGP SIGNATURE----- --pc2qNR7SocS2d5K6oXtfb001lMktgTLle--