From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JWHYp-0007Iq-19 for mharc-grub-devel@gnu.org; Mon, 03 Mar 2008 15:46:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JWHYn-0007Id-T1 for grub-devel@gnu.org; Mon, 03 Mar 2008 15:46:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JWHYm-0007IR-Am for grub-devel@gnu.org; Mon, 03 Mar 2008 15:46:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWHYm-0007IO-5M for grub-devel@gnu.org; Mon, 03 Mar 2008 15:46:56 -0500 Received: from mailout04.sul.t-online.de ([194.25.134.18] helo=mailout04.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JWHYl-00006m-9V for grub-devel@gnu.org; Mon, 03 Mar 2008 15:46:55 -0500 Received: from fwd34.aul.t-online.de by mailout04.sul.t-online.com with smtp id 1JWHYi-0005Mp-01; Mon, 03 Mar 2008 21:46:52 +0100 Received: from [10.3.2.2] (GiUUVTZYwhhs0vUPPGB3yNm0HLN-xeFxGsPOXZq89vgZvHudTHb8XYM4eWEFRmygwU@[217.235.218.108]) by fwd34.aul.t-online.de with esmtp id 1JWHYR-0G3R2m0; Mon, 3 Mar 2008 21:46:35 +0100 Message-ID: <47CC63AC.5060204@t-online.de> Date: Mon, 03 Mar 2008 21:46:36 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: The development of GRUB 2 References: <47AEECBD.4070906@t-online.de> <47AEF27B.2090403@t-online.de> <47AF0D4E.5040001@t-online.de> <47B60083.2090102@t-online.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: GiUUVTZYwhhs0vUPPGB3yNm0HLN-xeFxGsPOXZq89vgZvHudTHb8XYM4eWEFRmygwU X-TOI-MSGID: 3e751edd-4996-4377-ae04-31b0efc76cc3 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Ensure boot CD can be accessed X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 20:46:58 -0000 Bean wrote: > On Sat, Feb 16, 2008 at 5:13 AM, Christian Franke > <...> wrote: > >> ... >> Further testing outdated this patch. The boot CD appeared under the >> following drive numbers: >> >> 0x82 (old Toshiba Laptop with unknown BIOS) >> 0x9f (PC with Phoenix-Award BIOS, VMware) >> 0xe0 (VirtualBox) >> 0xef (PC with AMI BIOS, VirtualPC) >> >> Current CVS would only work for 0xe0, with the previous patch it works >> for all >= 0x9f. >> >> This new patch also handles the case that the CD appears under the >> legacy controller drive number (0x82 = secondary master). It is accessed >> as "hd2" in this case. >> >> Christian >> >> ... >> > > I'm thinking, is there a more generic way to test for cd drive ? also, > if the cd drive can appear as (hd2), maybe we can use (hdx) for other > cases as well, such as (hd96), etc. The name might be a little > strange, but we can get the bios drive number quite easily, which can > be useful sometimes (some boot loader need to know the boot drive > number). > > Good point. Besides the heuristics "(boot drive >= 0x9f) => (likely a boot CD)", there is apparently no clean method to distinguish CD from HDD on the legacy BIOS call level. Is the special handling for CD in grub_biosdisk_rw() necessary, or can it be generalized to work with both CD and HDD? In the latter case, no actual CD detection is necessary. So is would be probably better to remove the (cdN) device names and accept funny names like e.g. (hd111) for boot CD 0xef. It also would be easier to track down problems when the boot device number is no longer hidden behind (cd0). BTW: None of the BIOSes I tested provided access to a second (non-boot) CD drive. Christian