From: Bastian Blank Subject: Re: PV-GRUB - Does not read partition-less disk Date: Wed, 17 Sep 2008 22:08:33 +0200 Message-ID: <20080917200833.GA13465@wavehammer.waldi.eu.org> References: <20080911231038.GA5780@wavehammer.waldi.eu.org> <20fe3cf60809111838q370a0b66pa848ea46eaef3798@mail.gmail.com> <20080912062457.GA20977@wavehammer.waldi.eu.org> <20fe3cf60809120501n29e4fc49y6f2a6075bccb8a30@mail.gmail.com> <20080912130652.GA4180@wavehammer.waldi.eu.org> <20fe3cf60809120729j41c648fep56e618c0d1838d28@mail.gmail.com> <20080912144210.GA8234@wavehammer.waldi.eu.org> <20fe3cf60809120801kdfde723hcc1b1392aa16370a@mail.gmail.com> <20080912191636.GA18956@wavehammer.waldi.eu.org> <20080912193836.GK4171@implementation> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20080912193836.GK4171@implementation> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Samuel Thibault , Marco Sinhoreli , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Fri, Sep 12, 2008 at 09:38:36PM +0200, Samuel Thibault wrote: > Bastian Blank, le Fri 12 Sep 2008 21:16:36 +0200, a =C3=A9crit : > > Anyway, I found it. It is buried in the filesystem modules of grub in > > the mount hook. > Cool, I currently don't have much time to spend on these :) Patch. Bastian diff -r 8abe082246d0 stubdom/grub.patches/50fs_fulldisk.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stubdom/grub.patches/50fs_fulldisk.diff Wed Sep 17 22:07:03 2008 +0= 200 @@ -0,0 +1,72 @@ +diff -urN grub-0.97.orig/stage2/fsys_ext2fs.c grub-0.97/stage2/fsys_ext2= fs.c +--- grub-0.97.orig/stage2/fsys_ext2fs.c 2004-08-08 18:19:18.000000000 +0= 000 ++++ grub-0.97/stage2/fsys_ext2fs.c 2008-09-16 19:31:15.000000000 +0000 +@@ -254,7 +254,7 @@ + { + int retval =3D 1; +=20 +- if ((((current_drive & 0x80) || (current_slice !=3D 0)) ++ if ((((current_slice !=3D 0)) + && (current_slice !=3D PC_SLICE_TYPE_EXT2FS) + && (current_slice !=3D PC_SLICE_TYPE_LINUX_RAID) + && (! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_EXT2FS)) +diff -urN grub-0.97.orig/stage2/fsys_fat.c grub-0.97/stage2/fsys_fat.c +--- grub-0.97.orig/stage2/fsys_fat.c 2005-03-15 16:52:00.000000000 +0000 ++++ grub-0.97/stage2/fsys_fat.c 2008-09-16 19:31:26.000000000 +0000 +@@ -70,7 +70,7 @@ + __u32 magic, first_fat; + =20 + /* Check partition type for harddisk */ +- if (((current_drive & 0x80) || (current_slice !=3D 0)) ++ if (((current_slice !=3D 0)) + && ! IS_PC_SLICE_TYPE_FAT (current_slice) + && (! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_MSDOS))) + return 0; +diff -urN grub-0.97.orig/stage2/fsys_ffs.c grub-0.97/stage2/fsys_ffs.c +--- grub-0.97.orig/stage2/fsys_ffs.c 2003-07-09 11:45:52.000000000 +0000 ++++ grub-0.97/stage2/fsys_ffs.c 2008-09-16 19:31:32.000000000 +0000 +@@ -82,7 +82,7 @@ + { + int retval =3D 1; +=20 +- if ((((current_drive & 0x80) || (current_slice !=3D 0)) ++ if ((((current_slice !=3D 0)) + && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)) + || part_length < (SBLOCK + (SBSIZE / DEV_BSIZE)) + || !devread (SBLOCK, 0, SBSIZE, (char *) SUPERBLOCK) +diff -urN grub-0.97.orig/stage2/fsys_minix.c grub-0.97/stage2/fsys_minix= .c +--- grub-0.97.orig/stage2/fsys_minix.c 2003-07-09 11:45:53.000000000 +00= 00 ++++ grub-0.97/stage2/fsys_minix.c 2008-09-16 19:32:01.000000000 +0000 +@@ -160,7 +160,7 @@ + int + minix_mount (void) + { +- if (((current_drive & 0x80) || current_slice !=3D 0) ++ if ((current_slice !=3D 0) + && ! IS_PC_SLICE_TYPE_MINIX (current_slice) + && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_OTHER)) + return 0; /* The partition is not of MINIX type */ +diff -urN grub-0.97.orig/stage2/fsys_ufs2.c grub-0.97/stage2/fsys_ufs2.c +--- grub-0.97.orig/stage2/fsys_ufs2.c 2004-06-19 12:17:52.000000000 +000= 0 ++++ grub-0.97/stage2/fsys_ufs2.c 2008-09-16 19:32:32.000000000 +0000 +@@ -87,7 +87,7 @@ + sblockloc =3D -1; + type =3D 0; + =20 +- if (! (((current_drive & 0x80) || (current_slice !=3D 0)) ++ if (! (((current_slice !=3D 0)) + && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS))) + { + for (i =3D 0; sblock_try[i] !=3D -1; ++i) +diff -urN grub-0.97.orig/stage2/fsys_vstafs.c grub-0.97/stage2/fsys_vsta= fs.c +--- grub-0.97.orig/stage2/fsys_vstafs.c 2003-07-09 11:45:53.000000000 +0= 000 ++++ grub-0.97/stage2/fsys_vstafs.c 2008-09-16 19:32:39.000000000 +0000 +@@ -47,7 +47,7 @@ + { + int retval =3D 1; + =20 +- if( (((current_drive & 0x80) || (current_slice !=3D 0)) ++ if( (((current_slice !=3D 0)) + && current_slice !=3D PC_SLICE_TYPE_VSTAFS) + || ! devread (0, 0, BLOCK_SIZE, (char *) FSYS_BUF) + || FIRST_SECTOR->fs_magic !=3D 0xDEADFACE) --=20 All your people must learn before you can reach for the stars. -- Kirk, "The Gamesters of Triskelion", stardate 3259.2