Using the Discovery Plugin with a serial console

I'm testing out the new Discovery Plugin and I thought I would share a tip
on getting the Plugin to work with a serial console. I was getting tired of
dealing with Supermicro's buggy KVM-over-IPMI implementation, and decided
to try a serial console instead. The discovery messages still go to the
normal monitor port, but I'd need to create a custom image to fix that.

The Discovery directions at
http://theforeman.org/plugins/foreman_discovery/2.0/#3.1.1DefaultPXEtemplate
instructs us to use the following APPEND line:

APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop 

root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0
rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset
proxy.url=http://YOUR_PROXY proxy.type=proxy

I'm using the following APPEND line to connect to my console:

APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop 

root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0
rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset
proxy.url=http://YOUR_PROXY proxy.type=proxy console=ttyS1,115200
console=tty0 fdi.rootpw=MyPassword

And then a few other windows, I connect to the SOL and I can monitor part
of the progress

$ IPMI_PASSWORD=IPMIPassword
$ ipmitool -U ADMIN -E -I lanplus -H bmc1.int.example.org sol activate
$ ipmitool -U ADMIN -E -I lanplus -H bmc2.int.example.org sol activate
$ ipmitool -U ADMIN -E -I lanplus -H bmc3.int.example.org sol activate

If necessary, I can now log in over the serial console using the password
specified with fdi.rootpw mentioned above.

Anyways, just thought I'd share.

Thanks,

-= Stefan

Hello,

> APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop
> root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0
> rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset
> proxy.url=http://YOUR_PROXY proxy.type=proxy console=ttyS1,115200
> console=tty0 fdi.rootpw=MyPassword
>
> And then a few other windows, I connect to the SOL and I can monitor part
> of the progress
>
> $ IPMI_PASSWORD=IPMIPassword
> $ ipmitool -U ADMIN -E -I lanplus -H bmc1.int.example.org sol activate
> $ ipmitool -U ADMIN -E -I lanplus -H bmc2.int.example.org sol activate
> $ ipmitool -U ADMIN -E -I lanplus -H bmc3.int.example.org sol activate
>
> If necessary, I can now log in over the serial console using the password
> specified with fdi.rootpw mentioned above.
>
> Anyways, just thought I'd share.

interesting. Since image 2.1 now supports ZIP extensions, you can easily
create a ZIP file with a shell script that will do what you need.

Or is there anything in the image itself that you would like to see to
make your life easier?

Thanks

ยทยทยท -- Later, Lukas #lzap Zapletal