From owner-freebsd-questions@FreeBSD.ORG Sun Nov 25 12:29:30 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A66E54F7 for ; Sun, 25 Nov 2012 12:29:30 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 628608FC17 for ; Sun, 25 Nov 2012 12:29:30 +0000 (UTC) Received: from r56.edvax.de (port-92-195-51-39.dynamic.qsc.de [92.195.51.39]) by mx02.qsc.de (Postfix) with ESMTP id 7763D27658 for ; Sun, 25 Nov 2012 13:29:29 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id qAPCTULg001963 for ; Sun, 25 Nov 2012 13:29:30 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sun, 25 Nov 2012 13:29:30 +0100 From: Polytropon To: freebsd-questions@freebsd.org Subject: Re: Manually partitioning using gpart Message-Id: <20121125132930.3a417be5.freebsd@edvax.de> In-Reply-To: <1353842774.2508.18.camel@q> References: <1353842774.2508.18.camel@q> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2012 12:29:30 -0000 On Sun, 25 Nov 2012 12:26:14 +0100, Ralf Mardorf wrote: > This is what I've got: > > # gpart show ada0 > => 63 625142385 ada0 MBR (298G) > 63 121274683 - free - (57G) > [snip] > > IIUC I now have to do: > > # gpart add -s 64k -t freebsd-boot -l boot0 ada0 > # gpart add -s 8G -t freebsd-swap -l swap0 ada0 > # gpart add -t freebsd-ufs -a 256k -l root0 ada0 > > Here I already don't understand how large the swap should be. Really 2 * > size of the RAM? Won't be wrong; my understanding of the rule was "2 * size of _possible_ RAM in the machine". But disk space is cheap, so 8 G should be fine. But again, the requirement for the swap partition depends on what you're doing with the machine and what you're expecting (e. g. will you want to save kernel dumps to the swap partition?). You can find an example here: http://www.wonkity.com/~wblock/docs/html/disksetup.html Also see "man newfs" for options. > I also don't know if 256k is a sane alignment value, I just copied this > from a howto. Modern disks work faster when everything is aligned to 4k. But they _work_ with any other alignment. > How to continue after this is done? You will have new partitions /dev/ada0pN. You need to format them with newfs. If I see this correctly, you have created one big / partition (for everything); this is _valid_ and possible, but may be less optimum for a couple of reasons. Doing "functional partitioning" requires at least an idea of how much disk space will be needed per functional part, and this can differ from use as server or desktop, or what kind of software you run. The advantage is that you can backup data partition-wise (using dump + restore) and have a functional base system on / in case there's a severe disk corruption. The disadvantage is that if finally one partition is "too full", you cannot easily resize them (even though this is possible). When done, add them to your /etc/fstab. You can use the labels for that instead of the device names. > I want to use GRUB from my Linux installs, this is the Linux menu.lst: > > timeout 8 > default 0 > color light-blue/black light-cyan/blue > > title FreeBSD 9.0 > root (hd0,a) > kernel /boot/loader My Linux multiboot experience is limited, but this looks okay. You will delegate boot control to the loader, hd0a = sda1 = adap1, the partition of "freebsd-boot" type. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...