|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Startup-Hook Script ?
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
bootloader.sh
Description: application/shellscript
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|