From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OETHv-0005z8-5x for mharc-grub-devel@gnu.org; Tue, 18 May 2010 16:21:15 -0400 Received: from [140.186.70.92] (port=54389 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OETHa-0005HI-FI for grub-devel@gnu.org; Tue, 18 May 2010 16:21:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OETHP-0002Yo-Rv for grub-devel@gnu.org; Tue, 18 May 2010 16:20:45 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:49054) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OETHP-0002YW-EV for grub-devel@gnu.org; Tue, 18 May 2010 16:20:43 -0400 Received: by ewy8 with SMTP id 8so1846910ewy.8 for ; Tue, 18 May 2010 13:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=tEqgIvcZwHKOpFJ2lsjiMs4yQmFWwO5PvAy0pC7/1Lo=; b=gM4cWMxVLXPce77h+GuWtV50bH+rRIE69IitPlEGLJQGBp201OLzIcT2jm/7pIRiGO /wXQL6FHtELRJD9md0hi49WULFJUlRDnzMGaP9TmjnCh2RG6J/bAhtXabAiFUhB4QuE5 UGu6pXC0UtBtU2X0LEZaXSemLnlqGrK/HgDhc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=kBKjU2wHgCnwkOFIrW7dx+lCWgxR7WitidAj9aMW96WVMd7LqPNh77UK7j80rfpcrG CemjMisv0tJVs3haTh/czwjGWDzzCJEK/RdauhNSvWaDIa6S3lTmythOs+JP7M19jDsG loyfLbQaivljK02mj3Uu/TqH892UDSnj0IE6E= Received: by 10.213.55.9 with SMTP id s9mr3020362ebg.58.1274214042192; Tue, 18 May 2010 13:20:42 -0700 (PDT) Received: from debian.bg45.phnet (gprs31.swisscom-mobile.ch [193.247.250.31]) by mx.google.com with ESMTPS id 13sm3242627ewy.9.2010.05.18.13.20.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 18 May 2010 13:20:41 -0700 (PDT) Message-ID: <4BF2F68E.8090906@gmail.com> Date: Tue, 18 May 2010 22:20:30 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <4BF2DE4F.7070209@gmail.com> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig8CE5720034EA747A2860D34A" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Are BSD partitions not supported? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 20:21:12 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8CE5720034EA747A2860D34A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable C. P. Ghost wrote: > 2010/5/18 Vladimir '=CF=86-coder/phcoder' Serbinenko : > =20 >> C. P. Ghost wrote: >> =20 >>> On Sun, May 16, 2010 at 6:24 PM, C. P. Ghost wro= te: >>> >>> =20 >>>> is support for BSD partitions (or maybe ufs2) broken in grub2 (1.98)= ? >>>> >>>> =20 >>> No replies so far? Could a developer *please* have a closer look >>> at this? >>> >>> >>> =20 >> Your mail is quite long and looks like a tech support request. If it i= s >> such it's not right mailing list. Use help-grub@gnu.org or IRC. If it'= s >> a bug report please supply an image file which triggers bug. >> BSD partitions are supported as long as part_msdos and part_bsd (not >> necessary in release) are loaded. >> =20 > > (2nd try, mailer swallowed the attachment) > > Thank you for replying. > > Of course, it is a bug report. The steps to create the image are > very detailed and should be enough to reproduce the bug on a > FreeBSD/amd64 system. > > Here's a 362k 7z-compressed image of a 25MB disk > that contains one slice 's1' with a BSD partition 'a' and > a UFS2 filesystem on it: > > http://www.cordula.ws/tempdir/bsddisk.7z > > Don't expect it to boot, because grub-install wasn't able > to complete the task (grub-probe failed as in the long mail). > The file system contains the /boot/grub/* files though: those > were properly installed by grub-install. Just not the MBR. > > If I can provide more help, please do ask. :) > > =20 This bsdlabel has 2 strangenesses. First one is seen in your log: a: 497936 16 unused 0 0 In other words for some strange reason it's declared as unused entry slot= =2E Second one is that offsets are stored relative to host partition, not rel= ative to disk start. While the first can be easily fixed by checking leng= th instead of type, second one isproblematic since it would break all oth= er images (I've checked with FreeBSD andNetBSD images I had under my hand= ). So we need areliable way to determine which way is used. I found few d= iffering bytes between your image and my FreeBSD image (specifically byte= s 0x(80)30-0x(80)3f) but nothing that would allow a reliable detection. I= f you can find out the reason and a way of detecting this diskrepancy it = will help =3D=3D=3D modified file 'partmap/bsdlabel.c' --- partmap/bsdlabel.c 2010-03-26 14:44:13 +0000 +++ partmap/bsdlabel.c 2010-05-18 20:00:06 +0000 @@ -64,11 +72,13 @@ bsdlabel_partition_map_iterate (grub_dis if (grub_disk_read (disk, p.offset, p.index, sizeof (be), &be)) return grub_errno; =20 - p.start =3D grub_le_to_cpu32 (be.offset) - delta; + p.start =3D grub_le_to_cpu32 (be.offset);// - delta; p.len =3D grub_le_to_cpu32 (be.size); p.partmap =3D &grub_bsdlabel_partition_map; =20 - if (be.fs_type !=3D GRUB_PC_PARTITION_BSD_TYPE_UNUSED) + grub_dprintf ("bsdlabel", "%d, %d, %d\n", be.offset, be.size, be.fs_type); + + if (p.len !=3D 0) if (hook (disk, &p)) return grub_errno; =20 >>> TIA, >>> -cpghost. >>> =20 >> -- >> Regards >> Vladimir '=CF=86-coder/phcoder' Serbinenko >> =20 > > -cpghost. > > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig8CE5720034EA747A2860D34A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAkvy9pQACgkQNak7dOguQgn/cAD/Vd87RIvLeNuape3VtVYz8wkM SH1p15z/jrtRXORHnYkA/3z3LWRcIVnl66zURqxMJ7zsW3qKPOEoH/64dUHRTrEL =MS5Y -----END PGP SIGNATURE----- --------------enig8CE5720034EA747A2860D34A--