Can't run the command $ sudo ../grub-install -d. --efi-directory /boot/efi/ --target=i386?

restores hornbeam - do article - stuck at 6 points )- gives you install for the platform i386-efi.
../grub-install: error: cannot open "./moddep.lst": No such file or directory.
....

Fix GRUB, when it starts not to write every time those teams in GRUB'E. Each team is confirmed by pressing Enter
1. Write:
Code
sudo apt-get update && sudo apt-get install git bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev libfreetype6-dev texinfo
, hit enter and wait. Will prompt for a password - write. In General, I advise you to copy-paste commands. To log in using Firefox on 4pda and here copy-paste commands. In the terminal, ctrl+v not working, so RMB on the touchpad and "Paste" or "Paste" if you have not put Russian in the settings.
2. After waiting to write this:
Code
git clone git://git.savannah.gnu.org/grub.git

3. After this:
Code
cd grub

4. Copypaste this:
Code
./autogen.sh
Yes, with a dot before the slash. Long wait.
5. Then it kopipastom:
Code
./configure --with-platform=efi --target=i386 --program-prefix=""
make
And waiting here. Expectations more than any action.
6. Move grub-core:
Code
cd grub-core

7. Write command:
Code
sudo ../grub-install -d . --efi-directory /boot/efi/ --target=i386
And again we wait.
8. Now move to EFI:
Code
cd /boot/efi/EFI

10. Then write the command:
Code
sudo cp grub/grubia32.efi ubuntu/grubx64.efi
after which nothing visually going on. Waiting 10 seconds at each and continuing.
11. Write
Code
sudo nano /etc/default/grub

12. In the editor, in the line GRUB_CMDLINE_LINUX_DEFAULT model text in quotes on
Code
video=VGA-1:1368x768e reboot=pci,force

13. Press ctrl+o, then Enter, then ctrl+x out of the editor.
14. Update your GRUB config:
Code
sudo update-grub

15. Reboot. The flash drive is now optional insert.
June 10th 19 at 14:58
1 answer
June 10th 19 at 15:00
Why would you compile grub from source if it is by default available in Ubuntu?
1-6 can be skipped entirely. Instead do:
sudo apt-get update
sudo apt-get install grub-efi-ia32

Then call as a normal command without the parameter -d:
sudo grub-install --efi-directory /boot/efi/ --target=i386

10 item strange, I would not have done.
In 11-13, use gedit instead of nano if GUI - it will be easier.
The idea is that should be enough.
14 can't hurt, can do.

The point is that the build for exotic ia32 grub available in the stock Ubuntu repositories and it should just work, shouldn't be necessary, there is something to compile. If these operations are performed from the flash drive, after falling in a working system, put there is also grub-efi-ia32 so it is normally updated.
this is what I wrote as it was - and so I've tried as you write - then I read that the current from source like in that list is current to deliver ))I have a lot of options pereprobyval

_

_
_

Installed Ubuntu 16.04 ,grub to install, put ,in the BIOS there is only UEFI mode ,other modes are not present .Loading is made only from beech 32 bit now upgraded to Ubuntu 17.04 .On the forum everyone who's tried to install in the usual way ,not put .I also have not once tried .Today I found that you can restore it from a current source .actually, I left the current 6 point and continue to do the update )and Yes ,why did it take you to restore a previously - because 1 - it is not present ,the second tired to boot from USB drive from the console ) tablet asus T100 - haven.Heller commented on June 10th 19 at 15:03
So in the source code is the same as grub from a package that I wrote above.

now updated for Ubuntu 17.04

I mean updated? So you have Ubuntu working, or what? Put in the work package mentioned Ubuntu and do sudo update-grubshould be installed. In General, I would be a strange laptop changed as soon as possible on normal... ia32 UEFI is tin. - Roger.Erns commented on June 10th 19 at 15:06
he always gives or that efi is not supported in the - or - error: /usr/lib/grub/i386/modinfo.sh does not exist. Please specify --target or --directory.

of Ubuntu 16.04 stoyalka then upgraded via the console )fed up with the stick shipping just ))

by the way here is the theme of this note, there is just about the installation of grub from out all that is written

at the bottom there - haven.Heller commented on June 10th 19 at 15:09
Give me a specific quote error from terminal Pro efi directory. I'm not psychic and will not be able to help without your assistance. Be more specific. - Roger.Erns commented on June 10th 19 at 15:12
, по6 item list get -
Installs for the platform i386-efi.
../grub-install: error: cannot open "./moddep.lst": No such file or directory.

your option
- grub-install: error: /usr/lib/grub/i386/modinfo.sh does not exist. Please specify --target or --directory.
- haven.Heller commented on June 10th 19 at 15:15
You just installed grub-efi-ia32 where my launch option commands? I think not. But if you are going to do what I suggest, and the result is, of course, will not. - Roger.Erns commented on June 10th 19 at 15:18
, $ sudo apt-get install grub-efi-ia32
Reading package lists... Done
Building dependency tree
Reading state information... Ready
Is already installed package grub-efi-ia32 newest version (2.02~beta3-4ubuntu7).
0 packages updated, 0 newly installed, for removal 0 packets are marked, and 0 packages are not updated.

.....it is already there - haven.Heller commented on June 10th 19 at 15:21
In Ubuntu curve the path compiled in the binary. The files are there, but are on a different path. Try this:
sudo grub-install --efi-directory /boot/efi/ --target=i386-efi
- Roger.Erns commented on June 10th 19 at 15:24
Yeah, I updated the review, there is a purpose to properly be set with the suffix -efi - Roger.Erns commented on June 10th 19 at 15:27
here is it I always gives - EFI variables are not supported on this system.
EFI variables are not supported on this system. - haven.Heller commented on June 10th 19 at 15:30
Try to load the kernel module and try the installation again:
sudo modprobe efivars - Roger.Erns commented on June 10th 19 at 15:33
may 6 item even so to understand where is this directory that he can not find ...the same topic written for this tablet just - haven.Heller commented on June 10th 19 at 15:36
of seguril . the same thing - haven.Heller commented on June 10th 19 at 15:39
Will answer this question again, but no more than you are trying to compile from source, exactly the same thing that the Ubuntu developers have kindly compiled for you and Packed in a package you can install with a single command.

You can see that the error was the same and now we decided to move on. If you compile all modules from source you will get the same EFI variables are not supported on this system. No, if you are too lazy to compile everything from source and recompile every time a new version of grub2 (and follow updates) - then good luck, but I prefer to put packages and update grub2 automatically along with the rest of the system. - Roger.Erns commented on June 10th 19 at 15:42
I understand you ( then what's next ? - haven.Heller commented on June 10th 19 at 15:45
Try this:
sudo mount-t efivarfs efivarfs /sys/firmware/efi/efivars
- Roger.Erns commented on June 10th 19 at 15:48
,
mount: /sys/firmware/efi/efivars: unknown filesystem type 'efivarfs'.
- haven.Heller commented on June 10th 19 at 15:51
And sudo modprobe efivars without error worked then? - Roger.Erns commented on June 10th 19 at 15:54
Yes - haven.Heller commented on June 10th 19 at 15:57
Give me the output of two commands:
uname-a
ls /boot


And explain how you are booting now. It is likely that the kernel you downloaded and installed in the system is a different kernel. - Roger.Erns commented on June 10th 19 at 16:00
, 1 - Linux sergey-T100TA 4.7.1.5 #11 SMP Wed Aug 17 00:20:49 MST 2016 x86_64 x86_64 x86_64 GNU/Linux

2 - abi-4.13.0-19-generic memtest86+_multiboot.bin
config-4.13.0-19-generic refind_linux.conf
config-4.7.1.5 System.map-4.13.0-19-generic
config-4.7.2+ System.map-4.7.1.5
the efi System.map-4.7.2+
grub vmlinuz-4.13.0-19-generic
initrd.img-4.13.0-19-generic vmlinuz-4.13.0-19-generic.efi.signed
initrd.img-4.7.1.5 vmlinuz-4.7.1.5
initrd.img-4.7.2+ vmlinuz-4.7.1.5.efi.signed
memtest86+.bin vmlinuz-4.7.2+
memtest86+.elf

I was loaded all the time with the stick and wrote linux (hd0,gpt2)/boot/vmlinuz-4.7.1.5 root=/dev/mmcblk0p2
initrd (hd0,gpt2)/boot/initrd-4.7.1.5

something like this write )))but today after 5 item from the list (((now when vklyuchenii without the stick immediately prioritetu always stood Ubuntu now loaded from the console of a hornbeam)is now loaded in the - haven.Heller commented on June 10th 19 at 16:03
You see, the core of which is loaded 4.7.1.5 and Ubuntu latest installed 4.13.0-19.

Replace 4.7.1.5 in your teams 4.13.0-19-generic and try again what I wrote above. I don't know what there was in the core of 4.7 in Ubuntu, it is relatively old already. - Roger.Erns commented on June 10th 19 at 16:06
he on it does not boot after write boot. It hangs - haven.Heller commented on June 10th 19 at 16:09
Try vmlinuz-4.13.0-19-generic.efi.signed instead of the usual. And so very strange... - Roger.Erns commented on June 10th 19 at 16:12
Same thing With that old ship safely - haven.Heller commented on June 10th 19 at 16:15
, View the file /boot/grub.cfg, there should be a menuentry and end of one of these there is a line that starts with linux and initrd. Find the ones that correspond to the core 4.13.0-19-generic and write down somewhere.
Then in the grub console and use them instead of /boot/ in the beginning of the settings, use your (hd0,gpt2)/boot/, possibly there are still some important parameters as the root partition was sewn up in the core, and now they need to be specified explicitly.

And yet, as a more simple experiment, you can try to switch to the grub that you have in Ubuntu directly from the grub on the flash drive, suddenly working, like so:
set prefix=(hd0,gpt2)/boot/grub
configfile (hd0,gpt2)/boot/grub.cfg
- Roger.Erns commented on June 10th 19 at 16:18
well supposedly some of them 3

# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
 set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
 set default="${next_entry}"
 set next_entry=
 save_env next_entry
 set boot_once=true
else
 set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
 set saved_entry="${prev_saved_entry}"
 save_env saved_entry
 set prev_saved_entry=
 save_env prev_saved_entry
 set boot_once=true
fi

function savedefault {
 if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
 save_env saved_entry
fi
}
function recordfail {
 set recordfail=1
 if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
 if [ x$feature_all_video_module = xy ]; then
 insmod all_video
else
 insmod efi_gop
 insmod efi_uga
 insmod ieee1275_fb
 insmod vbe
 insmod vga
 insmod video_bochs
 insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
else
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
 set gfxmode=auto
load_video
 insmod gfxterm
 set locale_dir=$prefix/locale
 set lang=it_it
 insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
 set timeout=30
else
 if [ x$feature_timeout_style = xy ] ; then
 set timeout_style=hidden
 set timeout=0
 # Fallback hidden-timeout code in case the timeout_style feature is
 # unavailable.
 elif sleep --interruptible 0 ; then
 set timeout=0
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
 set gfxpayload="${1}"
 if [ "${1}" = "keep" ]; then
 set vt_handoff=vt.handoff=7
else
 set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
 if [ -e ${prefix}/gfxblacklist.txt ]; then
 if hwmatch ${prefix}/gfxblacklist.txt 3; then
 if [ ${match} = 0 ]; then
 set linux_gfx_mode=keep
else
 set linux_gfx_mode=text
fi
else
 set linux_gfx_mode=text
fi
else
 set linux_gfx_mode=keep
fi
else
 set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6ebcb614-e994-44c5-accc-39db1691ab47' {
recordfail
load_video
 gfxmode $linux_gfx_mode
 insmod gzio
 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
 insmod part_gpt
 insmod ext2
 if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
else
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
fi
 linux /boot/vmlinuz-4.13.0-19-generic.efi.signed root=UUID=6ebcb614-e994-44c5-accc-39db1691ab47 ro quiet splash $vt_handoff
 initrd /boot/initrd.img-4.13.0-19-generic
}
submenu 'advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-6ebcb614-e994-44c5-accc-39db1691ab47' {
 menuentry 'Ubuntu, with Linux 4.13.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0-19-generic-advanced-6ebcb614-e994-44c5-accc-39db1691ab47' {
recordfail
load_video
 gfxmode $linux_gfx_mode
 insmod gzio
 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
 insmod part_gpt
 insmod ext2
 if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
else
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
fi
 echo 'Loading Linux 4.13.0-19-generic ...'
 linux /boot/vmlinuz-4.13.0-19-generic.efi.signed root=UUID=6ebcb614-e994-44c5-accc-39db1691ab47 ro quiet splash $vt_handoff
 echo 'Loading initial virtual disk ...'
 initrd /boot/initrd.img-4.13.0-19-generic
}
 menuentry 'Ubuntu, with Linux 4.13.0-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0-19-generic-recovery-6ebcb614-e994-44c5-accc-39db1691ab47' {
recordfail
load_video
 insmod gzio
 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
 insmod part_gpt
 insmod ext2
 if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
else
 search --no-floppy --fs-uuid --set=root 6ebcb614-e994-44c5-accc-39db1691ab47
fi
 echo 'Loading Linux 4.13.0-19-generic ...'
 linux /boot/vmlinuz-4.13.0-19-generic.efi.signed root=UUID=6ebcb614-e994-44c5-accc-39db1691ab47 ro recovery cmdline options 
 echo 'Loading initial virtual disk ...'
 initrd /boot/initrd.img-4.13.0-19-generic
 }
- haven.Heller commented on June 10th 19 at 16:21
Here so happens:
linux (hd0,gpt2)/boot/vmlinuz-4.13.0-19-generic.efi.signed root=UUID=6ebcb614-e994-44c5-accc-39db1691ab47 ro
initrd (hd0,gpt2)/boot/initrd.img-4.13.0-19-generic

But first, try switching to grub from Ubuntu and the command is shorter, and if I start it will be easier and there will be a menu with commands. - Roger.Erns commented on June 10th 19 at 16:24
he doesn't know the config command - haven.Heller commented on June 10th 19 at 16:27
A typo, should be configfile - Roger.Erns commented on June 10th 19 at 16:30
cleared axis of the window and just waiting for the team
Grub> - haven.Heller commented on June 10th 19 at 16:33
Okay, then try the kernel to ship - Roger.Erns commented on June 10th 19 at 16:36
have zagruzit ,repeated the installation .Without loading kernel modules(everything passed without errors - haven.Heller commented on June 10th 19 at 16:39
That is grub installed, I correctly understood? - Roger.Erns commented on June 10th 19 at 16:42
, hornbeam established.. cons. 1-Menu of grub is not.. He just somehow load the OS.. 2 - Shut down your tablet fails - haven.Heller commented on June 10th 19 at 16:45
Nice!
1. Menu you can enable by editing /etc/default/grub, but I don't think it you really need to. If you want to - comment out the line GRUB_HIDDEN_TIMEOUT=0
2. Do as written in paragraph 12 of your statement (better add through the gap to the existing options instead of replacing), I think this is what you need

After 1. and/or 2. don't forget sudo update-grub - Roger.Erns commented on June 10th 19 at 16:48
As you can see , everything is easier than your original instruction - modern modern grub2 in Ubuntu is already compiled and packaged as necessary. There is a suspicion that 17.10 can even be set correctly out of the box, but not a fact. 16.04 old enough. - Roger.Erns commented on June 10th 19 at 16:51
Thank you very much ,what time out )remained current problem with lockups solved after the updates - haven.Heller commented on June 10th 19 at 16:54

Find more questions by tags UbuntuGRUB