I recently decided to format and reinstall ubuntu on my laptop, for various reasons. I used a bootable usb stick, and followed a guide on how to boot from the key with grub, because after I deleted the Windows partition (I had a dual boot ubuntu-windows, with just Windows 10 initially) I could just access the boot manager that wasn't able to detect the usb key. On the grub command line, I typed
set root=(hd0,msdos1)
which was the usb key partition. After that, I typed the exit command and I accessed the boot manager, and was able to boot from the key. During the installation process, I chose to erase the disk. Now, I can boot from the usb key only, even though I made sure that ubuntu is indeed installed. I tried to boot using the grub command line
set root = (hd1,gpt2)
linux /vmlinuz
initrd /initrd.img
boot
but when I do, it gives me the error: No init found. Target system doesn't have /sbin/init
If you need more info about the error or in general, I will provide you.
Edit: right now I have 2 partitions, /dev/sda1, the EFI partitions, and /dev/sda2 where the actual os is stored
linux /vmlinuz root=/dev/sda2
– oldfred Feb 26 '19 at 15:58man efibootmgr
for trust: https://askubuntu.com/questions/908854/installed-ubuntu-17-04-and-now-cant-boot-at-all-failed-to-open-efi-boot-grubx/909238#909238 – oldfred Feb 26 '19 at 19:44