[Bug 636406] New: Virtualization:Appliances/kiwi: 2 patch - allow boot required kernel if it versions mismatches, and allow autodetect nfs/nbd server ip
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@novell.com ReportedBy: alexo.veto@gmail.com QAContact: adrian@novell.com 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c1 --- Comment #1 from Alex Savin <alexo.veto@gmail.com> 2010-09-01 19:24:08 UTC --- Created an attachment (id=386987) --> (http://bugzilla.novell.com/attachment.cgi?id=386987) autodetect server ip for if it not specified in NBDROOT/NFSROOT -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c2 --- Comment #2 from Alex Savin <alexo.veto@gmail.com> 2010-09-01 19:25:41 UTC --- Created an attachment (id=386988) --> (http://bugzilla.novell.com/attachment.cgi?id=386988) boot required kernel(via kexec) if it versions mismatches -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c3 Marcus Schaefer <ms@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |alexo.veto@gmail.com Summary|Virtualization:Appliances/k |kiwi: allow to boot another |iwi: 2 patch - allow boot |kernel if the version |required kernel if it |doesn't match |versions mismatches, and | |allow autodetect nfs/nbd | |server ip | --- Comment #3 from Marcus Schaefer <ms@novell.com> 2010-09-02 09:35:11 UTC --- Thanks for the patches. I have checked in the 'autodetect server ip...' patch. The other patch has a small problem: kiwi already has some code to download another kernel and initrd specified by the variables $KIWI_INITRD and $KIWI_KERNEL. See the code below '15) Import fixed configuration files' It would be great if your patch could use those variables instead of introducing new ones and also changes the code below '15) Import fixed configuration files' in a way that it doesn't download the files again if they had been downloaded already Could you do that, would be great Thanks -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c4 Alex Savin <alexo.veto@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #386988|0 |1 is obsolete| | Status|NEEDINFO |NEW InfoProvider|alexo.veto@gmail.com | --- Comment #4 from Alex Savin <alexo.veto@gmail.com> 2010-09-02 22:45:24 UTC --- Created an attachment (id=387335) --> (http://bugzilla.novell.com/attachment.cgi?id=387335) boot required kernel(via kexec) if it versions mismatches in first time it try to load KIWI_KERNEL and KIWI_INITRD (if it specified in config.<MAC>) if it still failed - try to load default kernel (specified in /IMAGE_NAME file on image) -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c5 Alex Savin <alexo.veto@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #387335|0 |1 is obsolete| | --- Comment #5 from Alex Savin <alexo.veto@gmail.com> 2010-09-03 07:28:32 UTC --- Created an attachment (id=387385) --> (http://bugzilla.novell.com/attachment.cgi?id=387385) boot required kernel(via kexec) if it versions mismatches little fix -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c6 Alex Savin <alexo.veto@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |alexo.veto@gmail.com --- Comment #6 from Alex Savin <alexo.veto@gmail.com> 2010-09-03 08:19:04 UTC --- oops, now I see, there are already exist reloadKernel() - I will rework my patch -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c7 Alex Savin <alexo.veto@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #387385|0 |1 is obsolete| | Status|NEEDINFO |NEW InfoProvider|alexo.veto@gmail.com | --- Comment #7 from Alex Savin <alexo.veto@gmail.com> 2010-09-03 17:27:11 UTC --- Created an attachment (id=387515) --> (http://bugzilla.novell.com/attachment.cgi?id=387515) boot required kernel(via kexec) if it versions mismatches now it look good, please check this patch -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c Marcus Schaefer <ms@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=636406 https://bugzilla.novell.com/show_bug.cgi?id=636406#c8 Marcus Schaefer <ms@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #8 from Marcus Schaefer <ms@novell.com> 2010-09-06 11:56:22 UTC --- patch added, thanks -- 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.
participants (1)
-
bugzilla_noreply@novell.com