On 01/28/15 at 02:01pm, Vivek Goyal wrote:
On Wed, Jan 28, 2015 at 04:29:52PM +0800, Baoquan He wrote:
[..]
+adjust_boot_dir() +{
- #If user specify different boot dir then /boot, he need take care of
- # the whole thing like /boot//ostree/rhel-atomicxxxx/vmlinuz-xxx
- [ $KDUMP_BOOTDIR != "/boot" ] && return
eval $(cat /proc/cmdline | grep "BOOT_IMAGE" | cut -d' ' -f1)
This is assuming that BOOT_IMAGE is always first field in the command line. I think one should always be able to change the order by simple editing of grub.cfg. So let us not make this assumption.
I discussed this yetoday with Bao, finally we found that grub is passing the BOOT_IMAGE as 1st cmdline param.
linux16 /vmlinuz.. linuxefi /vmlinuz...
The first param is the kernel file, grub will convert it to BOOT_IMAGE=/vmlinuz... and then pass to kernel for booting.
If you specify vmlinuz not as 1st param to linux16/linuxefi then kernel boot will fail. So this should be ok to me.
Thanks Dave