← Back to team overview

maas-devel team mailing list archive

Re: Updating pxelinux.cfg

 

On Wednesday 24 Oct 2012 13:31:34 Jeff Marcom wrote:
> On 10/24/2012 08:36 AM, Julian Edwards wrote:
> > On Tuesday 23 Oct 2012 12:25:27 Jeff Marcom wrote:
> >> Hello,
> >> 
> >> I was wondering if someone could point me to a path that would allow me
> >> to change the pxelinux generated JSON found at
> >> http://<maas.server.ip>/MAAS/api/1.0/pxeconfig.
> >> 
> >> I'm currently making a "wrapper" around much of the functionality that
> >> exists within maasserver.models (i.e User, Node, etc) that will allow me
> >> to change configuration options on the fly. I haven't been successful in
> >> figuring out where the pxeconfig is stored, or where through the api I
> >> could manipulate it.
> >> 
> >> Any help is appreciated thanks!!
> > 
> > Which options do you need to change?  The kernel options are set before
> > the
> > API call returns them, but the JSON is then parsed and used to generate
> > the
> > final config based on a template that is trivially modified.
> > 
> > Perhaps if I understood your use case I can help a bit more.
> > 
> > Cheers.
> 
> Basically I need it to be able to be modified to a point where it will
> accept arguments like these:
> 
> initrd=initrd.gz netboot=nfs
> nfsroot=10.193.37.1:/srv/<hostname>/www/<path-to-release-iso>/ubuntu-12.10-d
> esktop-amd64 log_host=10.193.37.1 log_port=5497 automatic-ubiquity
> debug-ubiquity
> 
> I realize that install via nfs isn't supported by default in MAAS, but
> it's something that I've been trying to work around. The preseed
> modification is a necessary step for us.
> 
> 
> Thanks so much!

aha!

Ok, if you look in src/provisioningserver/kernel_opts.py and find the 
compose_purpose_opts() function, you'll see it setting up iscsi targets for 
the kernel.  I imagine you can simply edit that and replace with the nfsroot 
stuff you need instead.

Alternatively, you can edit the pxeconfig templates in 
src/provisioningserver/pxe/*

cheers.


References