LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2021, 10:38 PM   #1
LNW
LQ Newbie
 
Registered: Jul 2021
Posts: 4

Rep: Reputation: Disabled
Smile iMac will only boot from USB


Dear Community, I would really appreciate some help with my escape from evil_OS. Here is the issue with this iMac:

When I boot from the hard drive I get:
Failed to set MokListRT: Invalid Perameter
Importing MOK states has failed: import-mok-state() failed
: Invalid Parameter
Continuing boot since secure mode is disabled

The boot repair utility informs me that:

Locked-NVram detected. Please disable SecureBoot in the BIOS. Then try again.

When I press command+R to try to get to the startup utility I get a blank screen.
I think I did a bad, bad thing and deleted something I need to disable secure boot.

I have previously tried using rEFInd boot manager and several distros without great success.

Thank you for your help! If you teach me this I will pass it on!
 
Old 07-11-2021, 06:12 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by LNW View Post
Dear Community, I would really appreciate some help with my escape from evil_OS. Here is the issue with this iMac:

When I boot from the hard drive I get:
Failed to set MokListRT: Invalid Perameter
Importing MOK states has failed: import-mok-state() failed
: Invalid Parameter
Continuing boot since secure mode is disabled

The boot repair utility informs me that:

Locked-NVram detected. Please disable SecureBoot in the BIOS. Then try again.

When I press command+R to try to get to the startup utility I get a blank screen.
I think I did a bad, bad thing and deleted something I need to disable secure boot.

I have previously tried using rEFInd boot manager and several distros without great success.

Thank you for your help! If you teach me this I will pass it on!
When I installed on my MacPro a few weeks ago it did the same to me. When it did the "Continuing boot since secure mode is disabled" I thought is was doing nothing until the desktop showed up Ubuntu so helpfully installed a hidden boot loader option with no timeout so it just booted. Otherwise I would have discovered the no Grub menu cause a little earlier it will not display on a Mac. You do not say if you have sat there for any amount of time to see if it does end up booting, did you allow that to happen?

Going through my history of commands run, to get rid of the signed boot.
Code:
apt-get purge shim shim-signed -y
I think this part is where I had installed grub to the new internal install after putting the drive in it so only the internal drive would be bootable.

Code:
grub-install --efi-directory=/tmp/sda /dev/sda ; grub-install --efi-directory=/tmp/sda --recheck
I had mounted the /boot/efi directory (or rather the partition that had the files that would be used for the /boot/efi) as the /tmp/sda.

Code:
mount /dev/sda1 /tmp/sda
To find the boot partition.


Code:
lsblk -o NAME,FSTYPE,MOUNTPOINT,PARTLABEL |grep -i efi
In it you need to delete the secure boot file.

Code:
rm /boot/efi/EFI/ubuntu/shimx64.efi
You will need to.

Code:
ll /boot/efi/EFI/ubuntu/
total 2943
-rwx------ 1 root root     108 Jun 27 16:48 BOOTX64.CSV
-rwx------ 1 root root     126 Jun 27 16:58 grub.cfg
-rwx------ 1 root root 1734528 Jun 27 16:58 grubx64.efi
-rwx------ 1 root root 1277024 Jun 27 16:48 mmx64.efi
To copy the grubx64.efi to the /boot/efi/EFI/BOOT/BOOTX64.EFI as that will be a copy of the /boot/efi/EFI/ubuntu/shimx64.efi file. This is the file (BOOTX64.EFI) that all efi machines will look to boot by default on an EFI enabled system.

Code:
ll /boot/efi/EFI/BOOT/
total 4136
-rwx------ 1 root root 1734528 Jun 27 16:58 BOOTX64.EFI
-rwx------ 1 root root 1222800 Jun 27 16:48 fbx64.efi
-rwx------ 1 root root 1277024 Jun 27 16:48 mmx64.efi
If running Ubuntu and if no no GRUB shows up then.

Code:
cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
GRUB_TERMINAL=console
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
I had to change the STYLE, TIMEOUT and TERMINAL options followed by.

Code:
update-grub
To have the GRUB menu be updated. I do not think I have left much out, what I would suggest you do is keep the USB install so you can boot with it if necessary. Do the install again making sure you manually partition the internal drive. Here you will create a small 200mb or so fat32 partition for use as the system partition in the installer screen. Then your / partition ext4 and if wanted a swap partition the size of your ram installed. Let it complete then wait to see if it boots if it does without a GRUB screen then you need to edit the defaul file to use the options I have shown for that.

Last edited by HappyTux; 07-11-2021 at 06:16 PM. Reason: clarified the /boot/efi wording.
 
1 members found this post helpful.
Old 07-13-2021, 12:14 AM   #3
LNW
LQ Newbie
 
Registered: Jul 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Stephen, I really appreciate your help. I expect I will use everything you explained later when I get back a command line. For now I have discovered that one should not mess around with the partitions "willy-nilly", which I did before seeking your advice. I now get a blank screen with most start-up key combinations.It looks like I may be able to boot from a server, but that is a whole new problem. I will chip away at it and hopefully get back to the original problem. I have linux mint up and running great on my main machine, so I have time to tinker and learn gradually.
 
Old 07-13-2021, 09:50 AM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by LNW View Post
Stephen, I really appreciate your help. I expect I will use everything you explained later when I get back a command line. For now I have discovered that one should not mess around with the partitions "willy-nilly", which I did before seeking your advice. I now get a blank screen with most start-up key combinations.It looks like I may be able to boot from a server, but that is a whole new problem. I will chip away at it and hopefully get back to the original problem. I have linux mint up and running great on my main machine, so I have time to tinker and learn gradually.
Yes the recovery partition needs to be there for key combinations to work as intended on a Mac. A bootable clone on external drive would do in a pinch if you have one. Another option I see I missed is for you to install to an external drive get it working properly then use the rsync program to clone it to the internal drive. Do a GRUB update so the both installs show up in the menu. You would boot the internal then unmount the external and do a new GRUB install with only the internal running as the only drive connected to get it booting properly from that drive only.
 
Old 07-20-2021, 11:27 PM   #5
LNW
LQ Newbie
 
Registered: Jul 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you Stephen, I appreciate your help!
 
Old 07-21-2021, 10:33 AM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
You are welcome.
 
Old 06-19-2022, 06:14 AM   #7
ianspe
LQ Newbie
 
Registered: Jun 2022
Posts: 1

Rep: Reputation: 0
Thumbs up Linux on old iMac: Hidden grub menu and parameters

Hi there

I know this thread is quite old but it helped me a lot! I ran into the same issue last week installing Mint 20.3 on an old iMac (Mid 2010). I tried half a dozen live-systems (manjaro, mint, elementary, deepin, suse, ubuntu) from USB Stick, but only mint, deepin and suse were able to run into live-system. I installed mint several times with various EFi-partitions (automatic and several manual partitioning) but after install the system seemed not able to start, black screen, no grub menu, even waiting more than 10 minutes. It seemed the system was running but there were issues with the display.

As user LNW from this thread I tried to reboot from USB and repair boot and got the same error message mentioning locked NVram. With the mint-boot-repair-tool I then added "nosplash nomodeset" to GRUB_CMDLINE_LINUX_DEFAULT and rebooted. And hooray, the installed mint system booted!

But still no grub-menu.To fix that I edited /etc/default/grub with the parameters from user "Happy Tux" GRUB_TIMEOUT_STYLE=menu and GRUB_TERMINAL=console and finally got the grub menu displayed at startup.

I guess for other people running into the same problem with any boot from live-USB or install on an old iMac, editing grub commandline at boot from live stick with "nosplash nomodeset" could probably do the trick.

Thanks a lot to you folks and I hope this will help someone..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iMac won't Boot USB HDD borgward Microlinux / MLED 1 07-08-2021 10:16 AM
[SOLVED] Distro for iMac G3 - CD only P Wheeler Linux - Newbie 18 03-29-2014 11:14 PM
Boot OS9 iMac (tray) to a Linxu iMac and install rudyard Linux - Networking 3 08-13-2006 11:03 PM
Is there a browser only distribution of Linux that will work on an older iMac? Silly Burrito Linux - Newbie 3 09-04-2004 12:23 PM
iMac Open Firmware won't boot on Blue iMac.... opn Linux - Software 0 12-31-2001 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration