Score:0

(hd0,gpt2)/dev doesn't have root=/dev/sda2

us flag

I'm at the grub> command line and trying to boot Ubuntu but I can't seem to assign anything to root to make it bootable.

I tried

set root=(hd0,gpt2)

but I need to run this

linux /boot/vmlinuz-5.11.0-41-generic root=?????

What do I set root to?

While on (hd0,2), /dev doesn't have any sda or sdb either... I'm trying to make Ubuntu boot. It's not loading due to /sbin/init not existing. I run linux /boot/vm-linuz-'my-version' and initrd, followed by the boot command and I always end up in "initramfs".

ChanganAuto avatar
us flag
Which problem are you trying to solve exactly?
Organic Marble avatar
us flag
Try `set root=(hd0,2)` i.e. leave out the `gpt` See https://www.linux.com/training-tutorials/how-rescue-non-booting-grub-2-linux/
Score:0
kr flag

I think you are on a hiding to nothing here. If you have tried all the options from GRUB and you are still getting stuck at an initramfs prompt then the kernel will not boot. If /sbin/init can't be found, then probably the filesystem is not getting mounted for some reason.

Usually one can boot from an older kernel, or possibly into the recovery mode for the current kernel from the GRUB menu (hold shift when you turn on your machine to access the GRUB menu). If you've already tried all your kernel versions available, including all the recovery options, you will have to boot from a live system (like an Ubuntu installation USB or Boot Repair USB) and see if you can successfully, do an fsck, run Boot Repair, install a kernel that boots (you may need to choose a specific kernel - I am not sure how your problem arose) to your system, or if all else fails, back up your data onto a separate drive and reinstall.

Score:-1
nl flag

if you are on a Gnome or KDE o some desktop environment, you can resolve boot problems with this PPA

Steps:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair

And follow the recommended options, or check advanced options and check options you may perform. Works fine (for me, at least) resolving some device finding and permissions issues

Ulysse Corbeil avatar
us flag
I'm stuck at bootloader. in grub.
Zanna avatar
kr flag
@UlysseCorbeil I understand that you aren't able to follow these steps and I don't think Boot Repair is likely to help you as your problem seems to be with the kernel and not GRUB, but if you have another computer or a friend who can help you, you can make a [live USB with Boot Repair](https://help.ubuntu.com/community/Boot-Repair#A1st_option_:_get_a_disk_including_Boot-Repair) and give it a try.
Matthias Lenmher avatar
nl flag
This tool can fix boot mount points references scanning all sda looking for OS installations. give a try from live sessoin disk, as @Zanna said =)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.