|
Bugzilla – Full Text Bug Listing |
| Summary: | Yast Grub 2 Boot Loader is missing the Section Field for editing | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.2 | Reporter: | Roman Bysh <rb03884> |
| Component: | YaST2 | Assignee: | Michael Chang <mchang> |
| Status: | VERIFIED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | Eduard.Avetisyan, jcheung, rb03884, vmicho |
| Version: | Beta 2 | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Roman Bysh
2012-06-27 19:28:17 UTC
grub2 is not feature compatible to grub, so this might not be possible to do. It's unfortunate. I know practically everybody is going to request this feature. We really need a way of renaming the boot entry. Especially for the boot manager. Especially in uefi where the name is displayed on boot manager. If you can provide an 'edit field' for "Section Field" via Yast Boot Loader, openSUSE will have something other distros do not have. I posed this question on the Factory mail list and a positive response was provided on the link below: http://lists.opensuse.org/opensuse-factory/2012-06/msg01068.html Roman, I've done with it, and sent pull request to Steffen. https://github.com/yast/yast-bootloader/pull/5 I think Andrea is right, we can't offer 100% clone of Grub1's "per" section management feature, because to do that we have to bypass the entire grub2's scripts and sneak into grub.cfg .. that's bad idea and breaks grub2's integrity => no warranty! We could only focus on the exposed options by grub2, that is what presents in /etc/default/grub. But thanks for your idea and following it. :) (In reply to comment #3) > Roman, > I've done with it, and sent pull request to Steffen. > https://github.com/yast/yast-bootloader/pull/5 Oh, that is to edit GRUB_DISTRIBUTOR, as we discussed on factory. Is your new feature the same as what is done by the kcm-grub module? Follow Up Our problem is when the kernel gets upgraded or downgraded. The entry shown in the Grub2 boot menu always changes. And, the entry appears quite long. (In reply to comment #5) > Is your new feature the same as what is done by the kcm-grub module? In the beginning when survey grub2's feature, I tried kcm-grub and at that time I found they didn't provide the section management feature like we have in yast2-bootloader. So I think the answer is yes for me. But it's a while ago and I didn't check with current kcm-grub. (In reply to comment #6) > Follow Up > > Our problem is when the kernel gets upgraded or downgraded. The entry shown in > the Grub2 boot menu always changes. And, the entry appears quite long. The config is generated and the entire content depends on your system's status. The title is made of your "distributor" setting and the kernel version it will boot. Kernel version changes, the title changes. Unfortunately this is not the grub2 feature you want. It's not likely to view from a bug's perspective , but a custom feature's perspective to me. We know we have to shape grub2 more friendly to openSUSE, but not all can be done easily and nevertheless we have to maintain the changes, we have to balance them. The discussion brings me back to the early stage when I tried to make yast to support grub2, In first version I did try to keep the features in section management and in order to achieve that I did many intrusive changes to grub2 packages. I think the "dead body" may still lay somewhere in my home project (not sure if they were deleted by systems automatically). The final decision is a new version, which not try to do those those hacky changes (like what I described in my wiki page) to grub2, they would be our burden, in terms of maintainability, For me, I support the decision that time and don't want to reincarnate those ugly changes either. Thanks. Agreed. Sure would be nice to see screenshots of your first version. I know you're under the gun so there's only so much time to get things done. IMHO I think over the next couple of versions we'll see a finely tweaked Yast2 Boot Loader. N'est pas? Maybe a new openSUSE-specific "config" file can be created that can be linked to Grub2? Pipe dream? I can confirm. It gets really annoying as you cannot edit dual/triple boots. I've installed 12.2b2 on a separate root partition, with common /boot partition (from 11.3) and somewhat I've got about 5-6 entries in grub menu (11.3, 12.2, XP), but cannot edit them in Yast. In short, it's not YaST but grub2's config (NOT /boot/grub2/grub.cfg, but /etc/default/grub) not offer as the capability to do that. If anyone could make the config capable to do that and accepted by upstream, who will be my hero, then I'm happy to do that in YaST. Don't ask me to do that because I tried before and gave up. (see comment #8) :( May I suggest that the Yast Boot Loader create a separate file. The file can use a name such as "05_yast-bl" and saved to /etc/grub.d/. So long as it's saved to /etc/grub.d/05_yast-bl, the user will be able to rename the menuentry field. Follow Up It's something to consider for future releases of openSUSE. (In reply to comment #12) > May I suggest that the Yast Boot Loader create a separate file. The file can > use a name such as "05_yast-bl" and saved to /etc/grub.d/. > > So long as it's saved to /etc/grub.d/05_yast-bl, the user will be able to > rename the menuentry field. Could you please illustrate your idea more elaborate ? For example, how we could rename menuentry field via this 05_yast-bl ? Did it require a new config file like in /etc/default/grub_yast-bl that holds per menuentry specific information (And would allow yast to edit) ? How do you deal with the potential clash to the default config & scripts ? Thanks. Correction The file 05_yast-bl is saved to /etc/grub.d/ not /etc/default/. I did all of this manually and it works. The entire block of menuentry entries in grub.cfg are copied to the 05_yast-bl. I chmod -x 10_linux and os-prober. Since 05_yast-bl has a lower number than 10_linux, it will take precedence and there are no clashes. Now the user can name the menuentry to their liking. I ran the yast boot loader to update grub.cfg. You can also use grub2-mkconfig -o /boot/grub2/grub.cfg. When the user reboots they will see the revised boot menu. As long as there are no kernel updates the user will be satisfied. A custom script needs to be add so that when a newer version of the kernel is being installed you must chmod +x 10_linux and os-prober so that it can detected. I did this manually just to see if it worked. The changes should be reflected in grub.cfg. The script copies the changes to 05_yast-bl and the cycle gets repeated. Follow Up The file 05_yast-bl must include the following two lines at the top of the file: #!/bin/sh exec tail -n +3 $0 Roman, Thanks a lot for your effort on investigating this. But I'm sorry I can't do that, at least at this moment, as I think this is inherently a grub2's defect and our attempt to circumvent it would probably leave us alone .. :( Yast2 bootloader is not the only tools invented to support grub2, others like kcm-grub or Grub Customizer are there and may work better than yast2 bootloader. If you feel yast2 bootloader not satisfied then it's totally fine for me to pick them and ditch yast2 bootloader. At least, I'm confident in ensuring interoperability with them because we don't take any procedure that may potentially case conflicting. For ex, if you disable 10_linux and os-prober then other tools may have no idea on how to configuring grub2, as they have no knowledge to 05_yast-bl. I'm also seeing this as a defect in grub2. Possibly, an omission. All of these tools have to dance around the way the scripts have been written. And, it looks like - at least for now - we'll have to do the same until the grub2 code allows more flexibility. Yes? I like what has been done so far with the 12.2 Yast Boot Loader. Hopefully we can look into this in a future release of openSUSE. *** Bug 775212 has been marked as a duplicate of this bug. *** > (In reply to comment #3)
> > Roman,
> > I've done with it, and sent pull request to Steffen.
> > https://github.com/yast/yast-bootloader/pull/5
>
> Oh, that is to edit GRUB_DISTRIBUTOR, as we discussed on factory.
I can confirm that when I am at the Boot Loader Settings > Grub2 boot loader > Boot loader option in 12.3, I can edit the "Distributor Name".
Set it closed as fixed
|