Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Tl5Lx-0005hb-Mh for mharc-grub-devel@gnu.org; Tue, 18 Dec 2012 17:09:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl5Lv-0005hV-Ca for grub-devel@gnu.org; Tue, 18 Dec 2012 17:09:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tl5Lt-0001gZ-IH for grub-devel@gnu.org; Tue, 18 Dec 2012 17:09:31 -0500 Received: from smtp.volny.cz ([62.44.29.27]:50415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl5Lt-0001dS-8T for grub-devel@gnu.org; Tue, 18 Dec 2012 17:09:29 -0500 Received: from [192.168.6.161] (unknown [193.86.90.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: starous) by smtp.volny.cz (Postfix) with ESMTPSA id 77EFE260ABE for ; Tue, 18 Dec 2012 23:09:26 +0100 (CET) Subject: Re: Boot GRUB from USB - potential problem From: =?UTF-8?Q?Ale=C5=A1?= Nesrsta To: The development of GNU GRUB In-Reply-To: <50D0D381.4030508@ubuntu.com> References: <1355676885.3291.52.camel@pracovna> <50D0D381.4030508@ubuntu.com> Content-Type: text/plain; charset="ISO-8859-2" Date: Tue, 18 Dec 2012 23:09:20 +0100 Message-ID: <1355868560.2783.62.camel@pracovna> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 62.44.29.27 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 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: Tue, 18 Dec 2012 22:09:32 -0000 Phillip Susi p=ED=B9e v =DAt 18. 12. 2012 v 15:35 -0500: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 12/16/2012 11:54 AM, Ale=B9 Nesrsta wrote: > > Hi, > >=20 > > I found something not really bad but probably also not good, > > related to booting of GRUB from USB device. I expect it is probably > > (very) low priority thing. Sorry if it was discussed before, I > > didn't notice it. > >=20 > > Consider this situation: - You have ordinary PC which (BIOS) > > supports boot from USB drive (such as flash disk etc.) - You boot > > GRUB on this PC from some USB device into command line environment=20 > > - You do "insmod ehci" (or load any other USB module - uhci or ohci > > - it depends what USB host controller Your PC has) - immediately > > after issuing the command above the GRUB freezes > >=20 > > Why? Because loading of GRUB USB driver stops BIOS support of USB > > device from which You have booted GRUB, i.e. GRUB has no longer > > access to any of its files. >=20 > GRUB only needs access to files when you tell it to load them. You > can load other grub modules you need before ehci, or change the path > grub will load them from after loading ehci by setting the root and > prefix variables. Thanks for reply. But it is not exact true that GRUB loads some file exactly only when I want to do it - USB part of GRUB loads some modules automaticaly, e.g. usb.c loads module usbms or usb_keyboard or usbserial_xxx when related device is connected. For example: I boot GRUB from some USB disk. This disk is mapped to GRUB as hd0 (by BIOS) and there is no another disk - i.e., I cannot copy files to some another disk and change GRUB environment variables. (Additionaly, AFAIK, GRUB cannot copy files because it has RO access to all disks - or?) When I load EHCI driver by "insmod ehci" command, driver immediately invalidates device hd0. EHCI detects new connected device (the booting USB disk) after some short time (before "insmod ehci" returns to command prompt) and USB subsystem wants load usbms module (to create disk usb0) - but it cannot, because hd0 is not accessible. So, GRUB freezes before return to command prompt. (There is question, if GRUB freezes "itself" after unsuccessful loading of usbms module (why?) or if GRUB freezes because of calling some BIOS disk function (related to "detached" EHCI USB host controller and boot USB disk) which freezes "inside" BIOS when trying to load usbms module. But it is probably not so important yet.) Probably the only one possibility is to load all necessary USB GRUB modules manually before issuing "insmod ehci" as You recommend. I will try if it is working in this way, it could be usable. BR, Ales >=20 >=20 >=20 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.17 (MingW32) > Comment: Using GnuPG with undefined - http://www.enigmail.net/ >=20 > iQEcBAEBAgAGBQJQ0NOBAAoJEJrBOlT6nu75LOwIAL0l3msEhg0QtvFU6o9pXyzw > XlinEIsoCeGJ8oQ0x965nfuaSfpdQvlypbSYf8gDBTxYdmJ0iKehmLqDRePGjQPV > w3QuSPg8H0pI4tKRwEC2LU6dlhlG3yqp2gxSAk0OuUK7BvULclkwnBkwnGsEs0Cc > 0MWEdfpKgblWi6PFH5bEUNIqVlfSpwOVZ7Kh+bbqKScdOFno9Ed0ypG+tkr6YLvO > QH8zcGrxG9OaXRlSCx47TQd7rmwctktBn3jf8T8YErF3FefXzthunHpppo5sWpd8 > YgskiLNp3wCsv9+5MjWG+JbfbX0qyJ4WXP9kkJfVr+f4TFHkRs3c1/NkMwobXsE=3D > =3DRU2P > -----END PGP SIGNATURE----- >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel