Score:1

Black screen after installing Ubuntu 20.04 on 2010 iMac 21.5"

cn flag

I followed the guide on lifewire How to Install and Dual-Boot Linux and macOS

to dual-boot a 2010 iMac running High Sierra & ATI Radeon HD4670 and suffered the common 'black screen' issue when first attempting to boot the live USB flash drive into Ubuntu. Wait long enough and the start-up sound happens, so the system is booting - presumably a display issue. I found quite a few questions about this on various forums, one of which got me as far as being able to install Ubuntu but now when I boot, the screen goes black as before.

Score:1
cn flag

What I did:

stage 1 - overcome the black screen issue when booting into Ubuntu from the flash memory:

Boot up the iMac into macOS, open the flash drive in 'Finder' and edit boot/grub/grub.cfg to add 'nomodeset' and 'radeon.modeset=0' as follows:

menuentry "Ubuntu" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity 
quiet splash nomodeset radeon.modeset=0 ---
    initrd  /casper/initrd
}
menuentry "Ubuntu (safe graphics)" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash nomodeset radeon.modeset=0 ---
    initrd  /casper/initrd
}

Save the edited file and close it.

Restart the iMac and select the USB flash drive from the rEFInd boot menu (EFI/BOOT/grubx64.efi from your drive name).

This got me running the live USB flash drive Ubuntu session and able to install Ubuntu onto the newly-created partition on my hard drive.

As stated above, booting into this new install gave me the same black screen issue.

Stage 2 - sort out the black screen on installed Ubuntu boot:

  1. Re-insert the live USB flash drive.
  2. Boot into Ubuntu from that (rEFInd entry is 'EFI/BOOT/grubx64.efi from your drive name').
  3. Mount the hard drive Ubuntu partition (via 'files' / '+ Other Locations' and (in my case) '/dev/sda3' - use 'Disks' to identify which HDD partition to mount.
  4. Open a terminal session
  5. Type 'df -h' to find where the /dev/sda3 partition is mounted.
  6. Change the working directory to mountpoint/boot/grub and locate grub.cfg
  7. Copy the grub.cfg file (just in case): 'sudo cp grub.cfg grub.cfg.old'
  8. I know the first lines of the grub.cfg file say 'don't edit', but in this case you DO need to do so as you need to be able to boot using the edited grub file so you can do an 'update-grub'. So, edit grub.cfg 'sudo nano grub/cfg' to add 'nomodeset' and 'radeon.modeset=0' after the 'quiet splash' parameter to all lines starting with 'linux' in the 'menu entry' section.
  9. Save the edit.
  10. Navigate to mountpoint/etc/default and edit 'grub' so the line 'GRUB_CMDLINE_LINUX_DEFAULT' looks like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset radeon.modeset=0"
  11. Save the file and reboot.
  12. Remove the USB stick when prompted.
  13. Choose the 'EFI/ubuntu/grubx64.efi from EFI' option from the rEFInd menu - you should find the Mac boots into Ubuntu as normal (it did with me).
  14. The last step is to do a 'sudo update-grub' to update grub.cfg with the changes made above.
  15. Note - you could probably do the above to the install copy on the USB flash drive and save you the bother of booting the machine several times. I didn't do it that way of course, so I haven't checked whether there are any pitfalls.
Score:1
uz flag

I had the same problem. After a fresh installation the screen went black no matter whatI did. But I had indication that the computer was working. I found out that a bug causes the video output to be send only to the DisplayPort of the iMac, leaving the main displeased black. In my case a 2009 20 inch model with a Nvidia card.

My solution: I attached an old vga monitor to the iMac with a display to vga adapter and voila it showed the login screen. (Main display still black). First thing I did was installing the proprietary nVidia driver (By default after installation is the Nouveau driver), and rebooted and the problem was solved. Beforehand I tested with a live usb to see I the iMac would worked. The problem did not occur. Only after full installation and first boot. Hope this helps.

Score:0
cn flag

I followed most of what Augustus Nightcustard posted, but couldn't follow a few steps using the latest ubuntu image, so I combined them with https://askubuntu.com/a/531051/1219846

What I did:

Sort out the black screen on installed Ubuntu boot:

  1. Re-insert the live USB flash drive.
  2. Boot into "Try Ubuntu"
  3. use 'Disks' to identify which HDD partition to mount. (in my case) '/dev/sda2' (or use fdisk /dev/sda)
  4. Open a terminal session with Ctrl+Alt+T
  5. sudo udisksctl mount -b /dev/sda2 and change to whatever mountpoint it tells you like cd /media/ubuntu/7767eba6-4d66-44f3-aefc-88609918db13
  6. Change the working directory to mountpoint/boot/grub and locate grub.cfg
  7. Copy the grub.cfg file (just in case): sudo cp grub.cfg grub.cfg.old
  8. I know the first lines of the grub.cfg file say 'don't edit', but in this case you DO need to do so as you need to be able to boot using the edited grub file so you can do an 'update-grub'. So, edit grub.cfg using sudo nano grub/cfg to add 'nomodeset' and 'radeon.modeset=0' after the 'quiet splash' parameter to all lines starting with 'linux' in the 'menu entry' section.
  9. Save the edit using CTRL-X.
  10. Navigate to mountpoint/etc/default and edit 'grub' so the line 'GRUB_CMDLINE_LINUX_DEFAULT' looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset radeon.modeset=0"
  1. Save the file.
  2. force grub to update:
sudo mkdir /mnt/chrootdir
sudo mount /dev/sda1 /mnt/chrootdir
for dir in proc dev sys etc bin sbin var usr lib lib64 tmp; do \
    sudo mkdir -p /mnt/chrootdir/$dir && sudo mount --bind /$dir /mnt/chrootdir/$dir \
done
sudo grub-install --recheck --root-directory=/mnt/chrootdir /dev/sda # May not be required
sudo chroot /mnt/chrootdir
sudo update-grub2
exit
  1. Reboot and remove the USB stick.
Score:-1
in flag

These are great instructions, but I had a permissions problem editing the grub files that were mounted under root after reboot. My solution was to reinstall and edit grub from within the install session because the files are easily accessible:

  1. Change the working directory to mountpoint/boot/grub and locate grub.cfg

  2. Copy the grub.cfg file (just in case): 'sudo cp grub.cfg grub.cfg.old'

I know the first lines of the grub.cfg file say 'don't edit', but in this case you DO need to do so as you need to be able to boot using the edited grub file so you can do an 'update-grub'. So, edit grub.cfg 'sudo nano grub/cfg' to add 'nomodeset' and 'radeon.modeset=0' after the 'quiet splash' parameter to all lines starting with 'linux' in the 'menu entry' section. Save the edit.

  1. Navigate to mountpoint/etc/default and edit 'grub' so the line 'GRUB_CMDLINE_LINUX_DEFAULT' looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset radeon.modeset=0"

  1. Save the file and reboot. Remove the USB stick when prompted.

You should find the Mac boots into Ubuntu as normal (it did with me).

The last step is to do a 'sudo update-grub' to update grub.cfg with the changes made above.

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.