Dimitris Tassopoulos
2018-11-06 15:12:48 UTC
Hi all.
I'm working on bug #8729 and I'm trying to implement the multi-boot
functionality for grub.
I've partially done and I've created a virtual/grub-bootconf that can be
used like that:
PREFERRED_RPROVIDER_virtual/grub-bootconf = "grub-multibootconf"
That's working ok and installs the proper grub cfg script and the
environment files used for
the boot counter and other stuff.
The problem is that I've just hit the wall because it seems there are two
different facilities that
create the grub config file. One is the grub-efi & virtual/grub-bootconf.
But when an wic image is
build then this is overridden and a new partition is created which is also
mounted in the /boot
when the OS boots. The second facility is triggered by setting this in the
wks file:
--source bootimg-efi --sourceparams="loader=grub-efi"
In this case the bootimg-efi.py script creates the extra partition, a
different grub.cfg and also
edits the /etc/fstab and mounts this partition over /boot and therefore
virtual/grub-bootconf
becomes unused.
This raises the following questions:
- Why there are two different facilities to achieve the same thing?
- Why the second overrides the first one, instead of sharing the same files?
- How to proceed from now on?
In my opinion there should be only one facility that creates this and there
should be a common shared way for all the use cases.
I have a working example if anyone is interested.
Regards,
Dimitris
I'm working on bug #8729 and I'm trying to implement the multi-boot
functionality for grub.
I've partially done and I've created a virtual/grub-bootconf that can be
used like that:
PREFERRED_RPROVIDER_virtual/grub-bootconf = "grub-multibootconf"
That's working ok and installs the proper grub cfg script and the
environment files used for
the boot counter and other stuff.
The problem is that I've just hit the wall because it seems there are two
different facilities that
create the grub config file. One is the grub-efi & virtual/grub-bootconf.
But when an wic image is
build then this is overridden and a new partition is created which is also
mounted in the /boot
when the OS boots. The second facility is triggered by setting this in the
wks file:
--source bootimg-efi --sourceparams="loader=grub-efi"
In this case the bootimg-efi.py script creates the extra partition, a
different grub.cfg and also
edits the /etc/fstab and mounts this partition over /boot and therefore
virtual/grub-bootconf
becomes unused.
This raises the following questions:
- Why there are two different facilities to achieve the same thing?
- Why the second overrides the first one, instead of sharing the same files?
- How to proceed from now on?
In my opinion there should be only one facility that creates this and there
should be a common shared way for all the use cases.
I have a working example if anyone is interested.
Regards,
Dimitris