Open sebasfiorent opened 11 years ago
I used the Apple "System Image Utility" to prepare a .nbi folder for the network boot. A NBI folder looks like this:
$ ls -R NBImageInfo.plist NetBoot.dmg i386
./i386: PlatformSupport.plist kernelcache booter x86_64
./i386/x86_64: kernelcache
I then replaced the x86_64 kernelcache file with my own version, generated as follows:
kextcache -v 6 -arch x86_64 -K /mach_kernel -c /path/to/nbi/i386/x86_64/kernelcache /System/Library/Extensions/ /path/to/custom/drivers
I then installed DNSMASQ which includes a TFTP server and a DHCP server. I also installed a NFS server. The boot procedure then works as follows:
The modified chameleon will poll DHCP for boot information and then download the booter and the kernelcache using TFTP. It will then mount a NFS share to access the NetBoot.dmg disk image.
Here's the interesting lines from my dnsmasq config:
dhcp-vendorclass=apple-boot,AAPLBSDPC/i386 dhcp-option-force=net:apple-boot,43,08:04:81:00:00:67 dhcp-option-force=net:apple-boot,60,"AAPLBSDPC/i386" dhcp-option-force=net:apple-boot,17,"nfs:192.168.2.123:/NfsExport:bootme.nbi/NetBoot.dmg" dhcp-option-force=net:apple-boot,67,"bootme.nbi/i386/booter"
dhcp-option=3
dhcp-option=6
Hope that helps, Hajo
I also had this in my config plist. This will put a "net-boot" attribute in IOREG at "/" with a value of 3100. You might need to replace 3100 with an hex-encoded string like "bsdp://en0@192.168.2.123"
optional:
The -rwroot_hack will make the booter net-boot with a writable disk image. You can use that to (for example) boot from a RAW disk where you are sharing the /dev/sda from a linux box.
Thanks!
One last thing.. The chimera-hajo bootloader, gets booted by normal disk boot? Or it gets served by PXE (following the route sugested by http://www.puredarwin.org/developers/booting/boot/pxe - option 2)?
Regards Sebastian
In my case i used a bootable USB key which contained the chameleon "boot" binary and the config.plist. It should also work with pxelinux, although i didn't try that.
For PXE to work, you would probably need to replace the NIB/i386/booter binary
Thanks, i'll give it a try and I'll let you know how it goes
If you do PXE-based netboot, it will search for an .mkext file for the drivers, so you need to use the old 10.6 kextcache syntax. So if you kernel is named my_kernel, it will try to load my_kernel.mkext from the same folder. It will also search for the config.plist in the same folder.
I've tried with pxe with no luck for the moment. I'll try your same config (USB boot). I've compiled your code and I have the boot bootloader. Which files do you have on the USB drive? Can you give me an ls -lR?
Thanks!
Hi, can you copy an ls -lR of your USB working installation? thanks!
Hi, I'm interested in using this bootloader.
I'm planning to following this route:pxe->mboot.c32->chameleon-chimera-hajo->osx
Please give me the minimum assumptions for a working net-booting install that you used to netboot with this code.
Thanks in advance Regards