From owner-freebsd-questions@FreeBSD.ORG Fri Dec 5 23:51:11 2014 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 CF503CF9 for ; Fri, 5 Dec 2014 23:51:11 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CD3EAE0 for ; Fri, 5 Dec 2014 23:51:11 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xx2eM-00089z-Sf for freebsd-questions@freebsd.org; Sat, 06 Dec 2014 00:51:02 +0100 Received: from p4fddc314.dip0.t-ipconnect.de ([79.221.195.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Dec 2014 00:51:02 +0100 Received: from christian.baer by p4fddc314.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Dec 2014 00:51:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Christian Baer Subject: Mounting swap without device name Date: Sat, 06 Dec 2014 00:50:50 +0100 Lines: 22 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p4fddc314.dip0.t-ipconnect.de User-Agent: KNode/4.14.2 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: Fri, 05 Dec 2014 23:51:11 -0000 Good evening, dear readers! :-) 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? Best regards, Chris