LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-26-2013, 04:29 AM   #1
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,504

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Anyone know how to detect that Linux is running on a Mac with EFI?


Does dmidecode work, and produce any useful information? Is there anything under /sys that might be able to tell that the kernel is running on Apple hardware?

If so, I'd like to use this to be able to automatically skip the menu that asks if efibootmgr should install an EFI boot entry. It warns not to do it on a Mac, but I'd rather not give anyone the opportunity to shoot themselves in the foot. Especially because it's a pretty bad foot bullet that bricks the firmware, and would mean the machine would have to be sent in for service.

Any help appreciated.
 
Old 10-26-2013, 04:58 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Maybe a dumb idea but...

If Mac OS is installed and UEFI enabled, according to man bless, there should be a file /usr/standalone/i386/boot.efi. So maybe probe the existing partitions and check if it's there? Maybe you could have a look at this thread if not already done.

Of course that won't work if user wiped out all existing partitions before running setup...

Last edited by Didier Spaier; 10-26-2013 at 06:26 AM. Reason: Last sentence added
 
Old 10-26-2013, 09:08 AM   #3
mancha
Member
 
Registered: Aug 2012
Posts: 484

Rep: Reputation: Disabled
Quote:
Originally Posted by volkerdi View Post
Does dmidecode work, and produce any useful information? Is there anything under /sys that might be able to tell that the kernel is running on Apple hardware?
You can probe /sys/class/dmi/id/sys_vendor and compare to "Apple Inc." and "Apple Computer, Inc.".

--mancha

Last edited by mancha; 10-26-2013 at 09:31 AM.
 
3 members found this post helpful.
Old 10-26-2013, 03:21 PM   #4
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,504

Original Poster
Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Thanks mancha. That was exactly what I was looking for.
 
  


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
LXer: A Linux USB Loader with EFI Support (Mac Only) LXer Syndicated Linux News 0 12-10-2012 06:01 AM
how to detect mac address modication in linux shivarajM Linux - Software 1 05-10-2009 03:36 PM
EFI install on non mac yesglass Fedora 1 08-18-2007 01:58 AM
Installing on efi on non-mac machine (PC) yesglass Linux - General 0 08-17-2007 09:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:21 PM.

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