First post here and a HowTo already? Quick explanation - I'm an XP refugee but over the last couple of years have been playing with various Linux distros as an alternative for use both at home and at work where I have 3 and 4 machines networked, respectively. This forum has been of particular use to me over this time so I thought I'd actually register and try to return some of what I've gained here.
No doubt there would have been easier ways for a Linux novice but the purity of Debian appealed to me so in April this year the changeover began. Home was no problem with just a straight switch to Wheezy but work has been something of an exercise with one machine running nothing else but a dedicated proprietary application on XP (which it can now do forever since it's now isolated from the outside world). The other challenge was/is an MS Access database application that I've developed over quite some years and which very effectively is the core to running the business. So, initially there was a need to dual boot all machines. Simple enough, but on mine I'm running XP still, Debian in a stable configuration plus another instance of Debian which is where I do any testing/development. That instance is periodically wiped and reinstalled fresh as I undo my mistakes and start again. Each time I reinstall, though, Grub reorders the menu priorities placing the testing installation at the top of the menu as the default, which is not what I want.
So, I have a need to reconfigure Grub regularly and in one of my forays into Ubuntu I came across Grub Customizer which is a very handy GUI utility to quickly and easily reconfigure Grub, but from the stable installation of Debian. The problem, of course, is that Grub Customizer was developed for Ubuntu and isn't in the Debian repository. So, how to install this without breaking Debian? Numerous Google searches showed that I wasn't the only one in this situation but none of the (very few) solutions that I came across actually worked for me. Eventually, however, I did find a solution and the purpose of this post is to document that here where others might find it and avoid the frustrations and mistakes that I made.
Now I do realise that installing Grub Customizer isn't the pure Debian way. For the purists I'm not recommending this if you're not happy with the concept, but for many an OS is the means to an end, a tool that we use to do what we have to do. If you fall into this category then I hope the following is useful. Oh, and I don't lay any claim to having developed this. It was in a ReadMe file in one of my failed installations. Google has a much better chance of finding it here, though.
One thing. You MUST run Step 3 as root, sudo is not sufficient.
The following was not required on my system (may apply to other distributions).If you are not using Ubuntu (or one of its derivates) you cannot use the ppa to install Grub Customizer. To install it anyway, you have to download and compile the sources. All the following lines starting with $ are shell commands - open a terminal and execute them (but don't copy the $ )!
Make sure your grub2 contains the grub-mkconfig script (included since version 1.97).
# step one: Install these packages:
* cmake
* g++ OR gcc-c++
* libgtkmm-3.0-dev OR gtkmm30-devel [when using the gtk-2 version you need libgtkmm-2.4-dev OR gtkmm24-devel]
* gettext
* libssl-dev OR openssl-devel
* libarchive-dev OR libarchive-devel
(The package names may be different, depending on the distribution they are using on)
# step two: download the sources:
download the tar.gz-package here: https://launchpad.net/grub-customizer/+download
…and extract its contents.
# step three: compile the sources:
Go into the source directory extracted from the tar.gz file, then run
$ cmake . && make
If you get a cmake version error, try to set the "cmake_minimum_required" value to your installed version - I only written down the lowest tested version, so older versions may be compatible too.
# step four: install some (optional) runtime dependencies:
* hwinfo
# step five: install Grub Customizer
$ sudo make install
Then you can start Grub Customizer using the menu or by running `gksu grub-customizer` / `sudo grub-customizer`
Enjoy.On some distributions, this may fail ("bootloader not found"), because some of the commands / directories doesn't exist on the expected names. Please make sure, these commands are accessible:
grub-mkconfig
grub-install
and these pathes/files:
/etc/grub.d
/boot/grub
/boot/grub/grub.cfg
/etc/default/grub
If not, there may be alternative commands/pathes, if Grub2 is installed. Please try to find them out and create a config file at /etc/grub-customizer/grub.cfg containing this content (the values of this example are valid on fedora 16 - change them, if they are different):
MKCONFIG_CMD=grub2-mkconfig
INSTALL_CMD=grub2-install
MKFONT_CMD=grub2-mkfont
CFG_DIR=/etc/grub.d
OUTPUT_DIR=/boot/grub2
OUTPUT_FILE=/boot/grub2/grub.cfg
SETTINGS_FILE=/etc/default/grub
DEVICEMAP_FILE="/boot/grub2/device.map"
MKDEVICEMAP_CMD="grub2-mkdevicemap --device-map=/dev/stdout"