Score:0

Boot fail GRUB dual-boot

ar flag

Win + Ubuntu on M2 SSD. By default it would boot into Ubuntu, if F11 (bios' boot menu) press right after PC turn on then it would ask me where to boot (Win or Ubuntu). All fine.

Then I temporarily installed an additional SSD, just for the sake of installing an Ubuntu on it. After completing this installation I removed this additional SSD. Now I can still go to boot menu with F11, and booting into Win works, but the Ubuntu doesn't load anymore.

I got presented with the GRUB terminal. I determined that:

  • on (hd4,gpt1)/efi/, I have there /Ubuntu and /Boot folders, among a third one that I don't remember the name right now.
  • my Ubuntu install is on (hd4,gpt5)
  • under Windows Disk Management I can see, that my Ubuntu install is on the 3rd partition, which would mean /dev/sda2 (it is zero-indexed isn't it?)

After a lot of trial and error, it looks like to me that these commands lead to the most promising results:

set root=(hd4,gpt5)
linux (hd4,gpt5)/boot/vmlinuz-5.15.0-18-generic root=/dev/nvme0n1p5
initrd (hd4,gpt5)/boot/initrd.img-5.15.0-18-generic
boot

After triggering that boot command, it writes in the GRUB console:

You are in emergency mode. After loggin in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to boot in to default mode. Press Enter for maintenance. (or press Control=D to continue):

After that, I can get logged in as root and put into /snap directory or it writes:

Reloading system manager configuration Starting default target Failed to start default target: Transaction for graphical.target/start is destructive (emergency.target has 'start' job queued, but 'stop' is included in the transaction

Under (hd4,gpt5)/boot/ directory, there are many different vmlinuz and initrd files, but to date, all of them yield the same result (except once it loaded the graphical environment and I was able to log in and also use the computer normally for like 2 minutes, then suddenly it dropped to a shell again).

How can I fix this?

Joepie Es avatar
eg flag
The last Ubuntu installation took over the grub from the Ubuntu already installed. You can solve this by reinstalling grub from your bootable usb device. Boot the usb into a live environment, open the terminal, and type ```sudo apt install grub```. I think you can also type ```sudo update-grub```, although I'm not sure about this one.
oldfred avatar
cn flag
With multiple drives & multiple installs, use Boot-Repair's advanced mode. Please copy & paste the pastebin link to the Bootinfo summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install, not Boot-Repair ISO https://help.ubuntu.com/community/Boot-Repair Did you put an ESP on new drive? New install should have put new UEFI entry with correct partUUID & UUIDs to boot. But installer wants to install grub to first drive. https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379
IMLookingForAJob avatar
ar flag
Cool, this is the pastebin produced: https://paste.ubuntu.com/p/2b38jkcn4n/
IMLookingForAJob avatar
ar flag
@oldfred I did the boot-repair thingy
oldfred avatar
cn flag
They do not support versions not yet released as too many changes or issues that will be resolved before release. Also best not to mount using device in fstab like /dev/sda2. My system promotes a sdf flash drive to sda on reboot. So device can vary. Use UUID or labels.
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.