grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Boot GRUB from USB - potential problem


From: Aleš Nesrsta
Subject: Re: Boot GRUB from USB - potential problem
Date: Tue, 18 Dec 2012 23:09:20 +0100

Phillip Susi píše v Út 18. 12. 2012 v 15:35 -0500:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 12/16/2012 11:54 AM, Aleš Nesrsta wrote:
> > Hi,
> > 
> > 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.
> > 
> > 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 
> > - 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
> > 
> > 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.
> 
> 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




> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (MingW32)
> Comment: Using GnuPG with undefined - http://www.enigmail.net/
> 
> iQEcBAEBAgAGBQJQ0NOBAAoJEJrBOlT6nu75LOwIAL0l3msEhg0QtvFU6o9pXyzw
> XlinEIsoCeGJ8oQ0x965nfuaSfpdQvlypbSYf8gDBTxYdmJ0iKehmLqDRePGjQPV
> w3QuSPg8H0pI4tKRwEC2LU6dlhlG3yqp2gxSAk0OuUK7BvULclkwnBkwnGsEs0Cc
> 0MWEdfpKgblWi6PFH5bEUNIqVlfSpwOVZ7Kh+bbqKScdOFno9Ed0ypG+tkr6YLvO
> QH8zcGrxG9OaXRlSCx47TQd7rmwctktBn3jf8T8YErF3FefXzthunHpppo5sWpd8
> YgskiLNp3wCsv9+5MjWG+JbfbX0qyJ4WXP9kkJfVr+f4TFHkRs3c1/NkMwobXsE=
> =RU2P
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]