Project

General

Profile

Actions

Bug #7212

closed

url_for_boot not defined for Debian based OSes

Added by Anonymous over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
Difficulty:
Triaged:
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

Actions #1

Updated by Matt Klich over 9 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.

Actions #2

Updated by Anonymous over 9 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. ;)

Actions #3

Updated by Anonymous over 9 years ago

  • Target version changed from 1.7.4 to 1.7.3
Actions #4

Updated by Ronald van Zantvoort over 9 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 ;)

Actions #5

Updated by Anonymous over 9 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...

Actions #6

Updated by Anonymous over 9 years ago

  • Status changed from New to Closed

closing to due the reasons stated above

Actions

Also available in: Atom PDF