From owner-freebsd-questions@FreeBSD.ORG Tue Jan 21 07:36:48 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 573E81B9 for ; Tue, 21 Jan 2014 07:36:48 +0000 (UTC) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A40A1CAC for ; Tue, 21 Jan 2014 07:36:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id s0L7aKuq080740; Tue, 21 Jan 2014 18:36:20 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 21 Jan 2014 18:36:20 +1100 (EST) From: Ian Smith To: Polytropon Subject: Re: FreeBSD and Linux shared installation In-Reply-To: Message-ID: <20140121172736.A25136@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Olivier Nicole , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jan 2014 07:36:48 -0000 In freebsd-questions Digest, Vol 503, Issue 1, Message: 28 On Tue, 21 Jan 2014 06:04:05 +0100 Polytropon wrote: > For educational and experimental purposes, I'd like to install > FreeBSD along with two Linusi on a laptop. It has a 100 GB SATA > disk which should be sufficient. So I'm searching for important > advice and mentioning of pitfalls that I should avoid. I'm > planning to use FreeBSD 10.0, Kali Linux and Mageia. Here are > some problems or considerations I expect to be facing: > > Partitioning: Does Linux support GPT, or should I better keep > using MBR? FreeBSD would get one slice, "DOS primary partition", > a common data exchange partition another one, and the Linusi > could do their stuff on "logical drives inside a DOS extended > partition", as it seems to be common over there. I've been waiting for 'someone' to do a GPT version of boot0 for a few years, as otherwise even if all the OS you want to multiboot handle GPT, you're forced to go with GRUB or some other? non-base boot loader. So meanwhile, the hard work of stuffing boot0 into the 512 bytes of the MBR has been done and very well documented, and it's never let me down. I've never (since OS/2 anyway) tried using the extended partition for bootable OSes but since the code caters for it and Olivier and others have reported it working, I'll assume it does :) > Boot manager: Can the FreeBSD boot manager (which I prefer because > it's simple and sufficient) recognize and distinguish the two > Linusi? Is there an easy way to modify its source so the display > is more obvious, e. g. > > F1 FreeBSD > F2 Kali > F3 Mageia > > Default: F1 > > instead of > > F1 FreeBSD > F2 Linux > F3 Linux > > Default: F1 > > which I assume would be the default? I have already briefly checked > the source at /usr/src/sys/boot/i386/boot0/boot0ext.S which doesn't > seem to have a more specific differentiation, but maybe a "custom > hack" could be used to disguise one of the Linusi at something else? The short answer is 'no way'. For one thing, boot0ext.S is a whopping 1KB program with likely some scope for mods if you're sharp with x86 assember, but it's never made, only boot0 and boot0sio appear in /boot and Makefile makes no mention .. I assume it's 'historical reference'. As boot0.S points out, many hacky tricks have been used to squeeze it into the MBR and there's next to no scope for any additional code. > Swap: Can the two Linusi share the same swap partition? And > furthoermore, could FreeBSD also use that one? Note that the > different systems are not running at the same time, so it would > be nonsense to waste disk space for three "dedicated" swap > partitions when one is sufficient. Can't see any problem with that, based on (limited) Debian experience. > Shared data partition: I'm not searching for blazing performance, > so I do not require the most recent ext10fs or RiceFat here. > The goal should be that this partition can be adressed from all > the operating systems. It doesn't have to be /home, instead it > will be mounted separately, but rw. Regarding FreeBSD, it would > nice to not require fuse here (base OS tools preferred). EXT2 or 3 should be no problem, but I'm not up to date (esp wrt FUSE). My older Win{98,XP,2K} plus FreeBSD laptops - not that I've booted 'doze for years now - have used msdosfs for shared data, of course before the FreeBSD partition/s to keep it simple for stupid, and Linux doesn't mind. Despite being slow, inefficient and trashing fine permissions and timestamps, everything handles it. I also use it for shared space on memsticks, to readily share some files between DOS, Linux and Mac boxes. > My initial partitioning and sizing idea: > > Partition OS, subpart. Size Device (slice, partition) > -------------- -------------- ------ --------------------------- > > Prim. #1 FreeBSD 55 GB /dev/ada0s1{a,d,e,f,g} > a / 1 GB > d /tmp 2 GB > e /var 2 GB I'd likely go 4GB for /var, but it depends a lot on your usage. > f /usr 15 GB > g /home 35 GB Should be good. I tend to disagree with Olivier about not having a separate /home, and I recall you also being a fan of dump/restore, something else rendered far less useful with 'everything in /', though I understand the utility of that approach in (increasingly common) VMs. > Prim. #2 swap 5 GB /dev/ada0s2(b?), /dev/sda2 The (b?) would imply a bsdlabel, which would get clobbered by Linux. > Prim. #3 common data 10 GB /dev/adas3, /dev/sda3 > > Extend. #1 > log. dr. #1 Kali Linux 15 GB /dev/sda5 > log. dr. #2 Mageia Linux 15 GB /dev/sda6 >From FreeBSD accessing my old OS/2 partitions I seem to recall that /dev/ada0s5 is the ext drive itself, and within would be ada0s6 and s7, though the above nomenclature would be right from Linux' POV. > Would something like this work, or is there a better approach? Should be a goer .. modulo remembering which Linux is which :) cheers, Ian