First test: build latest (2.02-beta3) from git, using grub-mkimage from the build but without a full install (which means it is pulling modules from the old install at /usr/lib/grub/x86_64-efi/ . Definitely fails, but no surprise.
How do I run the mkimage against the local modules? I should be able to do grub-mkimage --directory='/my/build/dir/grub/grub-core/' but it complains about "error: invalid ELF header". I am a little nervous to do a "make install" and trounce my functional installation. On Wed, May 25, 2016 at 8:53 AM, Avi Deitcher <[email protected]> wrote: > $ grub-mkimage --version > grub-mkimage (GRUB) 2.02-beta2-36ubuntu3 > > Makes sense; I am running the tests on an ubuntu 16.04 desktop. > > I did run a build with "linux" and without, both with verbose "-v" > enabled. Some data points: > > 1- When building the modules into the image, it is reading from > /usr/lib/grub/x86_64-efi/, which is where I am copying from when not built > in. So it is getting the right files. > > 2- The only differences between the logs (other than file/module size) are > that including linux also includes mmap, relocator, video, boot, linux. > > I will git clone and try it. > > > > > On Tue, May 24, 2016 at 12:20 PM, Andrei Borzenkov <[email protected]> > wrote: > >> On Tue, May 24, 2016 at 11:18 AM, Avi Deitcher <[email protected]> wrote: >> > linux. It is the module "linux". I have no idea what/who/why/where. >> > >> > This line works: >> > >> > grub-mkimage -O x86_64-efi -i EFI/BOOT/BOOTX64.EFI >> > --config=boot/grub/grub.cfg --prefix='()/boot/grub' --compression=auto >> disk >> > part_msdos fat iso9660 >> > >> > This line fails: >> > >> > grub-mkimage -O x86_64-efi -i EFI/BOOT/BOOTX64.EFI >> > --config=boot/grub/grub.cfg --prefix='()/boot/grub' --compression=auto >> disk >> > part_msdos fat iso9660 linux >> > >> > >> >> What is your grub version (to be sure we are not chasing something >> already fixed)? Could you test current GIT? >> >> > On Tue, May 24, 2016 at 11:09 AM, Avi Deitcher <[email protected]> >> wrote: >> >> >> >> Could it be too *many* modules? (or at least the wrong ones)? >> >> >> >> This fails: >> >> >> >> cp -r /usr/lib/grub/x86_64-efi ${CD}/boot/grub >> >> cd ${CD} && grub-mkimage -O x86_64-efi -i EFI/BOOT/BOOTX64.EFI >> >> --config=boot/grub/grub.cfg --prefix='()/boot/grub' --compression=auto >> disk >> >> part_msdos part_gpt linux loopback normal configfile search >> search_label >> >> true iso9660 efi_uga efi_gop gfxterm gfxmenu gfxterm_menu fat ls cat >> tar >> >> echo lsmmap mincmd gzio gettext exitcmd boot fshelp >> >> >> >> This succeeds: >> >> >> >> cp -r /usr/lib/grub/x86_64-efi ${CD}/boot/grub >> >> cd ${CD} && grub-mkimage -O x86_64-efi -i EFI/BOOT/BOOTX64.EFI >> >> --config=boot/grub/grub.cfg --prefix='()/boot/grub' --compression=auto >> disk >> >> part_msdos fat iso9660 >> >> >> >> Huh?? >> >> >> >> >> >> >> >> On Tue, May 24, 2016 at 11:02 AM, Avi Deitcher <[email protected]> >> wrote: >> >>> >> >>> The list was really big, so I put it in a gist: >> >>> https://gist.github.com/deitch/d5c52c29288864e5763c86c09ff7474f >> >>> >> >>> I also sorted them and did a diff. >> >>> >> >>> >> >>> >> >>> On Tue, May 24, 2016 at 10:43 AM, Avi Deitcher <[email protected]> >> wrote: >> >>>> >> >>>> OK, will do it right now. >> >>>> >> >>>> Interesting note: why does mkrescue have --prefix='()/boot/grub' as >> an >> >>>> option to mkimage? I get that rather than loading all of the modules >> into >> >>>> the grub binary, it puts them on the iso9660 filesystem and then >> accesses >> >>>> them that way, but what does '()' signify? That isn't any one known >> disk >> >>>> like (memdisk) or (cd0) or (hd0) etc. >> >>>> >> >>>> On Tue, May 24, 2016 at 10:40 AM, Andrei Borzenkov < >> [email protected]> >> >>>> wrote: >> >>>>> >> >>>>> On Tue, May 24, 2016 at 10:12 AM, Avi Deitcher <[email protected]> >> >>>>> wrote: >> >>>>> > Confirm that grub-mkrescue *does* pass the cmdline options along. >> >>>>> > Which >> >>>>> > almost definitely means my mkimage build is slightly (but >> critically) >> >>>>> > different than what mkrescue does. >> >>>>> > >> >>>>> > I ran mkrescue -v, the mkimage line was: >> >>>>> > >> >>>>> > grub-mkimage --directory '/usr/lib/grub/x86_64-efi' --prefix >> >>>>> > '()/boot/grub' >> >>>>> > --output 'somefile.efi' --format 'x86_64-efi' --compression 'auto' >> >>>>> > --config >> >>>>> > '/tmp/grub.9g6zmZ' 'part_msdos' 'fat' 'iso9660' >> >>>>> > >> >>>>> > Much simpler command line, yet it works? >> >>>>> > >> >>>>> >> >>>>> mkerscue makes *full* grub available in ISO, so everything that it >> >>>>> needs at boot time is autoloaded from image. Image itself only needs >> >>>>> just enough to access ISO after initial boot. >> >>>>> >> >>>>> It would be interesting to find out what is missing in your case. >> You >> >>>>> could start with booting rescue into CLI, issuing the same "linux" >> and >> >>>>> "initrd" commands and comparing the list of modules (lsmod). Use >> "set >> >>>>> pager=1" as module list is likely longer than normal screen. >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> Avi Deitcher >> >>>> [email protected] >> >>>> Follow me http://twitter.com/avideitcher >> >>>> Read me http://blog.atomicinc.com >> >>> >> >>> >> >>> >> >>> >> >>> -- >> >>> Avi Deitcher >> >>> [email protected] >> >>> Follow me http://twitter.com/avideitcher >> >>> Read me http://blog.atomicinc.com >> >> >> >> >> >> >> >> >> >> -- >> >> Avi Deitcher >> >> [email protected] >> >> Follow me http://twitter.com/avideitcher >> >> Read me http://blog.atomicinc.com >> > >> > >> > >> > >> > -- >> > Avi Deitcher >> > [email protected] >> > Follow me http://twitter.com/avideitcher >> > Read me http://blog.atomicinc.com >> > > > > -- > Avi Deitcher > [email protected] > Follow me http://twitter.com/avideitcher > Read me http://blog.atomicinc.com > -- Avi Deitcher [email protected] Follow me http://twitter.com/avideitcher Read me http://blog.atomicinc.com _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
