From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PCQNh-0001Eq-Ci for mharc-grub-devel@gnu.org; Sun, 31 Oct 2010 01:23:01 -0400 Received: from [140.186.70.92] (port=47685 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCQNd-0001Ec-Kw for grub-devel@gnu.org; Sun, 31 Oct 2010 01:22:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCQNc-0000ih-1Y for grub-devel@gnu.org; Sun, 31 Oct 2010 01:22:57 -0400 Received: from 24-176-175-198.static.snlo.ca.charter.com ([24.176.175.198]:30842 helo=thinking.kicks-ass.org) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PCQNb-0000i8-NI for grub-devel@gnu.org; Sun, 31 Oct 2010 01:22:56 -0400 Received: (qmail 33431 invoked by uid 98); 30 Oct 2010 22:22:51 -0700 Received: from pool-71-102-229-43.snloca.dsl-w.verizon.net by thinking.kicks-ass.org (envelope-from , uid 98) with qmail-scanner-2.08st (clamdscan: 0.96/10751. f-prot: 6.2.1/4.4.2.54. spamassassin: 3.3.1. perlscan: 2.08st. Clear:RC:0(71.102.229.43):SA:0(-1.0/5.0):. Processed in 3.703611 secs); 31 Oct 2010 05:22:51 -0000 X-Qmail-Scanner-Mail-From: rick@sloservers.com via thinking.kicks-ass.org X-Qmail-Scanner: 2.08st (Clear:RC:0(71.102.229.43):SA:0(-1.0/5.0):. Processed in 3.703611 secs Process 33407) Received: from pool-71-102-229-43.snloca.dsl-w.verizon.net (HELO [192.168.1.198]) (71.102.229.43) (smtp-auth username rick@sloservers.com, mechanism plain) by thinking.kicks-ass.org (qpsmtpd/0.83) with (CAMELLIA256-SHA encrypted) ESMTPSA; Sat, 30 Oct 2010 22:22:48 -0700 Message-ID: <4CCCFD24.80401@sloservers.com> Date: Sat, 30 Oct 2010 22:22:44 -0700 From: Rick User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: grub-devel@gnu.org X-Enigmail-Version: 1.1.1 Content-Type: multipart/mixed; boundary="------------020903080408060409070601" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: Support for solaris and freebsd GPT partition types 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: Sun, 31 Oct 2010 05:22:59 -0000 This is a multi-part message in MIME format. --------------020903080408060409070601 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello, A while back, I tried installing GRUB on a FreeBSD GPT system. GRUB only installs to bios-boot partitions and while I could have changed the freebsd-boot partition type on my system, I wanted GRUB to recognize freebsd-boot partition types instead. I made some simple patches to allow GRUB to install to freebsd-boot and solaris-boot partition types. I've attached the patches if somebody wants to merge them in (or tell me why this is a bad idea) :) -Rick --------------020903080408060409070601 Content-Type: text/plain; name="patch-include-grub-gpt_partition.h" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-include-grub-gpt_partition.h" --- include/grub/gpt_partition.h.orig 2010-03-06 12:51:37.000000000 -0800 +++ include/grub/gpt_partition.h 2010-10-10 02:57:26.000000000 -0700 @@ -40,6 +40,17 @@ { 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \ } +#define GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT \ + { grub_cpu_to_le32 (0x83BD6B9D), grub_cpu_to_le16 (0x7F41), grub_cpu_to_le16 (0x11DC), \ + { 0xBE, 0x0B, 0x00, 0x15, 0x60, 0xB8, 0x4F, 0x0F } \ + } + +#define GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT \ + { grub_cpu_to_le32 (0x6A82CB45), grub_cpu_to_le16 (0x1DD2), grub_cpu_to_le16 (0x11B2), \ + { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } \ + } + + struct grub_gpt_header { grub_uint8_t magic[8]; --------------020903080408060409070601 Content-Type: text/plain; name="patch-util-i386-pc-grub-setup.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-util-i386-pc-grub-setup.c" --- util/i386/pc/grub-setup.c.orig 2010-03-06 12:51:37.000000000 -0800 +++ util/i386/pc/grub-setup.c 2010-10-10 02:56:55.000000000 -0700 @@ -38,7 +38,8 @@ #include static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT; - +static const grub_gpt_part_type_t grub_gpt_partition_type_freebsd_boot = GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT; +static const grub_gpt_part_type_t grub_gpt_partition_type_solaris_boot = GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT; #include #include @@ -138,7 +139,9 @@ struct grub_gpt_partentry *gptdata = p->data; /* If there's an embed region, it is in a dedicated partition. */ - if (! memcmp (&gptdata->type, &grub_gpt_partition_type_bios_boot, 16)) + if (! memcmp (&gptdata->type, &grub_gpt_partition_type_bios_boot, 16) || + ! memcmp (&gptdata->type, &grub_gpt_partition_type_freebsd_boot, 16) || + ! memcmp (&gptdata->type, &grub_gpt_partition_type_solaris_boot, 16)) { embed_region.start = p->start; embed_region.end = p->start + p->len; --------------020903080408060409070601--