-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/03/2014 02:17 PM, Andrey Borzenkov wrote: > В Thu, 26 Jun 2014 13:03:58 -0400 SevenBits > <[email protected]> пишет: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > >> On 06/22/2014 10:44 AM, Andrey Borzenkov wrote: >>> В Sat, 21 Jun 2014 12:01:31 -0400 SevenBits >>> <[email protected]> пишет: >>> >>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>> >>>> On 06/01/2014 11:43 AM, Andrey Borzenkov wrote: >>>>> В Tue, 27 May 2014 19:28:39 -0400 SevenBits >>>>> <[email protected]> пишет: >>>>> >>>>>> -----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 >>>>>>> <[email protected]> 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 am using the latest version of GRUB which I just pulled >>>> from the repository via git, and it does not seem to be >>>> present. Does this only work in code from another branch? >>> >>> >>> I just looked in grub 2.02~beta2 (both on i386-pc and i386-efi) >>> and it is present. Not that it is so useful on BIOS as it >>> contains just the hard disk, but on EFI it contains valid path >>> to directory from which grub was loaded (well, in case of >>> CD-ROM it is a bit more complicated ...). >>> >>> GNU GRUB version 2.02~beta2 >>> >>> Minimal BASH-like line editing is supported. For the first >>> word, TAB lists possible command completions. Anywhere else TAB >>> lists possible device or file completions. >>> >>> >>> >>> grub> set cmdpath=(cd0)/EFI/BOOT >>> color_highlight=black/light-gray ... > >> Okay, something _really_ odd is going on here. When I use the >> grub-mkstandalone command to build a GRUB binary, cmdpath is not >> even set. Here's the output I get: > >> GNU GRUB version 2.02~beta2 > >> Minimal BASH-like line editing is supported. For the first word, >> TAB lists possible command completions. Anywhere else TAB lists >> possible device or file completions. > >> grub> echo ${cmdpath} > >> grub> ${cmdpath} error: can't find command 'Z?'. grub> > >> Additionally, I can't view any of the file systems on any device >> due to unknown file system errors and missing modules. However, >> when I use the command grub-mkimage to build, everything works >> fine: > >> GNU GRUB version 2.02~beta2 > >> Minimal BASH-like line editing is supported. For the first word, >> TAB lists possible command completions. Anywhere else TAB lists >> possible device or file completions. > >> grub> echo ${cmdpath} (hd0,gpt2)/efi/boot grub> > >> I'm using the same grub.cfg file for both builds. Here are the >> build commands: > >> ../grub-mkimage -d . -p . --format x86_64-efi --config >> '/home/user/Desktop/grub.cfg' -o ~/Desktop/boot.efi boot linux >> ext2 normal configfile lspci ls loadenv help echo fat exfat hfs >> hfsplus part_msdos part_gpt part_apple multiboot multiboot2 >> terminal sleep loopback normal fixvideo iso9660 loadbios >> setvariable applesetos > >> ../grub-mkstandalone -d . -o ~/Desktop/boot.efi >> --format=x86_64-efi - --install-modules="boot linux ext2 normal >> configfile lspci ls loadenv help echo fat exfat hfs hfsplus >> part_msdos part_gpt part_apple multiboot multiboot2 terminal >> sleep loopback normal fixvideo iso9660 loadbios setvariable >> applesetos" >> /boot/grub/fonts/myfont.pf2='/boot/grub/fonts/unicode.pf2' >> /boot/grub/grub.cfg='/home/user/Desktop/grub.cfg' > >> I've attached the grub.cfg as well. I'm pulling my hair out on >> this: shouldn't cmdpath work from grub-mkstandalone? Could >> someone advise me on what I'm doing wrong? > > > > I still cannot reproduce it. I built grub.efi (although 32 bit) > without fixvideo, loadbios, setvariable, applesetos which I do not > have and with not grub.cfg and it works as expected. Could you > start with the same configuration? To rule out grub.cfg for a > start. > > ./grub-mkstandalone -d grub-core -o /tmp/grub.standalone.efi -O > i386-efi - --install-modules="boot linux ext2 normal configfile > lspci ls loadenv help echo fat exfat hfs hfsplus part_msdos > part_gpt part_apple multiboot multiboot2 terminal sleep loopback > normal iso9660 " > > I then created floppy image, placed this file as > \EFI\BOOT\BOOTIA32.EFI and it boots in KVM and cmdpath is set. > > Actually I can built the same image for x86_64 so you could test it > in your case.
Okay, using this configuration works. I had to modify the command a bit so it doesn't throw errors on my system. Here's the WIP command: ../grub-mkstandalone -d . -o ~/Desktop/boot.efi --format=x86_64-efi - --grub-mkimage=../grub-mkimage --modules="boot linux ext2 normal configfile lspci ls loadenv help echo fat exfat hfs hfsplus part_msdos part_gpt part_apple multiboot multiboot2 terminal sleep loopback normal fixvideo iso9660 loadbios setvariable" Oddly enough, the grafting syntax doesn't appear to work. When I do: /boot/grub/fonts/myfont.pf2='/boot/grub/fonts/unicode.pf2' /boot/grub/grub.cfg='/home/ryan/Desktop/grub.cfg' at the end of the command it doesn't work; it gives me an error message of cp: cannot stat ?/boot/grub/fonts/myfont.pf2=/boot/grub/fonts/unicode.pf2?: No such file or directory Any advice now? I just can't seem to avoid issues... - -- SevenBits > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTvwBLAAoJEFbRvtGxmFPEYN0H/jf4IlpStBFFGh9/Z9N+aLxC 6vuSOu8wgeceahyLFR+CJOP07mXrL63a69HiFzVUjyt0XRSb3SwiyJRiPUuvin/R otvyOuOCjBU6Pqo0EoiCreo86Xw/xjYbSwMnxRjX8uEsIM7osL240a+KVnif6Hwb RqAqHiEGKE2qeow5sjIVAXIHOhONVdbDbrNRUIQ4+Nh6UtOISL+1Jm/zZIWS7vWa 9Pw9YE0L/9AE6ue3Tut2OKF/Xh4wJTyBYfMIUamvybE33Ft6Q+CEDg0y8IhUXaoi W+EdmX9dkuP2xGAfbTIU4RSfNE2iuSEnxZuD2xMy27mByCH4HScV+LS5J22P3HA= =IzzI -----END PGP SIGNATURE----- _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
