-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Tue, 27 May 2014 19:28:39 -0400 SevenBits <sevenbitst...@gmail.com> пишет:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 05/27/2014 03:48 PM, Jordan Uggla wrote: > > On Sun, May 25, 2014 at 9:29 AM, SevenBits > > <sevenbitst...@gmail.com> wrote: > >> Okay, so I've tried this out and I am having difficulties. GRUB > >> does not seem to be able to access any of the commands in the > >> included modules. When I boot into GRUB, a bunch of errors > >> scrolls past on the screen too quickly to read (though they > >> appear to be about missing commands) and then I end up in the > >> GRUB normal prompt. > >> > >> I've using the exact same configuration file that I'm using with > >> grub-mkimage, except it doesn't work this time. I recall seeing > >> something a while ago saying that modules are not automatically > >> loaded when using grub-mkstandalone. If that's the case, then how > >> would I activate them? When I get dropped into the prompt and > >> type something like `insmod linux` it responds by saying that the > >> module Linux was not found, even though I gave the command for it > >> to be included. > >> > >> I've attached my grub.cfg file that I'm using. Perhaps someone > >> could advise me as to what I'm doing wrong? > > > > From your grub.cfg: set prefix='' > > > > $prefix is the variable used by grub to find its modules, by > > setting it to the empty string you prevent grub from being able to > > find the modules. > > Oh, duh. Not sure how that got in there. > > I'm having some additional issues now. Essentially, when GRUB is > loaded from a memdisk in this manner, the root is set to the memdisk. > Which is fine, except for one problem. I need to be able to get the > device that the EFI executable file is currently residing on, because > I need to set up loopback for an ISO file located in the same > directory as the GRUB EFI image. When I generated the image using > grub-mkimage, the root was set to this device, so this was not a problem. > > This URL ( https://wiki.archlinux.org/index.php/Grub#GRUB_Standalone ) > suggests using a variable called ${cmdpath} to solve this. > Unfortunately, the variable is not defined in my configuration. > Which grub version do you use? cmdpath is available post-2.00 (should be in 2.02beta2). > I cannot hard-code the path to use (i.e hd1,msdos0) because this > portable GRUB copy is meant to be put onto a USB stick and booted on > users' computers. Hard-coding the path would be ineffective because my > users could for example have multiple hard drives, meaning that my > hard-coded path might not point to the USB that I want and instead > point to some other drive entirely, or a non-existent drive. > > This is where my limited knowledge of GRUB internals is coming into > play. Is there some easy way to get the device that the image being > run is contained on? > That's the reason for cmdpath - to export this information. Note that patch itself is rather trivial and can easily be backported. It is commit 1fe26ab4a0fc6ec961b661cc7fc9227db822c9be. > Should I do the same for the linux command as well, e.g should > > linux ${var} quiet splash ... -- > > become > > linux "${var} quiet splash ... --" > No. This will result in both grub and kernel getting single argument which is probably not what you expect. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlOLShQACgkQR6LMutpd94yqHQCeJ0BlGQKrB8yVSIUj5bx+9u2C 1lgAoL2l9teYcowDVV+qFfbpF9oI0AWW =p6Rg -----END PGP SIGNATURE----- _______________________________________________ Help-grub mailing list Help-grub@gnu.org https://lists.gnu.org/mailman/listinfo/help-grub