From owner-freebsd-current@FreeBSD.ORG Fri Jun 21 15:07:34 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 82BEC460 for ; Fri, 21 Jun 2013 15:07:34 +0000 (UTC) (envelope-from genre.roger@orange.fr) Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by mx1.freebsd.org (Postfix) with ESMTP id 082C61489 for ; Fri, 21 Jun 2013 15:07:33 +0000 (UTC) Received: from [192.168.1.10] ([90.25.182.247]) by mwinf5d43 with ME id r37R1l00R5LgJSa0337SPQ; Fri, 21 Jun 2013 17:07:26 +0200 Message-ID: <51C46C84.3070003@orange.fr> Date: Fri, 21 Jun 2013 17:08:52 +0200 From: Genre Roger User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: gpart: can not add MBR partitions with "gpart add -t, mbr" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 15:07:34 -0000 Hi, When I refer to gpart(8) manpage (9.1 release, updated jan 25,2013), I find the description of partition types a bit confusing. Considering the case of a MoBo with "old way" Bios (non UEFI), the only scheme allowed to get a bootable system is MBR. (Note that after booting, your OS is able to manage gpt-scheme on different providers.) Then, if you speak "bsd-ish", you are able to add on the "MBR"-scheme provider up to 4 "freebsd-type" slices, each of them containing up to 8 partitions with a BSD filesystem (or swap space). Or, if you speak "msdos-ish", you would be able to add on the "MBR" provider up to 4 "msdos-type" partitions (or 3 + 1 extended ), each of them containing one filesystem. The manpage does'nt list explicitly the type for this second case; Oliver try to use "mbr", decribed as "A partition that is sub-partitioned by a Master Boot Record (MBR). This type is known as "!024dee41-33e7-11d3-9d69-0008c781f39f " by GPT.". Such definition is'nt very explicit. Let me show the example below on my provider ada0 : > $ gpart show > => 63 976773105 ada0 MBR (465G) > 63 136314864 1 freebsd [active] (65G) > 136314927 840458241 - free - (400G) > > => 0 136314864 ada0s1 BSD (65G) > 0 8388608 1 freebsd-ufs (4.0G) > 8388608 16777216 2 freebsd-swap (8.0G) > 25165824 16777216 4 freebsd-ufs (8.0G) > 41943040 8388608 5 freebsd-ufs (4.0G) > 50331648 85983215 6 freebsd-ufs (41G) > 136314863 1 - free - (512B) > > $ sudo gpart add -t mbr -i 2 -s 8G ada0 > Password: > gpart: Invalid argument > > $ sudo gpart add -t \!12 -i 2 -s 8G ada0 > ada0s2 added > $ > $ sudo newfs_msdos ada0s2 > /dev/ada0s2: 16773056 sectors in 262079 FAT32 clusters (32768 > bytes/cluster) > BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 > SecPerTrack=63 Heads=16 HiddenSecs=0 HugeSectors=16777215 FATsecs=2048 > RootCluster=2 FSInfo=1 Backup=2 > $ sudo gpart add -t freebsd -i 3 -s 8G ada0 > ada0s3 added > $ gpart show ada0 > => 63 976773105 ada0 MBR (465G) > 63 136314864 1 freebsd [active] (65G) > 136314927 16777215 2 !12 (8G) > 153092142 16777215 3 freebsd (8G) > 169869357 806903811 - free - (384G) > $ sudo newfs_msdos ada0s3 > /dev/ada0s3: 16773056 sectors in 262079 FAT32 clusters (32768 > bytes/cluster) > BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 > SecPerTrack=63 Heads=16 HiddenSecs=0 HugeSectors=16777215 FATsecs=2048 > RootCluster=2 FSInfo=1 Backup=2 > $ this example show that, if you want a "msdos" or "fat32" partition, both the type "\!12" or "freebsd" allows you to create a partition where you could install a msdos filesystem (but the "mbr" does not). Such behaviour is not surprising, (using freebsd-type to format as msdos means you don't use the space allowed for labeling); but what is really the purpose of the listed "mbr"-type in the gpart(8) manpage? Cheers Roger