Project

General

Profile

Bug #7212

url_for_boot not defined for Debian based OSes

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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

History

#1 Updated by Matt Klich about 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 about 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 about 4 years ago

  • Target version changed from 1.7.4 to 1.7.3

#4 Updated by Ronald van Zantvoort about 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 %>

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

#5 Updated by Michael Moll about 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 about 4 years ago

  • Status changed from New to Closed

closing to due the reasons stated above

Also available in: Atom PDF