Good day to all! There is a computer with UEFI and Windows 7 preinstalled. Linux is installed from under live-usb (partitions are marked up automatically, gpt). As a result, the grub bootloader is displayed only when live-usb is connected in the 'Security Boot - Enabled' mode and only as a command line. The Linux partition from under the standard bootloader is of course not visible (only usb, lan, hdd from Windows), and it’s unclear how to boot from it. Different solutions were tried, for example, from under the terminal on live usb:

$ sudo mount /dev/sda6 /mnt $ sudo grub-install —root-directory=/mnt /dev/sda $ sudo update-grub 

And also from under the grub2 terminal:

 $ set root=(hd1,gpt6) $ linux (hd1,gpt6)/boot/vmlinuz-3.<...>-generic root=/dev/sda6 $ initrd (hd1,gpt6)/boot/initrd.img-3.<...>-generic $ boot 

However, they did not lead to the desired result (the display of grub in the form of a list of OSs and without connecting a flash drive). What advise you to try to do more?

  • one
    I counted at least three different problems in your question. please specify your question to one problem. You can make corrections by clicking edit below question text. - aleksandr barakin
  • one
    There is one problem - grub is not displayed without a live-usb connection, UEFI does not see its directory on the computer. All other problems are caused by attempts to solve the original. - Dilemma
  • one
    then remove, please, from the question all the extra information. about all sorts of initramfs, startx, etc. - aleksandr barakin

1 answer 1

Everything turned out to be simple: in order for grub2 to be safely installed, you must set it up before installing Linux 'UEFI only'-mode.