mardi, avril 29 2014

OSX: what is Netboot and using it with linux

Netboot is a technology created by Apple to boot computers on the network like PXE. OSX Server integrates a daemon for this service. It uses a extension of DHCP, known as Boot Service Discovery Protocol BSDP

Understanding Netboot

Technically the Netboot is really easy to integrate in a network, where other services are already deployed. Netboot itself only send DHCP Inform messages with adapted content.

So a basic workflow of a boot is as follow:

  • The client: DHCP DISCOVER
  • The DHCP server's: DHCP OFFER
  • The client: DHCP REQUEST
  • The DHCP server's: DHCP ACK
  • The client: DHCP INFORM LIST
  • The BSDP server's: DHCP ACK LIST
  • The client: DHCP INFORM SELECT
  • The BSDP server: DHCP ACK SELECT

The LIST/SELECT allows to choose the disk image to transfer.

The next step is to bootstrap the system. The BSDP send a bootstrap code "booter" through tftp. This code will load the system through the network, depending on the NetBoot creation. This is usual NFS(fast) or HTTP. The content from the image is run.



Netboot image, what's in ?

A netboot image has a .nbi suffix. In OSX, this is displayed as a bundle, but it has a directory structure Capture_d_ecran_2014-04-29_a_08.35.00.png

When you are serving a nbi file for BSDP, the bootstrap file is i386/booter. The DMG file is the main image which will be server with NFS or http. The two other interesting files are i386/PlatformSupport.plist and NBImageInfo.plist . They are xml files, you can edit them direly with vi

They contains, for example, which hardware the image support. In OSX, always use the latest hardware as reference. EnabledSystemIdentifiers and DisabledSystemIdentifiers references them.

Netboot image creation

My main interest is to deploy massively OSX. This let me to look into BSDP and DeployStudio. The DeployStudio features several tools

  • DeployStudio Server, which is responsible for sending to clients
  • DeployStudio Runtime which is a client to connect to the DeployStudio Server
  • DeployStudio Assistant, which permit to:
    • Set up The Server
    • Create Netboot Image
    • Other possibilities..

The "Create Netboot Image" is the way to make the nbi file. it will add the runtime (and some other things into the image.

How to deploy ?

Now you know hot to create nbi files, what's in, and how should things go. You have probably already a DHCP server, you are missing the BSDP service ? no need to buy a OSX server only for this purpose. There is BSDPy, a server written in python which will do the job of serving the specific part of BSDP: https://bitbucket.org/bruienne/bsdpy

Services needed

  • A working DHCP server, serving a IP on request (no option needed)
  • A working TFTP server
  • A HTTP ou NFS accessible share
  • Install the BSDPy and the required library.
  • Move your Netboot image in the tftp directory

If you follow bruienne's wiki, you will end up in a /nbi directory , containing a subdirectory DSR-1085.nbi.

  • Verify you can get the file /nbi/DSR-1085.nbi/i386/booter through tftp
  • Set up NFS or apache to be able to server nfs://f.q.d.n/DSR-1085.nbi/ or http://f.q.d.n/DSR-1085.nbi/
  • Start the server with bsdpserver.py -r http -p /nbi/DSR-1085.nbi/

You'll get logs into /var/log/bsdpserver.log

DEBUG: Considering NBI source at /nbi/DSR-1085.nbi
DEBUG: [========= Using the following boot images =========]
DEBUG: /nbi/DSR-1085.nbi
DEBUG: [=========     End boot image listing      =========]
DEBUG: Got BSDP INFORM[LIST] packet:
DEBUG: Determining image list for system ID VMware7,1
DEBUG: Found enabled system ID VMware7,1 - adding "DSR-1085" to list
DEBUG: Found default image ID 1085
DEBUG: -=========================================-
DEBUG: Return ACK[LIST] to 192.168.1.50 on 68
DEBUG: Default boot image ID: [129, 0, 4, 61]
DEBUG: -=========================================-
DEBUG: Got BSDP INFORM[SELECT] packet:
DEBUG: Determining image list for system ID VMware7,1
DEBUG: Found enabled system ID VMware7,1 - adding "DSR-1085" to list
DEBUG: Found default image ID 1085
DEBUG: -->> Using HTTP URI: http://192.168.1.1/DSR-1085.nbi/NetInstall.dmg
DEBUG: ACK[SELECT] image ID: [129, 0, 4, 61]
DEBUG: -=========================================-
DEBUG: Return ACK[SELECT] to 192.168.1.50 on 68
DEBUG: TFTP path: /nbi/DSR-1085.nbi/i386/booter

So the client had bootstrapped and loaded the image through HTTP. Using BSDPy was the only addition to be able to netboot a Mac Client. This has permitted to deploy successfully a workflow from DeployStudio, and a full installation from OSX Maverick with a NetImage

dimanche, septembre 16 2012

XFCE et XRDP

XFCE4 presente , lors de la déconnexion, le bouton deconnexion. Cependant , lorsque la session est locale, il rajoute les boutons shutdown, reboot, hibernate. La où ce n'est pas de chance, c'est que xrdp, crée des sessions pour les utilisateurs à distance, et ces sessions semblent vu comme étant  […]

Lire la suite

vendredi, août 24 2012

Le RAID ce n'est pas pour les autres

La panne!

Cela devait arriver (et ca vous arrivera, Murphy est la pour ca):

  Aug  5 06:25:34 sophie mdadm[1199]: Fail event detected on md device /dev/md0, component device /dev/sdb1

Disque HS, heureusement, le serveur a ses données sur des disques RAID (RAID0, mode mirroir).

Lire la suite

jeudi, mars 8 2012

Haute dispo, la suite: serveur NFSv4 en Master/Slave

48 heures entre les deux articles, c'etait un poil moins simple... Pré-requis: savoir faire un DRBD et passer de l'un a l'autre. Le but est de monter deux VM avec IP1 et IP2, et avoir une IPV qui sera attaché soit à VM1ou VM2 suivant qui aura le service nfsv4. Chaque VM se partage via DRBD le  […]

Lire la suite

mardi, mars 6 2012

Haute dispo

La haute dispo, ou comment dormir la nuit A force de créer des machines virtuelles pour offrir du service, il fallait penser aussi à offrir de la qualité de service. rapide calcul, 40 VM stocké sur un serveur NFS, il est peut etre temps d'avoir un peu plus qu'un PRA depuis des backups. Et puis le  […]

Lire la suite

jeudi, mars 1 2012

The State of remote acces, NX, RDP

The past X11 is the default implementation of the graphic GUI onto unix platform. The protocol used to display application is network aware. Since 25 years all unix flavour can start a remote applications and display them onto networked display. xterm -display hostname:0 The XDMCP protocol has  […]

Lire la suite

vendredi, décembre 23 2011

Garmin forerunner & linux

I'm a owner of a Garmin Forerunner 305. To use it under linux, there are two ways. Use of my.garmin.com There is a plugin to install on firefox to be able to retrieve data from the garmin, and send data to the website my.garmin.com . Simply add the following repository in ubuntu/debian and install  […]

Lire la suite

lundi, décembre 19 2011

La fin d'une époque

pipit OLD

Dans des temps très lointains, quand je suis arrivé à l'IUT, j'ai découvert une salle serveur, où il n'etait pas possible d'arriver au bout de la piece de 4x8m. Des tours partout, sur des tables, sur des étagères, des cables tirés directement depuis une petite armoire de brassage... Depuis, quelques  […]

Lire la suite

vendredi, mai 16 2008

Replacing ghost with tools for real men. Part3: Computers are here to work, not me. Multicast is for you.

Testscase was ok, it was time to script everything, and let computers works alone. Mostly. Using udp-cast, I got a better solution than NFS or netcat: same speed, and over 16 clients at the same time. And so easy to deploy ...

Lire la suite

samedi, avril 26 2008

Replacing ghost with tools for real men. Part2: Ghosting an full computer

Here we are, I've choosen NFS for my tests: mounted RW, I can read/write data in both directions without problem. It's time to save and restore a computer

Lire la suite

- page 1 de 3