cvs commit: src/lib/libstand Makefile src/sbin/gpt Makefile add.c boot.c gpt.8 gpt.c gpt.h show.c src/sys/boot/i386 Makefile src/sys/boot/i386/gptboot Makefile gptboot.c gptldr.S src/sys/boot/i386/libi386 biosdisk.c devicename.c ...

Niki Denev nike_d at cytexbg.com
Tue Jan 29 16:46:14 PST 2008


On Jan 24, 2008 9:42 PM, John Baldwin <jhb at freebsd.org> wrote:
> jhb         2008-01-24 19:42:17 UTC
>
>  FreeBSD src repository
>
>  Modified files:        (Branch: RELENG_7)
>    lib/libstand         Makefile
>    sbin/gpt             Makefile add.c gpt.8 gpt.c gpt.h show.c
>    sys/boot/i386        Makefile
>    sys/boot/i386/libi386 biosdisk.c devicename.c
>    sys/boot/pc98/libpc98 biosdisk.c
>    sys/geom/part        g_part.c g_part.h g_part_gpt.c
>    sys/sys              gpt.h
>  Added files:           (Branch: RELENG_7)
>    sbin/gpt             boot.c
>    sys/boot/i386/gptboot Makefile gptboot.c gptldr.S
>    sys/boot/i386/pmbr   Makefile pmbr.s
>  Log:
>  MFC: Add support for booting from GPT-labeled disks from the BIOS.  This
>  includes /boot/pmbr, /boot/gptboot, and 'gpt boot'.

Thanks! Works perfectly here!

I believe only this little patch is needed for gpt to behave as
advertised in the manual page.
( to be able to "add" gpt partitions of type "boot" )

--- sbin/gpt/gpt.c.orig 2008-01-30 02:05:44.000000000 +0200
+++ sbin/gpt/gpt.c      2008-01-30 02:07:21.000000000 +0200
@@ -268,6 +268,12 @@
                return (0);

        switch (*s) {
+       case 'b':
+               if (strcmp(s, "boot") == 0) {
+                       uuid_t boot = GPT_ENT_TYPE_FREEBSD_BOOT;
+                       *uuid = boot;
+                       return (0);
+               }
        case 'e':
                if (strcmp(s, "efi") == 0) {
                        uuid_t efi = GPT_ENT_TYPE_EFI;


More information about the cvs-src mailing list