WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Startup-Hook Script ?

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Startup-Hook Script ?
From: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
Date: Tue, 01 Jul 2008 10:02:02 +0700
Delivery-date: Mon, 30 Jun 2008 20:02:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8E69D1B097DA4EF3BCD0302BB6E1EF5A@shs1>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <2B0ECF0840E94D13A20529E641944A39@shs1> <20080627111443.F72458-100000@xxxxxxxxxxxxx> <8E69D1B097DA4EF3BCD0302BB6E1EF5A@shs1>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080505)
Steffen Heil wrote:
For example this is my iscsi script:

http://kinkrsoftware.nl/contrib/xen/block-iscsi

If you do file based stuff I suggest you to look at a wrapper around tap:aio://

As I use "phy:" for my devices, I added a script "block-boot-phy" as a copy
of block and modified it to copy the kernel out of the device that was
attached using "boot-phy:" and this works.

But it works too late. The kernel or initrd is already loaded at that point.


Since function-wise you're trying to achieve what pygrub does, it might be easier to create another pygrub-like script and put it as bootloader on your config file.

for example, pygrub takes these parameters :
/usr/bin/pygrub [-q|--quiet] [-i|--interactive] [--output=] [--kernel=] [--ramdisk=] [--args=] [--entry=] <image>

when used as bootloader on domU config file, pygrub will be invoked with something like
pygrub --output=/var/run/xend/boot/xenbl.3079 /dev/rootvg/testlv

Your script should only need to parse --output and <image>. The script output should be something like this, redirected to wherever --output points to : linux (kernel /var/run/xend/boot/boot_kernel._rjEHS)(ramdisk /var/run/xend/boot/boot_ramdisk.5uZPgQ)(args "ro root=/dev/hda1")

Attached is bash script that MIGHT work you. This script does not parse grub's config file, so you might need to manually adjust ARGS at the top of the script as needed (my test works fine with empty ARGS though).

Regards,

Fajar


Attachment: bootloader.sh
Description: application/shellscript

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>