From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Q3FFU-0003QR-Rw for mharc-grub-devel@gnu.org; Fri, 25 Mar 2011 18:12:52 -0400 Received: from [140.186.70.92] (port=46789 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q3FFR-0003LS-0i for grub-devel@gnu.org; Fri, 25 Mar 2011 18:12:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q3FFQ-0001ny-18 for grub-devel@gnu.org; Fri, 25 Mar 2011 18:12:48 -0400 Received: from ausxippc101.us.dell.com ([143.166.85.207]:52359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q3FFP-0001ni-S9 for grub-devel@gnu.org; Fri, 25 Mar 2011 18:12:47 -0400 X-Loopcount0: from 10.9.160.253 Message-ID: <4D8D1397.5030802@dell.com> Date: Fri, 25 Mar 2011 17:13:43 -0500 From: Mario Limonciello Organization: Dell Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: grub-devel@gnu.org X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigAC5DB0C3CABD1B9C1B775006" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 143.166.85.207 Cc: phcoder@gmail.com, Colin Watson Subject: [PATCH] grub-setup Modify the conditionality of the copy of the partition table 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: Fri, 25 Mar 2011 22:12:51 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAC5DB0C3CABD1B9C1B775006 Content-Type: multipart/mixed; boundary="------------050507050809070105020906" This is a multi-part message in MIME format. --------------050507050809070105020906 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi: I've discovered that in snapshots of GRUB2 in Ubuntu natty, you are no lo= nger able to install GRUB2 to a partition and successfully boot on certai= n Dell E-series Latitudes. This is a regression from the GRUB2 that was = included in Ubuntu maverick. The BIOS makes an assertion based on the co= ntent of the partition table section of the PBR and content that doesn't = resemble a partition table will cause the the BIOS to get stuck in a loop= and never complete POST. I've identified the changeset that caused this to be r2751. I've created= a patch that modifies the conditionality of the partition table copy to = not check for a partition table, but instead to verify it's not operating= on a floppy disk. This restores the previous behavior when installing t= o a partition, and still allows the new behavior for floppy disk installa= tions. Thanks, --=20 *Mario Limonciello* Linux Engineer *Dell* | OS Engineering --------------050507050809070105020906 Content-Type: text/x-diff; name="always_copy_partition_table.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="always_copy_partition_table.patch" =3D=3D=3D modified file 'ChangeLog' --- ChangeLog 2011-03-23 19:29:17 +0000 +++ ChangeLog 2011-03-25 21:56:23 +0000 @@ -1,3 +1,11 @@ +2011-03-24 Mario Limonciello + * util/grub-setup.c: Conditionalize the partition map copy on fl= oppy + support, not on whether the target contains partitions. + + Otherwise, the BIOS on Dell Latitude E series laptops will fre= eze=20 + during POST if an invalid partition table is contained in the = PBR + of the active partition when GRUB is installed to a partition.= + 2011-03-23 Vladimir Serbinenko =20 * grub-core/term/gfxterm.c (calculate_normal_character_width): Return 8= =3D=3D=3D modified file 'util/grub-setup.c' --- util/grub-setup.c 2011-01-07 12:27:34 +0000 +++ util/grub-setup.c 2011-03-25 21:51:56 +0000 @@ -399,25 +399,25 @@ } #endif =20 - if (! dest_partmap) - { - grub_util_warn (_("Attempting to install GRUB to a partitionless disk o= r to a partition. This is a BAD idea.")); - goto unable_to_embed; - } - if (multiple_partmaps || fs) - { - grub_util_warn (_("Attempting to install GRUB to a disk with multiple p= artition labels or both partition label and filesystem. This is not supp= orted yet.")); - goto unable_to_embed; - } - /* Copy the partition table. */ - if (dest_partmap) + if (!allow_floppy || !grub_util_biosdisk_is_floppy (dest_dev->disk))= memcpy (boot_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC, tmp_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC, GRUB_BOOT_MACHINE_PART_END - GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC);= =20 free (tmp_img); =20 + if (! dest_partmap) + { + grub_util_warn (_("Attempting to install GRUB to a partitionless disk o= r to a partition. This is a BAD idea.")); + goto unable_to_embed; + } + if (multiple_partmaps || fs) + { + grub_util_warn (_("Attempting to install GRUB to a disk with multiple p= artition labels or both partition label and filesystem. This is not supp= orted yet.")); + goto unable_to_embed; + } + if (!dest_partmap->embed) { grub_util_warn ("Partition style '%s' doesn't support embeding", --------------050507050809070105020906-- --------------enigAC5DB0C3CABD1B9C1B775006 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/ iEYEARECAAYFAk2NE5oACgkQ2CrZjkA73YvKwgCeK8gsB39iBnvI2e4aNCSOtw+F Z84AoJphctPW8mhP3NoZInQocZ8sfmLb =8ViT -----END PGP SIGNATURE----- --------------enigAC5DB0C3CABD1B9C1B775006--