0

A common issue: after installing Ubuntu (v22.04-desktop-AMD64) on our our iMac (2009 model A1311), when it boots Ubuntu, after ~20sec of showing some text (eg. HDD repair such as "dangling journal" and such), the screen goes black - presumably it's still booting but the graphics driver isn't working properly.

Many hints out there mention setting "nomodeset" as a GRUB option, but they don't really say how to do that if the screen is going blank! (example hint)

We can boot off the USB installed disk by choosing the "Ubuntu (safe graphics)" mode, and graphics are fine the whole way through the install. But when booting off the Internal HDD we get the black screen.

We tried:

  1. (this hint) Booting off the USB stick, and editing the local HDD's file /etc/default/grub and adding "nomodeset" but then we can't properly run "update-grub" since we're not booted off the internal HDD.

  2. We can't get the grub boot loader options screen to show during boot. Tried right-shift, F6, F9 during boot. Presumably if we could get this grub boot loader screen to show, we could try hints like this hint.

  3. We did NOT try "reFIND" yet (this hint), because we don't care if the graphics are accelerated - we just want it to work as well as the Installer USB disk! So I think our simplest solution is to enable "safe graphics mode" on our local HDD's installation - how do we do that? Is there a text file we can edit to enable that? We can access the internal HDD by booting off the USB install disk.

Thanks,

Demis
  • 111

1 Answers1

0

Normally, adding nomodeset or other kernel command-line options is done via GRUB: With the GRUB 2 menu showing, you highlight the option you want to use and type e. This opens a basic text editor in which you can add, delete, and modify options. You'd add nomodeset to the line that begins linux. (In fact, this option is the one that the Ubuntu installer adds in its "safe graphics" mode, so this would in fact be a good starting point for you.)

Also normally, the GRUB 2 menu does not appear when booting Ubuntu when it's installed to the hard disk; however, you should be able to get it to appear by holding down the Shift or Esc key as you boot. You say that the former doesn't work, but it's worth trying Esc.

If that fails, then my suggestion is to download the rEFInd USB flash drive image and try booting with it. You say you haven't tried it because you don't care about accelerated graphics, but that's not the point of rEFInd at all. It does present a simple GUI boot menu, compared to GRUB's text-mode menu, and some people prefer rEFInd for this reason; but neither boot program affects the speed of graphics once Ubuntu is loaded, assuming they both pass the same options to the kernel. What rEFInd should do in your case, though, is to present a boot menu, so that you can adjust the boot options. Highlight an Ubuntu kernel (one that would be identified as "Boot boot\vmlinuz-{something} from {somewhere}," or something similar) and hit F2, Tab, or Insert twice. This will open a text editor that's even more bare-bones than the one GRUB uses. You can examine and change boot options as you see fit.

Given your starting point, rEFInd might or might not have boot options that will work. At a bare minimum, you'll need root={rootdevice} and initrd={initrd-file} options. The initrd={initrd-file} option will almost certainly be present, but the root={rootdevice} option might or might not be, depending on how you installed. If it's not present, you can add one; but you'll need to know what the root device is. This could be a partition (like /dev/sda3 or /dev/nvme0n1p4) or an LVM logical volume (like /dev/mapper/vg00-ubuntu). With any luck you'll know enough about Linux and how you installed to know what the correct root= option is.

You can, of course, also add nomodeset as a kernel option.

Assuming this works, you can then edit the GRUB options (there are lots of questions/answers here and elsewhere on this subject; see here and here for just a couple). Alternatively, you can install rEFInd to your hard disk (sudo apt install refind; or see the rEFInd downloads page I referenced earlier). If you're dual-booting macOS, rEFInd may do a better job of detecting and booting macOS than GRUB 2. (That used to be true with Ubuntu's GRUB 2 configuration tools, but I haven't checked this detail recently.)

Rod Smith
  • 44,284
  • 7
  • 63
  • 105