Date: Wed, 31 Jul 2013 16:15:14 +0000 From: "Teske, Devin" <Devin.Teske@fisglobal.com> To: "Daniel O'Connor" <doconnor@gsoft.com.au> Cc: Devin Teske <dteske@freebsd.org>, freebsd-stable stable <freebsd-stable@freebsd.org> Subject: Re: Booting FreeBSD with Syslinux Message-ID: <13CA24D6AB415D428143D44749F57D7201FFC385@ltcfiswmsgmb21> In-Reply-To: <F3874B1D-0538-4205-9A3A-D0299C7A0A8A@gsoft.com.au> References: <F3874B1D-0538-4205-9A3A-D0299C7A0A8A@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 31, 2013, at 6:38 AM, Daniel O'Connor wrote: > Hi, > I am trying to make a FreeBSD 9.2 hybrid image (ie ISO & USB from the sam= e file) and as part of that I need to use syslinux. Unfortunately I can't g= et Syslinux's mboot.c32 to run the kernel or loader as suggested at http://= www.syslinux.org/wiki/index.php/Mboot.c32 - it reports "Invalid Multiboot i= mage: neither ELF header nor a.out kludge found". >=20 > I suspect I would be able to use memdisk as I have used that in the past = with syslinux (for 7.x) however this was seems a lot cleaner and easier to = generate. >=20 > Has anyone had any success with this? >=20 Absolutely. You can download and dissect the following to show you how it's done... http://druidbsd.sourceforge.net/download.shtml#FreeBSD_Druid It uses syslinux, as you can see here: http://druidbsd.cvs.sourceforge.net/viewvc/druidbsd/druidbsd/druid/src/boot= /freebsd/isolinux.cfg?revision=3D1.1&view=3Dmarkup As you can see, I use the memdisk.c32 module. Notice that I append "iso raw" as options to memdisk.c32. You may then be asking yourself... if the thing to do is to use memdisk wit= h an ISO... what's in said ISO? http://druidbsd.cvs.sourceforge.net/viewvc/druidbsd/druidbsd/druid/mdroot/ Basically... 1. Kernel 2. Boot Forth 3. mfsroot All that goes into an ISO. When memdisk initiates the ISO, "/boot/cdboot" t= hen gets invoked. >From there, /boot/loader gets invoked. >From there, the /boot/loader.rc is loaded. >From there, loader.4th is loaded. >From there, loader.conf is loaded. In a normal FreeBSD boot process, then the kernel gets loaded (I've modifie= d that to not load the kernel until later -- because my Forth boot menu pre= sents a kernel selection option) >From there, beastie.4th is loaded. >From there, beastie-start is called and then the beastie menu is drawn. NOTE: I've skipped a whole bunch of other Forth modules that were loaded "a= t-once" indirectly >From there, the user makes any boot option choices, and presses ENTER to bo= ot. >From there, mfsroot.gz is loaded. >From there, /stand/sysinstall gets invoked. >From there, /install.cfg gets invoked. >From there, /stand/fis gets invoked. >From there, /dev/iso9660/druid gets mounted onto /cdrom (this ISO9660 volum= e is actually _not_ the ISO that memdisk booted, but rather this is the act= ual CDROM (or DVD) that you booted from (which contains both the syslinux b= oot loader *and* the ISO it booted *and* anything else you want to access). At this point, /cdrom is your ticket to freedom, busting out of the double-= encapsulation (first encapsulation is wrapping the kernel+forth+mfsroot int= o an ISO, second level of encapsulation is from within the mfsroot; from wi= thin the mfsroot, the GEOM provided /dev/iso9660/<VOLID> is an escape hatch= to the level *above* the ISO the mfsroot was embedded within). --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13CA24D6AB415D428143D44749F57D7201FFC385>