update-grub ignores non-xen kernels if the system is a domU
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CE Image Build Infrastructure |
Fix Released
|
High
|
Unassigned | ||
Debian |
New
|
Unknown
|
|||
grub (Ubuntu) |
Fix Released
|
Undecided
|
Basavaraj |
Bug Description
Binary package hint: grub
update-grub ignores non-xen kernels if the system is a domU and provides no mechanism to override/force otherwise. This behaviour was introduced in 0.97-22 in response to Debian bug #404536 (update-grub should put xen kernels in menu.lst when run in a domU). Unfortunately, this is not desirable if you're building images for non-xen systems on a xen instance as menu.lst will not contain any kernels and the image will not boot.
in_domU=
if [ -e /proc/xen/
in_domU=1
fi
sortedKernels=""
for kern in $(/bin/ls -1vr /boot | grep -v "dpkg-*" | grep "^vmlinuz-") ; do
if `echo "$xenKernels" | grep -q "$kern "` || `echo "$kern" | grep -q "xen"`; then
is_xen=1
else
is_xen=
fi
if [ ! "$in_domU" ] && [ "$is_xen" ]; then
# skip xen kernels
continue
elif [ "$in_domU" ] && ! [ "$is_xen" ]; then
# skip non-xen kernels
continue
fi
Related branches
- Steve Langasek: Pending requested
Changed in bugsy: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in grub: | |
status: | New → Confirmed |
tags: | added: oem-services |
Changed in grub (Ubuntu): | |
assignee: | nobody → Basavaraj (basavarajmulagund92) |
I've attached a patch with the solution we've deployed internally at OEM Services Group.