diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2009-04-09 13:48:52 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-04-09 13:48:52 -0700 |
commit | a51df7e17324d080a743e33504e379fbb7dbd580 (patch) | |
tree | ad80b2c0c86fd4840ee5f88c8e6d2e357a673467 | |
parent | cb73cac112b425099c56d7bfaf81ef00efb5a913 (diff) | |
download | vyatta-cfg-system-a51df7e17324d080a743e33504e379fbb7dbd580.tar.gz vyatta-cfg-system-a51df7e17324d080a743e33504e379fbb7dbd580.zip |
fix xen kernel handling for union install
-rwxr-xr-x | scripts/install-system | 3 | ||||
-rwxr-xr-x | scripts/vyatta-grub-setup | 23 |
2 files changed, 23 insertions, 3 deletions
diff --git a/scripts/install-system b/scripts/install-system index 17d847d7..2e821397 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -833,8 +833,7 @@ install_root_filesystem () { echo Copying squashfs image... cp /live/image/live/filesystem.squashfs $rootfsdir/boot/$version/$version.squashfs echo Copying kernel and initrd images... - cp -ar /boot/initrd.img-* $rootfsdir/boot/$version/ - cp -ar /boot/vmlinuz-* $rootfsdir/boot/$version/ + cp -a /boot/* $rootfsdir/boot/$version/ else echo Copying image files... cp -ar /live/image/boot/$version $rootfsdir/boot/ diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup index e3438ec8..4ac8cd92 100755 --- a/scripts/vyatta-grub-setup +++ b/scripts/vyatta-grub-setup @@ -89,7 +89,16 @@ fi if eval "$UNION"; then GRUB_OPTIONS="boot=live live-media-path=/boot/$livedir module=$livedir quiet persistent noautologin nonetworking nouser hostname=vyatta" - union_kernel_versions=$(ls $ROOTFSDIR/boot/$livedir/vmlinuz-* 2> /dev/null | grep -v xen | awk -F/ '{ print $6 }' | sed 's/vmlinuz//g' | sort -r) + union_xen_kernel_version=$(ls $ROOTFSDIR/boot/$livedir/vmlinuz*-xen* \ + 2>/dev/null \ + | awk -F/ '{ print $6 }' \ + | sed 's/vmlinuz//g' | sort -r) + union_xen_version=$(ls $ROOTFSDIR/boot/$livedir/xen-*.gz 2> /dev/null \ + | head -1 | awk -F/ '{ print $6 }' | sort -r) + union_kernel_versions=$(ls $ROOTFSDIR/boot/$livedir/vmlinuz-* \ + 2> /dev/null | grep -v xen \ + | awk -F/ '{ print $6 }' | sed 's/vmlinuz//g' \ + | sort -r) else # Read UUID off of filesystem and use it to tell GRUB where to mount drive # This allows device to move around and grub will still find it @@ -177,6 +186,18 @@ fi done fi + if [ -n "$union_xen_kernel_version" ]; then + for xversion in $union_xen_kernel_version; do + echo + echo + echo -e "menuentry \"Vyatta Xen linux$xversion dom0\" {" + echo -e "\tmultiboot /boot/$livedir/$union_xen_version " + echo -e "\tmodule /boot/$livedir/vmlinuz$xversion $GRUB_OPTIONS $vga_logo $vty_console" + echo -e "\tmodule /boot/$livedir/initrd.img$xversion" + echo -e "}" + done + fi + if [ -f "$ROOTFSDIR/boot/vmlinuz" ] && ! eval $UNION ; then # Set first system boot option. Make KVM the default console in this one. echo -e "menuentry \"Vyatta (KVM console)\" {" |