Hook another iSCSI target before autoboot/scriptlet help?
|
2015-03-25, 08:44
Post: #1
|
|||
|
|||
Hook another iSCSI target before autoboot/scriptlet help?
Wondering if anyone can help with the scriptlet option, and/or tell me if there's a better way to do what I'm trying to do?
I'd like to hook more than just the target specified by "root-path" as a bios drive, to install multiple operating systems for a special purpose host. Keeping operating systems on separate targets instead of in partitions on the same target would enable me to snapshot OS images separately. I confirmed something like "sanhook --drive 0x81 iscsi:192.168.4.2::::iqn.2005-01.FQDNREDACTED:Rhy01" would work using the iPXE command line. I was planning on using GRUB on the 0x80 target to choose which OS to boot. First I saw DHCP_ISCSI_SECONDARY_TARGET_IQN which looked promising but I could find no documentation on it and it didn't appear to be anything but a define in the source code. Then I saw the scriptlet option which should presumably allow me to execute a "sanhook" command before an autoboot, but I cannot get it to actually do anything, including simply echo a string! "Ctrl-B", then "dhcp", then "config" shows me that it is in fact there as specified in my ISC-DHCPD config. "echo ${scriptlet}" at the iPXE prompt also shows it after pulling the DHCP lease. Scriptlet does not seem to have any documentation (http://ipxe.org/cfg/scriptlet), and there are only a handful of posts here that even mention it. The best I can determine is that it's a string if iPXE commands no longer than 255 characters, with linebreaks specified by "\". Here are the relevant snippets from my ISC DHCPD config file. Currently testing using a VMware ESXi test VM. Code: option ipxe.scriptlet code 81 = string; Although the scriptlet option content can be confirmed via "config", if I don't interrupt the boot process, it just tries to boot from the "root-path" target without executing the echo command in the scriptlet: Code: iPXE 1.0.0+ (f557) -- Open Source Network Boot Firmware -- http://ipxe.org I'm running a freshly downloaded copy of undionly.kpxe http://boot.ipxe.org/undionly.kpxe. Another option is obviously to use an embedded script in a copy of undionly.kpxe customized for this host that would allow me to pick which "root-path" I want via a menu, but the scriptlet option seems simpler and should work? |
|||
2016-10-07, 09:37
Post: #2
|
|||
|
|||
RE: Hook another iSCSI target before autoboot/scriptlet help?
You'll need to use a custom ipxe script to do what you're after instead of doing everything directly in the DHCP server. If you want to snapshot I would recommend you boot the software you need to perform the snapshotting with an argument specifying the disk to use. A sanhook before you run said software should ensure it ends up in iBFT so your OS can fetch that info from memory after boot.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)