silly pygrub trick.

| | Comments (0)
Okay, this is actually pretty cool.  You can provision a few distros pretty easily via Pygrub -- here's the relevant config (bootloader and disk line) that I've been using lately:

bootloader = 'pygrub'
disk = [
'tap:aio:/opt/xen/opensuse-10.3.iso,xvdb:cdrom,r',
'tap:aio:/opt/xen/domain.img,xvda,w'
]

NOTE THAT THIS EXAMPLE IS ENTIRELY MADE UP!  OpenSUSE 10.3 does not support this install method, as far as I can tell.

You can see that I'm defining two devices, one a CDROM and the other an ordinary Xen disk.  Pygrub automatically mounts the ISO, pulls a kernel off of it, and boots normally -- and since the initrd tells it to go into install mode, that's what it does.

It even works with Solaris -- we just have to give the kernel and initrd explicitly:

disk = [
'tap:aio:/opt/xen/opensolaris-2008-05.iso,6:cdrom,r'
'tap:aio:/opt/xen/domain.img,0,w'
]
kernel = '/platform/i86xpv/kernel/unix'
ramdisk = 'boot/x86.microroot'

Note the Solaris-style device numbers.

Obviously this won't work with distros that don't ship a Xen-aware kernel on their installation media, but that's it's a nice trick for those that do.  (I think that's .  (Apparently this is one of the standard ways of doing things now!  I'm so excited!)

Leave a comment

About this Entry

This page contains a single entry by chris t published on August 21, 2008 3:04 AM.

still not really into pokemon. was the previous entry in this blog.

xc_dom_find_loader: no loader found. is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.