iPXE discussion forum

Full Version: how to adjust iSCSI target boot information in Ubuntu 14.04?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We are doing some testing with iSCSI boot of Ubuntu Server 14.04 on a large bed of diskless clients. We installed one client to an iSCSI target “rbd_base”, using the Ubuntu installer to connect the iSCSI target, and then shut down and cloned the volume and attached to a second iSCSI target “rbd00”. We then booted a client from the cloned copy using iPXE, which begins boot OK, but when the client OS brings up the iSCSI initiator it still attaches to the original target:

iscsistart: Logging into rbd_base,1

Boot succeeds, but obviously we cannot boot multiple clients this way, they’d all end up using the same "rbd_base" target instead of their own clone. How can I adjust to boot information to mount the new target, either by statically coding it, or better yet by having it use iBFT to just mount whatever target it was booted from?
If you look at the example I have for Ubuntu 12.04 at https://gist.github.com/robinsmidsrod/22...-ipxe-L318 you can see that I use dedicated parameters to setup the iscsi information during installation. If 14.04 has improved things a bit, it should use the iBFT to pick up the current target instead of the one coded during install time.

Although, if that doesn't work you might need to actually mount the target after it is cloned and change the name of the target inside the initrd. My guess is that is somewhat tricky. I'd instead dive deep into the ubuntu initrd and check if it was possible to boot the machines directly using a kernel+initrd and specify the target to use on the kernel command line. That would mean that each machine would not be able to choose which kernel it loads, and they'd all have to boot the same one. If that is acceptable for your environment, I think that is the easier choice.
Figured this out late last night. I was able to enable the desired functionality by editing /etc/iscsi/iscsi.initramfs to remove the static iSCSI target information and replace with "ISCSI_AUTO=true", then running update-initramfs. Now when we boot it will map the iSCSI target it boots from rather than always trying to map the same statically configured target.

Thanks for the reply!
Great that you figured it out! Where did you find the documentation indicating that ISCSI_AUTO=true was supported in that configuration file?
I found a reference to it in this bug entry and decided to give it a shot:

I haven't come across it anywhere I would really call "documentation", but I also haven't gone back to look now that I know better what to search. A quick Google now turns up some bug entries and wikis but not really any docs.
Reference URL's