openSUSE:YaST2 And Perl Bootloader Grub2 Modules Implement
This is wiki page to introduce to what I've done in implementing grub2 module for YaST and Perl Bootloader.
Principle
- Merely try to implement the missing modules in yast2 and perl bootloader to support grub2 (compare: GRUB).
- Not to touch or patch grub2 package in order to achieve above goal.
- Use grub2 scripts for install bootloader and update config.
- No intrusive changes to common or core components thus no impact to what we have done to other modules (grub/lilo/elilo ..)
- perl-Bootloader is still in use **currently**. I agrees it's ugly and we'd better not use them anymore in the future. But consider the following things I still use them (otherwise I would have other trouble :().
- Easier to retain bug-fixes in it
- Less code and less intrusive to yast2 bootloader. As perl bootloader as a means of real bootloader installations and configuration for yast2, it has been used in yast2 as many common functions relies on it. This would means that I can't use those common functions and need to accomplish all tasks needed in the boot loader module. Besides, nasty changes has to be made in common functions if it's other module or common components needs it.
Features
- Proposed location installation and also offer the flexibility to change.
- As this is only thing we need to tell installation script (grub2-install) to know :)
- Use --force for installing on boot sector
- Installation summary
- Use generic mbr boot code other than Windows's if installed on boot sector.
The modules location in system
- YaST2 Bootloader
- /usr/share/YaST2/modules/BootGRUB2.ycp
- Perl Bootloader
- /usr/lib/perl-5/vendor_perl/5.14.2/Bootloader/Core/GRUB2.pm
ToDo
grub2-efi
The work on modules that support grub2-efi installation is in progress.
widgets for manipulating options
It would be great that yast2 bootloader could provide widgets for editing the options. Now you have to manually edit the grub2 options and generate new config for it.
vi /etc/default/grub grub2-mkconfig -o /boot/grub2/grub.cfg
Also it has to consider adopting sysconfig settings (eg /etc/sysconfig/bootloader) into grub2 options.
This should not be the business of yast2/perl bootloader for now. Most work should be done in grub2 package (or in another new package) in order to support it. But yast2/perl bootloader might have to manage relevant settings if necessary.
List of open bugs
Bug 750897 grub2-install failed to install to extended partition