Mailinglist Archive: opensuse-bugs (4669 mails)

< Previous Next >
[Bug 636406] New: Virtualization:Appliances/kiwi: 2 patch - allow boot required kernel if it versions mismatches, and allow autodetect nfs/nbd server ip
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 1 Sep 2010 19:21:32 +0000
  • Message-id: <bug-636406-21960@xxxxxxxxxxxxxxxxxxxxxxxx/>

https://bugzilla.novell.com/show_bug.cgi?id=636406

https://bugzilla.novell.com/show_bug.cgi?id=636406#c0


Summary: Virtualization:Appliances/kiwi: 2 patch - allow boot
required kernel if it versions mismatches, and allow
autodetect nfs/nbd server ip
Classification: openSUSE
Product: openSUSE.org
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: P5 - None
Component: System Imaging
AssignedTo: ms@xxxxxxxxxx
ReportedBy: alexo.veto@xxxxxxxxx
QAContact: adrian@xxxxxxxxxx
Found By: ---
Blocker: ---


This patches is very usable for ltsp images built via kiwi.

1) allow boot required kernel(via kexec) if it versions mismatches
(the relaited code already commit in kiwi-ltsp project
http://kiwi-ltsp.svn.sourceforge.net/viewvc/kiwi-ltsp?revision=129&view=revision)

--- ../modules/KIWILinuxRC.sh.old 2010-08-30 16:27:09.228002745 +0400
+++ ../modules/KIWILinuxRC.sh 2010-09-01 18:03:44.240880103 +0400
@@ -2067,6 +2067,26 @@
fi
done
if [ $kreboot = 1 ];then
+ if [ -f $prefix/IMAGE_NAME -a -f /sbin/kexec ] ; then
+ Echo "Kernel versions do not match trying boot another
kernel..."
+
+ . $prefix/IMAGE_NAME
+ fetchFile boot/$IMAGE_KERNEL_NAME /$IMAGE_KERNEL_NAME
+ fetchFile boot/$IMAGE_INITRD_NAME /$IMAGE_INITRD_NAME
+
+ if [ x"$KERNEL_CMDLINE_ARGS_OVERWRITE" = x"yes" ] ;
then
+ KERNEL_CMDLINE_ARGS="
--append=\"$KERNEL_CMDLINE_ARGS\" "
+ elif [ x"$KERNEL_CMDLINE_ARGS_OVERWRITE" = x"append" ]
; then
+ KERNEL_CMDLINE_ARGS=" --append=\"`cat
/proc/cmdline` $KERNEL_CMDLINE_ARGS\" "
+ else
+ KERNEL_CMDLINE_ARGS=""
+ fi
+
+ if [ -f /$IMAGE_KERNEL_NAME -a /$IMAGE_INITRD_NAME ] ;
then
+ kexec -l /$IMAGE_KERNEL_NAME
$KERNEL_CMDLINE_ARGS --initrd=/$IMAGE_INITRD_NAME
+ kexec -e
+ fi
+ fi
Echo "Kernel versions do not match rebooting in 5 sec..."
REBOOT_IMAGE="yes"
sleep 5




2) allow autodetect nfs/nbd server ip if it not specified in NBDROOT/NFSROOT:

diff -ur kiwi/system/boot/ix86/netboot/suse-linuxrc
kiwi2/system/boot/ix86/netboot/suse-linuxrc
--- kiwi/system/boot/ix86/netboot/suse-linuxrc 2010-08-10 15:43:45.000000000
+0400
+++ kiwi2/system/boot/ix86/netboot/suse-linuxrc 2010-08-17 20:23:34.000000000
+0400
@@ -580,6 +580,9 @@
for m in nfs lockd sunrpc;do
modprobe -i $m
done
+ if [ -z "$nfsRootServer" ];then
+ nfsRootServer=$SERVER
+ fi
Echo "Mounting NFS root system:
$nfsRootServer:$nfsRootDevice..."
imageRootDevice="-o nolock,rw $nfsRootServer:$nfsRootDevice"
if [ ! -z "$COMBINED_IMAGE" ] || [ ! -z "$UNIONFS_CONFIG"
];then
@@ -610,6 +613,9 @@
esac
done
done
+ if [ -z "$nbdServer" ];then
+ nbdServer=$SERVER
+ fi
if [ -z "$nbdDevice" ];then
nbdDevice="/dev/nbd0"
fi

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >