From owner-freebsd-questions@FreeBSD.ORG Sat Dec 6 00:18:23 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65C27C7C for ; Sat, 6 Dec 2014 00:18:23 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 330A1DD0 for ; Sat, 6 Dec 2014 00:18:23 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id r10so1641159pdi.27 for ; Fri, 05 Dec 2014 16:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=JsODFtAUvxUtDcPrObNCg6QXn04ptDw0s8L9JNSHbpg=; b=Sir2r1O2BuCsmenA7Sw+NLMkF3+h7it92Uub1e0KscHRqyrfDdKyvHDV4yg5xoaUFy IOlddX8llEi58DyKLkAj8NGb/7xNNSv7WTYVhMolfbRS5Ij3r8t4uTEFqbqJ2o7uMVJ0 Kjau0sl8IR/UGtNQUFi47jm9Emgmnx0WR0x/YDaQxKd43xfvS4tZUJFnzXS9qmDfN/ns 93mDpfh9EUuO746hz3StdLHOdCPy9Wx5ZuC8G6UpgGavtL7/uBbrFQFsP6YPJi9Osokm KhCb9AKkmH6nZ356CPEODgoBxiR6FQE87NmhX4hpBPQYu5bdKDGidRK/oiAdcIRV2ekO gDdQ== X-Received: by 10.68.68.227 with SMTP id z3mr8307040pbt.3.1417825102813; Fri, 05 Dec 2014 16:18:22 -0800 (PST) Received: from localhost.localdomain (76-218-80-47.lightspeed.irvnca.sbcglobal.net. [76.218.80.47]) by mx.google.com with ESMTPSA id ay4sm12503202pbb.29.2014.12.05.16.18.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Dec 2014 16:18:22 -0800 (PST) Message-ID: <54824B4D.9000004@gmail.com> Date: Fri, 05 Dec 2014 17:18:21 -0700 From: jd1008 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Mounting swap without device name References: <20141206010235.331c3212.freebsd@edvax.de> In-Reply-To: <20141206010235.331c3212.freebsd@edvax.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:18:23 -0000 On 12/05/2014 05:02 PM, Polytropon wrote: > On Sat, 06 Dec 2014 00:50:50 +0100, Christian Baer wrote: >> Changing device IDs can be a pain. Adding a hard drive to my system results >> in the system not booting anymore because the device name for / changes >> after the second drive is detected. I have overcome this by having an fstab >> like this: >> >> # Device Mountpoint FStype Options Dump Pass# >> /dev/ufs/root / ufs rw 1 1 >> /dev/ada0s3b none swap sw 0 0 >> /dev/ufs/var /var ufs rw 2 2 >> /dev/ufs/usr /usr ufs rw 2 2 >> proc /proc procfs rw 0 0 >> >> As is plain to see, my machine boots from an MBR drive (in this case an >> SSD). Note the swap drive however. I have not found a way so far to label >> the swap partition in a way that I can make the system find it at boot time. >> >> Is there a way to do this and if so, then how? > With "glabel label" - you cannot use a UFS label (like for > the partitions shown in your /etc/fstab) because swap does > not have a file system, but you can use gpart to attach a > label to the partition itself. It could be "/dev/label/swap" > (note: not "/dev/ufs/swap" for mentioned reasons). > > More information here: > > http://www.wonkity.com/~wblock/docs/html/disksetup.html#_the_old_standard_mbr > Well, glabel(8) is used to /label swap partitions. / The label will appear in //dev/label when drive is detected. /