From owner-freebsd-questions@FreeBSD.ORG Thu Oct 30 13:36:31 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 068F010656A6; Thu, 30 Oct 2008 13:36:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4D26A8FC16; Thu, 30 Oct 2008 13:36:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9UDaGYl048207; Thu, 30 Oct 2008 09:36:23 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Franck Date: Thu, 30 Oct 2008 09:36:04 -0400 User-Agent: KMail/1.9.7 References: <49059437.4000700@free.fr> <200810291754.07992.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200810300936.05232.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 30 Oct 2008 09:36:23 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8541/Wed Oct 29 22:54:28 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: questions@freebsd.org, marcel@freebsd.org Subject: Re: GPT Support on Freebsd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 13:36:31 -0000 On Wednesday 29 October 2008 06:20:15 pm Franck wrote: > 2008/10/29 John Baldwin : > > On Wednesday 29 October 2008 05:39:27 pm Franck wrote: > >> Hi, > >> > >> Thank you for help. I provide you the maximum information about my > > partitions. > >> > >> Before, I watch the kernel configuration. When I fetch the kernel > >> sources, I can see 2 differents configuration files : DEFAULTS and > >> GENERIC. and the line : "options GEOM_PART_GPT" is present > >> only in GENERIC. If I use my knowledge in linux systems, I would say > >> that my actual kernel was compiled with the DEFAULTS conf, which > >> doesn't enable the support of GPT for GEOM. Maybe I'm wrong, my knew > >> kernel is compiling... > > > > The install kernel from the CD is GENERIC. So only if you've built a=20 custom >=20 > I apologize, I didn't watch in the handbook for this >=20 > > kernel would you not have GPT support. It seems that the kernel does= =20 find > > the GPT table, but gets confused by it. Can you get the output of 'fdi= sk > > ad0' and 'gpt show ad0'? > fdisk ad0 : >=20 > ******* Working on device /dev/ad0 ******* > parameters extracted from in-core disklabel are: > cylinders=3D387621 heads=3D16 sectors/track=3D63 (1008 blks/cyl) >=20 > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=3D387621 heads=3D16 sectors/track=3D63 (1008 blks/cyl) >=20 > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 238 (0xee),(EFI GPT) > start 1, size 409639 (200 Meg), flag 0 > beg: cyl 1023/ head 254/ sector 63; > end: cyl 1023/ head 254/ sector 63 > The data for partition 2 is: > sysid 175 (0xaf),(HFS+) > start 409640, size 37486592 (18304 Meg), flag 0 > beg: cyl 1023/ head 254/ sector 63; > end: cyl 1023/ head 254/ sector 63 > The data for partition 3 is: > sysid 131 (0x83),(Linux native) > start 37897335, size 401625 (196 Meg), flag 80 (active) > beg: cyl 1023/ head 254/ sector 63; > end: cyl 1023/ head 254/ sector 63 > The data for partition 4 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 38298960, size 38908800 (18998 Meg), flag 0 > beg: cyl 107/ head 0/ sector 1; > end: cyl 818/ head 15/ sector 63 Ok, so it's not a PMBR. My understanding is that a GPT requires the MBR to= be=20 a PMBR (only one partition in the 4th slot with a special type of 0xee that= =20 covers the whole disk). What this box is doing is trying to make the MBR=20 match the first 4 partitions in the GPT. I'm not sure if you will be able = to=20 get FreeBSD's GPT stuff to recognize that reliably. Marcel (cc'd) might ha= ve=20 some ideas. If you can get FreeBSD's GPT support to handle this disk it wi= ll=20 mean that you will have to use only GPT device names (so /dev/ad0p4a instea= d=20 of /dev/ad0s4a). You will also need to make sure the GPT partition for=20 =46reeBSD has the right UUID since your partition contains a BSD label. > [Dante@iris-bsd ~]$ sudo gpt show ad0 > gpt show: unable to open device 'ad0': Operation not permitted >=20 >=20 > >Normally with GPT you don't put a BSD label inside > > a GPT partition, so you wouldn't have /dev/ad0p4a, but instead would us= e a > > separate GPT partition for each filesystem/swap/etc. The fstab from my > > laptop (not a macbook) looks like this: > > > > # Device Mountpoint FStype Options Dump = =20 Pass# > > /dev/ad0p3 none swap sw 0 = 0 > > /dev/ad0p2 / ufs rw 1 = 1 > > /dev/ad0p5 /tmp ufs rw 2 = 2 > > /dev/ad0p6 /usr ufs rw 2 = 2 > > /dev/ad0p4 /var ufs rw 2 = 2 > > /dev/acd0 /cdrom cd9660 ro,noauto 0 = 0 > > > > Are you booting using boot camp or parallels or some such? >=20 > Yes, I think It's the problem. Actually I have a Leopard Mac OS X > System. And it seems to automatically switch on the "bootcamp feature" > when I tried to install pcbsd. That's weird because I haven't any > problems to see the gpt table when I boot from a ubuntu cd for > example. If I well remember, I was obliged to install pcbsd in one of > the four first parititions. I'll reboot on the pcbsd cd to see if I > can access to all the partitions. >=20 > I realize that's must be efi/refit/bootcamp which mess up all. And I > don't how to fix that. >=20 > Thank you, >=20 > Franck >=20 > > > >> On Freebsd : > >> > >> [Dante@iris-bsd /usr/home/Dante]$ ls /dev/|grep ^ad > >> ad0 > >> ad0s2 > >> ad0s3 > >> ad0s4 > >> ad0s4a > >> ad0s4b > >> ad0s4c > >> > >> my dmesg : > >> http://pastebin.com/m7b5f130e > >> > >> On Gentoo : > >> > >> dante@iris:~ % LANG=3DC sudo parted /dev/sda > >> GNU Parted 1.8.8 > >> Using /dev/sda > >> Welcome to GNU Parted! Type 'help' to view a list of commands. > >> (parted) p > >> Model: ATA ST9200420ASG (scsi) > >> Disk /dev/sda: 200GB > >> Sector size (logical/physical): 512B/512B > >> Partition Table: gpt > >> > >> Number Start End Size File system Name Fla= gs > >> 1 20.5kB 210MB 210MB fat32 EFI System Partition boot > >> 2 210MB 19.4GB 19.2GB hfs+ MacOSX > >> 3 19.4GB 19.6GB 206MB ext2 > >> 4 19.6GB 39.5GB 19.9GB > >> 6 39.5GB 42.7GB 3142MB linux-swap > >> 5 42.7GB 58.4GB 15.7GB ext3 Gentoo > >> 7 58.4GB 74.1GB 15.7GB ext3 > >> 9 89.9GB 200GB 110GB ext3 > >> > >> The 4 is my ufs partition. UFS is not recognize on my gentoo system. > >> The partition 7 is my home, the one that I want to mount under > >> freebsd. > >> > >> Again, thank you for your help > >> > >> Franck > >> > >> 2008/10/29 John Baldwin : > >> > On Wednesday 29 October 2008 11:52:19 am Franck Royer wrote: > >> >> John Baldwin a =E9crit : > >> >> > On Wednesday 29 October 2008 07:42:18 am Lowell Gilbert wrote: > >> >> > > >> >> >> Franck Royer writes: > >> >> >> > >> >> >> > >> >> >>> Can I oblige pcbsd to look the gpt table instead of the msdos=20 one ? > > How > >> >> >>> can I access to my fifth partition ? > >> >> >>> > >> >> >> John Baldwin (jhb) has been working on GPT support, but it's sti= ll > >> >> >> reported to be a work in progress. It works as far as recognizing > >> >> >> disks over 16TB. It also gets picked up by the geom framework. = =20 I'm > >> >> >> not sure about booting, although there are tantalizing hints in = the > >> >> >> manual pages. > >> >> >> > >> >> > > >> >> > GPT booting works just fine on 6.x and later. Using the gpt(8)=20 utility > >> > you > >> >> > basically do: > >> >> > > >> >> > # gpt create foo0 > >> >> > # gpt boot foo0 > >> >> > > >> >> > The second command creates a special boot partition in /dev/foo0p= 1. > > You > >> > can > >> >> > then add partitions: > >> >> > > >> >> > # gpt add -t ufs foo0 > >> >> > # newfs /dev/foo0p2 > >> >> > > >> >> > gpart(8) in HEAD works similarly. The one thing lacking is that > >> >> > sysinstall/libdisk doesn't handle GPT, so there isn't a nice way = to=20 do > > it > >> >> > during installation. > >> >> > > >> >> > > >> >> Ok thank you. But actually, it's not what I'm looking for. > >> >> > >> >> I use freebsd on a macbook. On this macbook, I already have a gpt, > >> >> refit, mac os x and some linux partitions. The problem is freebsd,= =20 which > >> >> doesn't recognize partitions after the fourth one (but my gentoo li= nux > >> >> see them). > >> >> > >> >> Then, I suppose freebsd use the mbr partition table (synchronized f= rom > >> >> the gpt one using refit) to populate the /dev, but partitions after= =20 the > >> >> fourth, which are those I want to use, are only indexed in the gpt. > >> >> > >> >> Finally, I want to force freebsd to use the gpt on my hard drive to > >> >> allow it to see others partitions. > >> >> > >> >> I don't want to destroy my actual gpt, maybe one day, but no right= =20 now. > >> >> > >> >> Tell me if my english is too bad to be understood. > >> >> > >> >> I just want to precise that I use pcvbsd 7.0, so the kernel > >> >> configuration might be different than the freebsd generic one. > >> > > >> > What device entries do you see in /dev? > >> > > >> > -- > >> > John Baldwin > >> > > >> > >> > >> > >> -- > >> Franck Royer > >> > >> Student of Manchester University > >> Etudiant Ing=E9nieur de l'ENSIIE (Ecole Nationale Sup=E9rieure > >> d'Informatique pour l'Industrie et l'Entreprise) > >> > >> e-mail/jabber: royer.franck@gmail.com > >> > > > > > > > > -- > > John Baldwin > > >=20 >=20 >=20 > --=20 > Franck Royer >=20 > Student of Manchester University > Etudiant Ing=E9nieur de l'ENSIIE (Ecole Nationale Sup=E9rieure > d'Informatique pour l'Industrie et l'Entreprise) >=20 > e-mail/jabber: royer.franck@gmail.com >=20 =2D-=20 John Baldwin