For SCIENCE! Mac OS

  • 1Netbooting Apple Mac
    • 1.1Using stones (aka startup keys)
      • 1.1.1ISC DHCP Server
    • 1.2Using bless
  1. I will try to summarise my experience with Windows, Linux and Mac. I have used windows and linux(ubuntu and kubuntu) extensively during my undergrad and using Mac.
  2. An operating system is a fuel that is required to run your computer at your convenience. There are many OS out there that make it possible. Choose the best operating system that suits your needs and comfort. If you are looking for personal use like gaming and browsing, then Windows is perfect for you.
  3. Mac OS X Developer's Guide focuses equally on Cocoa and Carbon, guiding the reader through these technologies and showing how to write applications in both. It is the first book for Mac OS X developers written for those who are already working on applications, as well as new developers just getting started.

Netbooting Apple Mac

Try asking around at the research groups – either professors or older students – if you are likely to run into OS specific tasks later in your study, they will most likely be able to tell you.

Intel Macintoshs all use (U)EFI - where common PCs have a BIOS - to bootstrap and to some extent talk to hardware. Several different ways exist to make those Macs boot from network. Depending on your preference and setup choose whichever suites you.

Untested hint: Verbose Mac OS boot: sudo /usr/sbin/nvram boot-args='-v' (https://groups.google.com/forum/#!topic/macenterprise/y1RnrjpvSr4)

Using stones (aka startup keys)

On startup (when you hear the sound, before Apple sign comes up) you can hold down different keys to make the Mac boot from network. Apple uses a kind of special protocol called BSDP which is partly similar to the well known DHCP protocol. But there is more to it. Find a detailed explanation here if you want to dig into it. This method is called 'Using stones' as people use stones or other similar objects to boot a whole lab of Mac clients by putting a stone on the keyboard to hold down the 'n' key - but there are other ways to achieve this too!

ISC DHCP Server

To make a Mac client boot from network you need to extend your DHCP server configuration. Add the following option to your subnet section:

To issue special answers to Mac clients you also need to define a class:

Important note: This simple config might only work with older Mac OS clients like MacBook1,1, MacBook6.2 and others. For newer models you need the advanced config

Restart the DHCP server after saving the configuration. Then booting up your Mac client hold down the 'n' key and you will see a globe spinning instead of the usual apple sign. The Mac requests an IP from the DHCP server which advises it to load iPXE via TFTP and boot that up.

architecture

That was easy. So now we can go into the details of delivering different iPXE binaries for varying Mac platforms:

For Science Mac Os Catalina

Important note: This simple config might only work with older Mac OS clients like MacBook1,1, MacBook6.2 and others. For newer models you need the advanced config

To lookup Mac models and their architecture/CPU this website comes in very handy!

fancy

Newer Macs also have a fancy version of network booting. Hold down the 'alt' key and you will see different disks and network images to boot from. To make this work you need to modify the class definition:

Important note: This advanced config is proved to work with Macmini5,2, Macmini6,2, Macbook1,1, Macbook6,1, iMac12,1 and Macbookpro9,2

For more information about the rows of hex numbers see this excellent example. And here you can find a even more advanced example configuration.

Startup Disk

When using a proper Mac OS X server one can configure a NetBoot device/server in System Preferences -> Startup Disk. See here:

Unfortunatelly our previously configured NetBoot ISC DHCP server is not showing up in that dialog. It's just one simple thing preventing that. Mac OS sends a DHCPINFORM broadcast message to enumerate NetBoot images on the network. Usually DHCP messages are sent from UDP source port 68. But not in this case - Startup Disk enumeration sends DHCPINFORM with a random source port smaller 1024 (don't ask me why!). Here you can find a patch to make ICS DHCP server answer those messages properly.

DNSmasq

As well as ISC DHCP also dnsmasq can be configured to serve as netboot server for Mac clients:

Note: Only works with old Macs like Macbook1,1 and Macbook6,1...

Add those five lines to your configuration, save and restart the service. Try booting one of your Macintoshs holding down the 'n' key while it comes up. You should see a globe - instead of the apple - on the screen!

The more advanced config for dnsmasq looks like this:

This still does not address the issue of selecting the correct iPXE binary for 32 or 64 bit.

Using bless

An Apple Mac can be 'blessed' to boot from whichever source you want via commandline. This setting is saved in NVRAM and not changed by cloning your Macs via FOG. I'd suggest activating SSH on your Macs and use clusterssh to bless all of them without having walk to and login to each and every client.

To 'bless' your Mac turn it on and let it boot up as usual. Login and open the Terminal App and run the following command (use a proper IP instead of x.x.x.x):

According to this website the bless command is part of Mac OS X since 10.4.5. Earlier versions probably don't work that way!

No special DHCP configuration is needed for this! BUT if your server ip changes for example you'd have to run this command on all your clients again.

Culprits

Newer Mac OS X releases do not allow blessing as is. You need to allow using the address with a tool called csrutil. See here for more details: https://support.apple.com/en-us/HT205054

iPXE for Macintosh

As noted earlier there is a fundamental difference between Mac-EFI and PC-BIOS. Not just with configuring network boot but also when it comes to the binary being loaded via TFTP and executed on the client. To make iPXE work on Macs a lot of work has been done in 2014. Check out this thread if you are interested in the details: http://forum.ipxe.org/showthread.php?tid=7323

The mentioned DHCP class should point the client to the correct iPXE binary (ipxe.efi). FOG includes this binary in current SVN development tree or you can download a binary from the repository if you are still using an older version of FOG: https://svn.code.sf.net/p/freeghost/code/trunk/packages/tftp/

Depending on the hardware you have this might work for you straight away. If not, please get in contact with us on the forums so we can work on it to find a solution!!

Working devices

Macbook1,1 ...

Macbook6,1 (W89452MK8PX), nVidia NForce MCP79 (PCI ID 10de:0ab0) - http://www.everymac.com/systems/apple/macbook/specs/macbook-core-2-duo-2.26-white-13-polycarbonate-unibody-late-2009-specs.html

Macmini5,2 (C07G3W4ADJD1), Broadcom NetXtreme BCM57765 (PCI ID 14e4:16b4) - http://www.everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i5-2.5-mid-2011-specs.html

Macmini6,2 (C07LR0UQDY3H), Broadcom NetXtreme BCM57766 (PCI ID 14e4:1686) - http://www.everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i7-2.6-late-2012-specs.html

Notes from developers

Apple and its proprietary way of doing things. Simple explanation, netboot is not pxe boot. OS X is very picky about netboot. The efi iPxe file first must be named boot.efi as well as match the architecture of the machine that is booting (for you thats 64 bit) secondly not all ethernet or wifi adapters will be visible to iPxe after handoff. DHCP must point to that file as well as the boot file also.

Basically you have a few options but I will line out what we do. When I create an image, on the “master” machine I create the smallest partition possible. In that partition I add the folders:/System/Library/CoreServices/

After that I add the 64 or 32 bit ipxe file naming it boot.efi. Again for you thats a 64 bit file

Now on reboot, hold down option and select that partition. If it is able to find your nics and boot to FOG then you are in good shape!!. If it works copy the partition you just created to a usb disk. Now use that to boot your machines. Realize that you can simply select the usb disk in the boot manager and once iPxe loads up pull it out, and use it on another machine (if you are doing multiple machines). Because of limitations in iPxe do not expect a pretty FOG Menu. No background picture and such.

If your nics are not visible to the efi iPXE then you will need to use the undionly.kpxe file.

Reference: https://forums.fogproject.org/topic/7358/cannot-boot-macbook-7-1-from-pxe/9


Related articles

Articles related to ISC-DHCP

Retrieved from 'https://wiki.fogproject.org/wiki/index.php?title=FOG_on_a_MAC&oldid=12138'
Marshal
posted 5 years ago
  • Optional 'thank-you' note:
My son is starting a 4 year program in computer science in the fall and will need a laptop/notebook computer for school. I am not a Mac user and not up-to-date on what might be required for university, so I am asking for some advise. So far, I am thinking MacBook Pro with Retina display and 16GB memory.
Questions:
- How much storage is really required - 128GB or 256GB?
- Is there a need to a higher speed processor, or would the lower speed be fine?
- Which screen size?
13': smaller footprint, lighter, longer running time, costs less
15': more pixels, larger screen, more processing power (more threads)
Thanks.
Bartender
Forposted 5 years ago
  • Optional 'thank-you' note:

Ron McLeod wrote: I am thinking MacBook Pro with Retina display and 16GB memory.


Wow. That's what I use and I'm a pro (though I have an SSD in mine). I don't think he's going to be needing that kind of power in an undergrad program. I'd be tempted to get him an off-lease business-class laptop (my current employer-issued laptop is the very similar HP 8560p), at least for the first two years or so. Then, once he's proven he won't lose it or break it, is serious about his studies and makes the grade, get him something top-of-the-line.
That said, MacBooks are a fashion statement (All of my college-age nieces and nephews have them) and anything off-lease is going to be clunky, so if you're concerned about his rep among his peers go with the Mac. Don't sweat the specs. He won't need much storage and can always use the cloud. I'd get the 13' and a monitor for his dorm room.
Sheriff
posted 5 years ago
  • Optional 'thank-you' note:

Ron McLeod wrote:
- How much storage is really required - 128GB or 256GB?


Depends what type, size and number of files he'll be storing. I'd likely go big to be safe.

- Is there a need to a higher speed processor, or would the lower speed be fine?


Memory is more important that processor, and since you are wisely going with 16G the slower processor should be fine.

- Which screen size?
13': smaller footprint, lighter, longer running time, costs less
15': more pixels, larger screen, more processing power (more threads)


Another 'it depends'. More screen real estate is nice for development work (IDEs and such). But for lugging around to class and such, the smaller might be more convenient.

[Asking smart questions] [About Bear] [Books by Bear]

Sheriff
posted 5 years ago
  • Optional 'thank-you' note:
I'll respectfully disagree with Joe about the 'fashion statement' Sure Macs look great, but that's far from the most important reason to get one, which to me is OS X.

[Asking smart questions] [About Bear] [Books by Bear]

Sheriff
posted 5 years ago
  • Optional 'thank-you' note:
My personal development, and all round do anything else, machine is an entry level 11' MacBook Air. I throw all sorts of stuff at it, all sorts of programs in all sorts of programming languages, including the development snapshot of this here CodeRanch forum software. I have no problems with it at all.
My point is, if a chap like myself who programs for a living and for the craic can be perfectly happy with a bog standard model MacBook Air, then there's sure as anything absolutely no need for a Student to have a $2000 Retina MacBook Pro.
The other positive point about having a Mac is that it is a BSD based operating system, and getting familiar with the command line environment will set your son in good stead for working with UNIX based application servers.
Bartender
posted 5 years ago
  • 1
  • Optional 'thank-you' note:

Bear Bibeault wrote:I'll respectfully disagree with Joe about the 'fashion statement'


I somehow lost in editing that statement the clarification 'for college students'.
author and jackaroo
posted 5 years ago
  • 1
  • Optional 'thank-you' note:
I think there is an important question missing here: what is he using it for?
If he is doing a Computer Science degree, then he probably wants something beefy. Or two machines - a beefy desktop sitting in his dorm, and a lightweight machine to go to class with.
If he is doing a course that requires a lot of graphics manipulation, then he again probably needs something beefy, and probably needs SSD.
If he is only writing his thesis on it, then the specs could be much lighter.

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7Personal blog

Sheriff
posted 5 years ago
  • Optional 'thank-you' note:

Andrew Monkhouse wrote:If he is doing a Computer Science degree, then he probably wants something beefy.


Hmm, good point. This is kinda what I assumed.

[Asking smart questions] [About Bear] [Books by Bear]

Ranch Hand
posted 5 years ago

For Science Mac Os Download

  • Optional 'thank-you' note:
Given the fact that nothing can be added later with the current version of the Mac Book Pro models, 16 GB RAM is a must I would say. A 256 GB HDD should suffice unless you don't want to store tons of images and videos. The Mac Book Pro is definitely worth the buy! After using a couple of Lenovo's with Windows, I started using a Mac Book Pro since 2012 and I can never see myself going away from this machine! It is awesome! I simply love the OS X!

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!

Marshal
posted 5 years ago
  • Optional 'thank-you' note:
Thanks for all the feedback.
The motivation for a MacBook over a Dell/HP/Lenovo is like what Bear said, OS X. His daily driver is an iMac, and OS X is his platform of choice, but needs something that he can take to class. Also, OS X seems to be the preferred OS in Science and Engineering faculty at the university that he will be attending.
As Andrew mentioned, the reason for looking at some more than a Air is the horsepower. In addition to papers and presentations, I would expect that it will be used for development, modelling, as a test bed, and may need to host a couple of VMs.
I'm thinking a 13' MacBook Pro with 16GB memory, 256GB flash drive, and a 2.7GHZ Dual Core i5 processor. Cost with education discount would be around 1,900CAD/$1,550USD.
Bartender
posted 5 years ago
  • Optional 'thank-you' note:
At the risk of offending all you Mac fans, might I suggest an alternative:
Get a good Windows laptop with a similar spec to your chosen Mac, with at least 16GB of RAM (preferably with the ability to add more later if the machine survives more than a year of college life).
Shrink the Windows partition and install Linux e.g. Linux Mint in dual boot mode. He's studying CS so this will be a great (but not too difficult) learning exercise.
Use the remaining $1000 to buy a nice big monitor for his room, plus some insurance for when he drops the laptop/accidentally lets his 200 pound room-mate sit on it/has it stolen/leaves it in a bar/drowns it in beer.
Sheriff
posted 5 years ago
  • Optional 'thank-you' note:
No offense taken, but there is no way I'd trade OS X for another OS.

[Asking smart questions] [About Bear] [Books by Bear]

Ranch Hand
posted 5 years ago
  • Optional 'thank-you' note:

Bear Bibeault wrote:No offense taken, but there is no way I'd trade OS X for another OS.


I share the same opinion. I recently had a chance to use Windows 8.1 and the more I use it, the more I hate it! I love OS X. It is one of the reason why I would never buy any other notebook other than a Mac!

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!

Bartender
posted 5 years ago
  • Optional 'thank-you' note:

Bear Bibeault wrote:No offense taken, but there is no way I'd trade OS X for another OS.


On my usual hardware budget, I've never felt able to justify the massive premium for Mac hardware compared to PCs/laptops (especially now the components mostly come from the same sweatshops anyway), but I haven't really thought much about people paying specifically for OS X. I think I'm just going to have to save my pennies until I can afford a Mac and find out what all the fuss is about, eh?