I have installed Ubuntu 18.04 LTS (minimal setup with default partitioning and security encryption) on a laptop with a 120 GB SSD drive.

When I try to boot, it will only load into command line grub mode (GNU GRUB version 2.02). ls output gives me the following:

(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)

ls (hd0,gpt3)/
error: unkown filesytem

ls (hd0,gpt2)/
./ ../ lost+found/ efi/ grub/ ... and then seems to list the kernels e.g. vmlinuz-4.15.0-23-generic

ls (hd0,gpt1)/

Boot mode in my BIOS is set to UEFI.


Here is what worked for me. (Needs internet connection):

  1. Workaround to boot into Ubuntu 18.04 LTS

    (@jas- is right. Tab key autocomplete helps!)

    From the grub> prompt:

    configfile /efi/grub/grub.cfg


    configfile (hd0,gpt1)/efi/grub/grub.cfg
  2. Once logged into the running system, from a terminal (Ctrl+Alt+T), reinstall Grub for UEFI boot:

    sudo su -
    apt install --reinstall grub-efi-amd64 linux-generic linux-headers-generic

    At the prompt for which configuration file to use, I selected the first option, use the package maintainer's files.


    update-initramfs -c -k all
  3. Done!

Command Sources

| improve this answer | |
  • The most likely cause of this is that you chose a filesystem that grub doesn't understand, like JFS. In that case, no amount of configfile <somecrap>grub.cfg will help you... – Quandary Aug 19 '18 at 20:31

Grub understands most Linux filesystems; you will want to use commands like the following to identify the filename for your kernel and your initrd and your root device:

  • ls (hd0,gpt3)/
  • ls (hd0,gpt2)/
  • ls (hd0,gpt1)/

Use that approach to find your kernel, and you should be able to boot with a set of commands like this, I believe:

  • set root=(hd0,gpt3)
  • linux /boot/vmlinuz-4.888.35-14-generic root=/dev/sda1
  • initrd /boot/initrd.img-4.888.35-14-generic
  • boot
| improve this answer | |
  • The kernel seems to sit on (hd0,gpt2). Following your guide, I was able to identify and load the latest kernel that I could find. This would then take me into a new terminal (BusyBox v1.27.2 built-in shell) with a (initramfs) prompt. Any idea how to proceed from here? – TitusQuinn Jul 9 '18 at 22:12
  • That's a good step forward; I'd look very carefully over that output to see why it did not boot further. It may be that the root= line was incorrect for your install. Look in /dev in the initramfs for likely values. – Pat Gunn Jul 9 '18 at 22:15
  • mounting /dev on /root/dev failed: No such file or directory ----- run-init: opening console: No such file or directory ----- Target filesystem doesn't have requested /sbin/init. --------- ..... No init found.... – TitusQuinn Jul 9 '18 at 22:17
  • Use grub or the busybox shell to examine the other volumes, I'm guessing they're /dev/sda1 /dev/sda2 /dev/sda3 and figure out which one should be used for the root= flag. – Pat Gunn Jul 9 '18 at 22:24
  • I have tried to set root for the kernel to /dev/sda, /dev/sda1, /dev/sda2 and /dev/sda3 with the same mounting error and init not found. Any idea? – TitusQuinn Jul 9 '18 at 22:46

Grub has some autocomplete functionality available to determine which of the aforementioned drives contains your kernel and initramfs. That will at the very least tell you where your boot files reside. Use of the tab key can be used for autocomplete.

You can also issue the help command to navigate grub2's functionality.

Since you installed as and EFI kernel you will use linux and the initrd commands to load the kernel and initramfs from the vfat EFI partiton.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.