Do not use KDE System Settings to configure GRUB 2 [Solved]

Compiz, KDE, Gnome, Fluxbox, etc...

Moderator: Moderators

Do not use KDE System Settings to configure GRUB 2 [Solved]

Postby Fitzcarraldo » Fri Oct 19, 2012 14:12

The GUI for configuring GRUB 2 in KDE System Settings is a KDE control module named kcm-grub2. It works with the GRUB 2 schema used in other distributions, but not with the GRUB 2 schema used in SL. Below I list the differences between GRUB 2 in Gentoo and in SL, which is why kcm-grub2 does not work in SL.

Gentoo GRUB 2:
Main directory used: /boot/grub2/
Directory in which GRUB 2 core.img file is stored: /boot/grub2/i386-pc/core.img
Command to install GRUB 2 in the MBR of HDD sda: grub2-install /dev/sda
Command to create grub.cfg file: grub2-mkconfig -o /boot/grub2/grub.cfg

Sabayon GRUB 2 before GRUB 2 Version 2.00:
Main directory used: /boot/grub/
Directory in which GRUB 2 core.img file is stored: /boot/grub/core.img
Command to install GRUB 2 in the MBR of HDD sda: grub2-install /dev/sda
Command to create grub.cfg file: grub-mkconfig -o /boot/grub/grub.cfg

Sabayon GRUB 2 now:
Main directory used: /boot/grub/
Directory in which GRUB 2 core.img file is stored: /boot/grub/i386-pc/core.img
Command to install GRUB 2 in the MBR of HDD sda: grub2-install /dev/sda
Command to create grub.cfg file: either 'grub-mkconfig -o /boot/grub/grub.cfg' or 'grub2-mkconfig -o /boot/grub/grub.cfg' (grub-mkconfig is a symlink to grub2-mkconfig)
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Do not use KDE System Settings to configure GRUB 2

Postby albfneto » Sun Oct 21, 2012 20:48

I know this. I know that kcm-grub package not works in Sabayon, but prior your post, i had in mInd that as a bug in the package.
Thanks for the info.

Another package that sometimes gives problems for the begginers is the "Groups and Users" client under KDE, The KUser. Sometimes it changes permissions and modify the "sudo" configurations and root/user passwords, behaviour of the graphical Sudo etc...i dont reccomend KUser, specially in old versions.
ALBERTO FEDERMAN NETO
albfneto
[email protected]
Favorite Distros: Sabayon, Gentoo, Mageia and OpenSUSE
User avatar
albfneto
Sagely Hen
 
Posts: 1705
Joined: Fri Nov 16, 2007 1:15
Location: Ribeirão Preto City, São Paulo State, Brazil

Re: Do not use KDE System Settings to configure GRUB 2

Postby cmost » Fri Oct 26, 2012 17:07

Good to know! Thank you Fitzcarraldo for explaining the differences.
AMD Phenom II 64 X6 1090T Black Edition
8192 MB DDR2 RAM
nVidia GeForce GTX 660 w 2048 MB DDR5
Sabayon 2014.x 64 Bit KDE
"Better to remain silent and be thought a fool than to speak out and remove all doubt." -- Abraham Lincoln
cmost
Advanced Hen
 
Posts: 208
Joined: Wed Dec 13, 2006 22:25
Location: Cincinnati, OH

Re: Do not use KDE System Settings to configure GRUB 2

Postby Fitzcarraldo » Sat Nov 02, 2013 0:18

Just to let people know that, from sys-boot/grub-2.00_p5107-r1 and onwards, Gentoo changed the GRUB 2 directory from /boot/grub2/ to /boot/grub/ (see the section 'Gentoo GRUB 2' in my first post of this thread). So the situation for Gentoo is now as follows:

Gentoo GRUB 2 from 2.00_p5107-r1 onwards:
Main directory used: /boot/grub/
Directory in which GRUB 2 core.img file is stored: /boot/grub/i386-pc/core.img
Command to install GRUB 2 in the MBR of HDD sda: grub2-install /dev/sda
Command to create grub.cfg file: grub2-mkconfig -o /boot/grub/grub.cfg

I don't know yet whether kde-misc/kcm-grub2 developer Konstantinos Smanis (Artemis_Fowl/ksmanis on IRC) has updated kcm-grub2 to work with the new Gentoo version of GRUB 2 and, if it has or will be updated, whether kcm-grub2 would then work with the Sabayon GRUB 2.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Do not use KDE System Settings to configure GRUB 2

Postby lxnay » Sat Nov 02, 2013 11:35

It looks like kcm-grub2 should improve its own robustness... There are proper ways to ask grub2 about its build time config...
Image
Join us on IRC (chat.freenode.net #sabayon or WebChat)
Submit bugs to our Bug Tracker
Follow me on Twitter
Add me on Facebook
Add me on Google+
lxnay
Land Owner
 
Posts: 3595
Joined: Thu Oct 13, 2005 23:16
Location: Italy

Re: Do not use KDE System Settings to configure GRUB 2

Postby Fitzcarraldo » Sat Nov 02, 2013 17:35

On 2 November 2013 at 09:55 Konstantinos wrote:
Hello!

Starting with v0.6.4 (more specifically per this commit: http://commits.kde.org/kcm-grub2/f00845 ... b155be478b) any GRUB2 directory structure is supported, through the GRUB_FOO CMake cache variables as documented in the INSTALL file.

The Gentoo package (=kde-misc/kcm-grub2-0.6.4) does not make use of this new, flexible structure and won’t work properly (because GRUB_ENV and GRUB_MEMTEST are pointing to wrong files). /boot/grub/grub.cfg is a symlink to /boot/grub2/grub.cfg so GRUB_MENU won’t be affected, although it would be still pointing to the old file. You should poke your friendly package maintainer and ask for a better ebuild. :-) To answer your second question, kcm-grub2 can work in Sabayon any time, as long as a proper package is created.

Starting with this version I will consider GRUB-naming-scheme-related bugs as packaging issues because it really is a pain in the ass to detect every different directory structure. The 2 most prominent directory structures are auto-detected (vanilla GRUB2 and the ’2′ suffix, as in grub2-foo-exe, /boot/grub2/ etc.) but for all the other cases, the packager should explicitly specify the GRUB2 directory structure of his distribution.

https://ksmanis.wordpress.com/projects/grub2-editor/
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Do not use KDE System Settings to configure GRUB 2

Postby lxnay » Sat Nov 02, 2013 19:29

Ok, cool. It can be fixed then
Image
Join us on IRC (chat.freenode.net #sabayon or WebChat)
Submit bugs to our Bug Tracker
Follow me on Twitter
Add me on Facebook
Add me on Google+
lxnay
Land Owner
 
Posts: 3595
Joined: Thu Oct 13, 2005 23:16
Location: Italy

Re: Do not use KDE System Settings to configure GRUB 2

Postby lxnay » Sun Nov 03, 2013 12:15

Image
Join us on IRC (chat.freenode.net #sabayon or WebChat)
Submit bugs to our Bug Tracker
Follow me on Twitter
Add me on Facebook
Add me on Google+
lxnay
Land Owner
 
Posts: 3595
Joined: Thu Oct 13, 2005 23:16
Location: Italy

Re: Do not use KDE System Settings to configure GRUB 2

Postby Fitzcarraldo » Sun Nov 03, 2013 21:34

Well done!

I created kcm-grub2-0.6.4-r1.ebuild in my local overlay to work with >=sys-boot/grub-2.00_p5017-r2 in the main Portage tree on my main laptop running Gentoo:

Code: Select all
# tail -n 18 /usr/local/portage/kde-misc/kcm-grub2/kcm-grub2-0.6.4-r1.ebuild

src_configure() {
local mycmakeargs=(
-DWITHQApt=OFF
-DGRUB_INSTALL_EXE=/usr/sbin/grub2-install
-DGRUB_MKCONFIG_EXE=/usr/sbin/grub2-mkconfig
-DGRUB_PROBE_EXE=/usr/sbin/grub2-probe
-DGRUB_SET_DEFAULT_EXE=/usr/sbin/grub2-set-default
-DGRUB_MENU=/boot/grub/grub.cfg
-DGRUB_CONFIG=/etc/default/grub
-DGRUB_ENV=/boot/grub/grubenv
-DGRUB_MEMTEST=/etc/grub.d/39_memtest86+
$(cmake-utils_use_with packagekit QPackageKit)
$(cmake-utils_use_with imagemagick ImageMagick)
$(cmake-utils_use_with hwinfo HD)
)
cmake-utils_src_configure
}

The modified kcm-grub2 works a treat in my Gentoo installation but I don't have access to an installed SL KDE at the moment so I can't try out your kcm-grub2-0.6.4::sabayon with grub-2.00-r5::sabayon, but no doubt it will work fine in SL when the Entropy package becomes available. Looks like SL KDE users will soon be able to use kcm-grub2 at last.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Do not use KDE System Settings to configure GRUB 2

Postby Fitzcarraldo » Fri Dec 13, 2013 13:17

Now this has been fixed in the SL ebuild, and the built package is in all the SL Entropy repositories, I'll 'un-sticky' this thread and mark it as solved.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Return to 3D Desktops and Window Managers

Who is online

Users browsing this forum: No registered users and 2 guests

cron