Bug #7212
closed
url_for_boot not defined for Debian based OSes
Added by Anonymous over 10 years ago.
Updated about 10 years ago.
Category:
Unattended installations
|
Description
<pujan14> Hi I was wondering if "http://blog.theforeman.org/2012/01/re-provision-host-without-pxeboot.html" only works with kickstart besed OSes?
<pujan14> I tried with debian on my current installation and gave me error "undefined method `url_for_boot'"
-> the Grubby script coming with foreman is using url_for_boot, but tat's not defined for Debian based OSes
Fixing the template is pretty easy. I got it to look right with:
<% kernel, initrd = @host.operatingsystem.boot_files_uri(@host.medium,@host.architecture) -%>
wget -O "$KERNEL" "<%= kernel %>"
wget -O "$INITRD" "<%= initrd %>"
However, grubby isn't available in Debian. It may or may not be available in Ubuntu; I don't run it so I don't know.
Hm, that's right, no grubby on Debian and also on Ubuntu... but the template approach seems to be much easier than modifying the actual foreman code, so I'll stick with that. ;)
- Target version changed from 1.7.4 to 1.7.3
The opposite is also true; @host.operatingsystem.boot_files_uri(@host.medium,@host.architecture) won't work on RH systems, which means that for example for a Red Hat PXELinux ONLY
<%
kernel = @host.url_for_boot(:kernel)
initrd = @host.url_for_boot(:initrd)
-%>
KERNEL <%= kernel %>
INITRD <%= initrd %>
works
While for a Debian ONLY
<% kernel, initrd = @host.operatingsystem.boot_files_uri(@host.medium,@host.architecture) -%>
KERNEL <%= kernel %>
INITRD <%= initrd %>
works.
Kinda confusing if you ask me ;)
That can be handled via ERB in templates. In fact that's necessary as ks=... won't work for Debian or SUSE. The problem I'm having is, that accessing boot_files_uri() requires to have safemode disabled, so that's not a way to go. I lean towards closing that issue with the lame excuse of grubby not being packaged in Debian/Ubuntu...
- Status changed from New to Closed
closing to due the reasons stated above
Also available in: Atom
PDF