Jump to content

Info about Netboot


  • Please log in to reply
7 replies to this topic

#1
Aigors

Aigors

    InsanelyMac Legend

  • Donators
  • 729 posts
  • Gender:Male
  • Location:Italy
  • Interests:RC Model, pc, networking, mechanic electronic

Hi mates, i'have a project in my mind, could be possibile start installation of any hackinstosh using pxe or ipxe network booting?
i dont know how to work the boot mechanism of usb stick for mavericks install, can someone point me to any docs in with is explained howto boot process works? 

 

Many thanks  



#2
smx

smx

    InsanelyMac Protégé

  • Tech Team
  • 44 posts
  • Gender:Male
  • Location:Italy

Nice idea! I was thinking about the same thing.

The Server version of OS X can deploy images

http://www.techrepub...for-deployment/

 

bootpd is their all in one netboot server. Unfortunately it uses proprietary protocols

https://developer.ap...8/bootpd.8.html

 

 

It is also a NetBoot server implementing Apple-proprietary NetBoot

 

This sounds bad.

 

But also, if you look at the boot methods, you can see it uses TFTP and NFS, which is standard, or even HTTP.

 

 

After downloading the boot files via TFTP, the client OS accesses its
"root" filesystem via NFS. The RootPath property (detailed below)
specifies the path.

 

Now the problem is interfacing with the server, since we are not using the MAC efi.
By googling i found a fork of chameleon/chimera on github with net-boot additions.

The guy who made the fork made some instructions on how to netboot with OS X as server.



#3
Aigors

Aigors

    InsanelyMac Legend

  • Donators
  • 729 posts
  • Gender:Male
  • Location:Italy
  • Interests:RC Model, pc, networking, mechanic electronic

Hi smx, thanks for the answer, i already know that OSX server can act as boot server and storage for diskless client, but my project should be little beat different.

I would like to implement a linux boot server to serve installation for hackintosh, so, the people that would install, could avoid to use real or VM osx to prepare usb stick, and, i think the installation could be faster than usb stick.

I start to do some experiment with ipxe boot, but if you pass real booter to any machine, boot hangs without any screen message

Real apple machine use propietary boot protocol that not exist and cant be implemented on cheap x86 mainboard 

googling i have discovered efi boot and i try to boot vmware machine with efi bios, but if i use boot.efi from real mac, the machina start but hangs with cant load x_86/kernelcache but the folder and the file are present of boot server, i dont know howt to point machine to get whole file structure.

can you point me to github where is chimera/chameleon with netboot option? 

sorry for my bad englis :D



#4
smx

smx

    InsanelyMac Protégé

  • Tech Team
  • 44 posts
  • Gender:Male
  • Location:Italy

My progress is this:

I took the guy chameleon: https://github.com/f...on-chimera-hajo

But since it's old it refused to compile. So i made a diff of the changes between chimera and the guy additions and i added them in svn trunk chameleon (non chimera). Will post patch asap.
Made a BootCD with the modified chameleon and configured all the network stuff, but it crashed the VM. Maybe i didn't configure it correctly, or patches broke it up

https://github.com/f...a-hajo/issues/1

I also tried to PXE-Boot the "booter" file, but the VM crashed (also tested real PC and hanged).

I found usefuel stuff here: http://www.puredarwi...ooting/boot/pxe

Your efi booting is instead succesful! you probably need to check your tftp server and proper kernelcache files

 

About your idea to avoid VM and real MAC, i made a Linux script exactely for that purpose  :D http://www.insanelym...-without-a-mac/

 

I got very very far with Ata over Ethernet network booting, but due to OS X not having a (free) Ata over Ethernet driver, i got the infamous "Still Waiting for Root Device".

To reach that point i created a raw installer image with my script (it can create bootable USB pendrives/raw images and/or VirtualBox hard drives) and i attached it with vblade. I Used ipxe to boot from the aoe disk.

OSX has no AOE support, but has got something for iSCSI: http://www.studionet...scsi-initiator/ (unfortunately it's trial)

iSCSI can be used to boot as AOE. It all depends on how well the kext (globalSAN.kext) is coded. I'll try iSCSI boot and see if it works  :D 



#5
Aigors

Aigors

    InsanelyMac Legend

  • Donators
  • 729 posts
  • Gender:Male
  • Location:Italy
  • Interests:RC Model, pc, networking, mechanic electronic

can be possibile compile iscsi initiator from bsd on osx? same for AOE i have another project that implies synology x86 and ata over etehernet, i'v successfuly compile kernel module on synology, but i dont know howto compile user space part of it, and after, write some cgi to setup via synology web-interface, but this is off-topic here 

in tftproot there is kernelcache, but i dont know howto inform machine that is present in this folder or in x86_64 folder 



#6
Aigors

Aigors

    InsanelyMac Legend

  • Donators
  • 729 posts
  • Gender:Male
  • Location:Italy
  • Interests:RC Model, pc, networking, mechanic electronic

Hi smx did you know this? 

For your iscsi project could be a good start point 



#7
smx

smx

    InsanelyMac Protégé

  • Tech Team
  • 44 posts
  • Gender:Male
  • Location:Italy

I had no time to try this, but about AOE no it's not possible to compile Linux or BSD drivers on OS X. They need to be rewritten from scratch with OS X IOKIT classes and C++. You can use original sources only to see how they are designed. Also i'm not going to work with sources, as iSCSI driver is commercial (and trial). Only alternatives are:

1) Coding an AOE driver (i don't know how yet)

2) Making that chameleon fork work over NFS



#8
kby

kby

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 posts
  • Gender:Male
  • Location:US

I have managed to pxeboot snow leopard, for the most part. I would say it's 80-90% of a real netboot right now; enough to be usable for my purposes, but I will hopefuly do some work to make it work

more like real netboot.:

 

Attached File  hackintosh-netboot.jpg   77.2KB   5 downloads

(oops, apologies for the inversion of the picture. That's the way it got into the phone, but I thought it was rotated in the file I uploaded as it looks that way in preview. Apparently not…will see if I can fix or if some admin can fix it, but until then…)

(please enjoy but do not take seriously the weird hardware specs—the netboot image is of a vanilla snow leopard installation so they are not accurate (duh!).

 

What does work:

 

1. You can boot into an installation DVD image from the netboot server. I haven't tried to do a full installation, but I would expect it to mostly work, with the caveats listed below.

2. No disk involved in the early boot process. This particular screen is not, however, a completely "diskless" boot. In order to do that I have to make some modifications to the root image to

get around the fact that I am not using bspd to set up the netboot. This is an issue which is not strictly related to hackintoshes—it will occur if you netboot genuine macs, but dpn't use

Apple's bsdp protocol. The issue is that without bspd the initialzation scripts have no way of knowing where to union/overlay mount the shadow file on tope of the read-only netboot image,

so they end up using local disk for that. NetInstall works differently and does not need a shadow file.

 

What doesn't work and what are the problems:

 

1. True diskless, as detailed above.

2. System isn't the most stable; shutdown/reboot usually hangs at the end most times right now, most likely due to the vanilla-ness of the image (but booting and image of the Hackintosh modified image doesn't work yet either; it hangs at boot time and/or gets confused at which network interface it shoudl use and/or how to use it.

3. Shutdown/reboot usually hangs at the very end. I noticed that most working hackintoshes have some time of fix applied to deal with this but since I am booting the vanilla kernel, I haven't figured out how to transfer that yet.

 

I am using a real Apple server (ppc, actually; 10.5.8) to serve the image, but that is not requirement. It is the same netboot server I use for real mac netboots, but that's just a convenience for me since

I do both. My main interest in this project is to have a way to take a random customer machine and have acceess to OS X on its disk without removing it from the machine. I have not realized that under

the appropriate conditions it could "work", sadly, the holy grail of throwing a random machine at the server to netboot is probably not pratical, mostly due to the varied hardware (especially network cards). Finding the right combination of drivers is tricky and not always possible.

 

The boot sequence is PXE ROM loads lpxelinux (from the syslinux 6.03 distribution). This has a number of options, but one is to chainload pxegrub2. One should be able to set up the DHCP server

to simple poiunt to pxegrub; I have other things that use pxelinux, so this is a way to not have to redo all of that right now. grub2 has the appropriate commands to load mach_kernel (aka mach.macosx) the mach.macosx.mkext (kernelcache). One tricky point here is what goes into the kernel cache file. I can provide more specifics, but essentially if there are too many things, there con

occasionally  be confusions. For example two machines I've used have a built-in NIC with a PXE ROM but they also have Broadcom wireless cars for which with the right coercing via an extension, can work with the Apple driver. Problem is, the machine always wants to boot off of en0 which is the only way that can actually work with the hardwre I've used—the wireless cards are usually stymied on terms of getting credentials to attach to the network, but, also, they don't have PXE roms, so can't be used eariler. Unfortunately, if they work with the Apple driver, they end up taking the en0 device name and netboot can't figure out how to mount /read the disk image (over NFS or HTTP) through en0. Trying to set rd=en1 or something like that through the kernel parameters doesn't appear to work (but it must be set to something like enet, en0, or en1; eliminating tries to do a local disk boot).

 

FWIW this (or some close variant) is the grub2 entry I am using to boot the kernel:

 

menuentry "Hackintosh 10.6 netboot" {
        set root=(pxe)
        insmod video
        insmod vbe
        gfxmod="1366x768x32"
        xnu_kernel (pxe)/NetBoot/NetBootSP0/Boot/Hackintosh_10.6/i386/mach.macosx rd=enet rp=nfs:10.0.1.250:/Library/NetBoot/NetBootSP0:/Boot/Snow_Leopard/NetBoot.dmg
        xnu_mkext (pxe)/NetBoot/NetBootSP0/Boot/Hackintosh_10.6/i386/mach.macosx.mkext
}

(it's actually a dual-architecture kernel and mach.macosx.mkext so it does boot in 64-bit mode on this machine). No the gfxmode doesn't properlywork on this machine, but it seems to essentially

be a noop so I have left it in for documentation purposes as for this particular test machine, that's the desired native resolution. The kernel and mkext locations are slightly modified from standard

Apple server, but that is because I am using some symbolic links to candy-coat the paths sufficiently so I don't have to figure out how/if special quoting is needed to get some characters (e.g. <space>)

through. The "normal" path for the disk image is "/Library/NetBoot/NetBootSP0/NetBoot of Snow Leopard.nbi/NetBoot.dmg" for reference to those familiar with how the Apple NetBoot server

actually sets things up. I have done some modifications to the paths that the Apple server uses by default to get around some aspects of the way syslinux & grub modules seem to want to find

things, and also to save disk space (so I can use links to share files rather than duplicate copies, which would additionally be harder to maintain and also keep the Apple ServerAdmin utilities copacetic.

-kby







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy