Bug #7212

url_for_boot not defined for Debian based OSes

Added by Michael Moll over 4 years ago. Updated over 4 years ago.

Unattended installations
Target version:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:


<pujan14> Hi I was wondering if "" 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


#1 Updated by Matt Klich over 4 years ago

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.

#2 Updated by Michael Moll over 4 years ago

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. ;)

#3 Updated by Dmitri Dolguikh over 4 years ago

  • Target version changed from 1.7.4 to 1.7.3

#4 Updated by Ronald van Zantvoort over 4 years ago

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 %>


While for a Debian ONLY

<% kernel, initrd = @host.operatingsystem.boot_files_uri(@host.medium,@host.architecture) -%>

KERNEL <%= kernel %>
INITRD  <%= initrd %>


Kinda confusing if you ask me ;)

#5 Updated by Michael Moll over 4 years ago

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...

#6 Updated by Michael Moll over 4 years ago

  • Status changed from New to Closed

closing to due the reasons stated above

Also available in: Atom PDF