From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OyYQb-0004yv-PA for mharc-grub-devel@gnu.org; Wed, 22 Sep 2010 19:08:41 -0400 Received: from [140.186.70.92] (port=40882 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyYQZ-0004yp-FJ for grub-devel@gnu.org; Wed, 22 Sep 2010 19:08:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyYQV-0008Rs-NJ for grub-devel@gnu.org; Wed, 22 Sep 2010 19:08:39 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:36954) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyYQV-0008RR-GE for grub-devel@gnu.org; Wed, 22 Sep 2010 19:08:35 -0400 Received: by bwz10 with SMTP id 10so1146814bwz.0 for ; Wed, 22 Sep 2010 16:08:34 -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=b4Ob8aasxo67jeUvn8mdbY1eX/eDiPVJzlfRAXtMsl8=; b=vOzZJxh85e8izHFq9MG7bGCPKzPektyjw53AfgwrDngnuTKzuJ+olr/DYWulGEACY3 r7WFtcG4K4cNrR9d7/RqRRXnxssIkSwNBmdfp45PyN31FNoZUq9ciGgqDJ+ZSTqBjVbN nl0iuIWSlaKmOZVubmK/lrIfM/jmBpxLH2W8E= 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=RHvZVvJfWbDJLT6qPNHOei5so/YYGkVlwaEGrIdw9iVykQsRzjWPJtkFV6tsZSUZ4K A3PkNqm14grFNs4dOK9/kON6kH3mNjTgN6OTTU8eTsfdq1QV/u3Ik1I+txdA03dGlfrp Wy7PltOw0inVlCX1EadVoNPdWDG9GWvf1jeMk= Received: by 10.204.68.67 with SMTP id u3mr402162bki.199.1285196914697; Wed, 22 Sep 2010 16:08:34 -0700 (PDT) Received: from debian.bg45.phnet (gprs41.swisscom-mobile.ch [193.247.250.41]) by mx.google.com with ESMTPS id x13sm65460bki.0.2010.09.22.16.08.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Sep 2010 16:08:33 -0700 (PDT) Message-ID: <4C9A8C66.7050003@gmail.com> Date: Thu, 23 Sep 2010 01:08:22 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100805 Icedove/3.0.6 MIME-Version: 1.0 To: grub-devel@gnu.org References: <4C9A249E.2060100@miray.de> In-Reply-To: <4C9A249E.2060100@miray.de> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigA20E3C5814D850202ED0A2D1" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] Workaround for usb boot failure on some mainboards 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: Wed, 22 Sep 2010 23:08:40 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA20E3C5814D850202ED0A2D1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/22/2010 05:45 PM, Thomas Frauendorfer | Miray Software wrote: > Hi, > > On some boards, like the AsRock K7S41GX, Grub fails to boot from > superfloppy fat32 formated usb sticks. > This config isn't recommended in first place. You should really create partitions on the USB disk and leave some space between MBR and partition, then there will be no problem with this on-the-fly replacement. As an alternative you can use grub-mkrescue. As for your patch it may break in case when only backup is damaged. The correct algorithm would be sth like if (!consistent (bpb)) { err =3D read_backup_bpb (bpb); if (err) return err; if (!consistent (bpb)) return grub_error (...); } Function consistent would contain all current checks (minus perhaps "FAT" string checking) plus the checks that e.g. number of fat entries and fat sectors is consistent. > The reason for the boot failure is that the bios of the mentioned > board replaces byte 0x24 of the bpb with the value 0x00 when it's > read through the bios function. > In fat16 this byte contains the Disc unit number, so this causes no > real harm there. > In fat32 this byte is part of the sectors per FAT information, so by > modifying this value the bios makes Grub unable to read the fat system.= > > The attached workaround reads the backup bpb information on fat32 > filesystems and uses the sectors per fat information stored there. > > PS: I'm sorry if this mail is a duplicate, but I sent it before but I > wasn't subscribed so it might have been blocked/dropped before > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigA20E3C5814D850202ED0A2D1 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/ iF4EAREKAAYFAkyajGYACgkQNak7dOguQgnPVgD/cKjkw+834mgurz+vsf9ggBVK C/RACGnG2Ob7QU3be5YA/29mQZ/0afQymcbcgTLOTYQb/IOWMycT5oGVD8NltymM =Aa5o -----END PGP SIGNATURE----- --------------enigA20E3C5814D850202ED0A2D1--