Anyone else on UEFI ditched ELILO for GRUB2 + GPT?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slack64-current, Slack64-14.1, Slack-13.37, RISC OS
Posts: 16
Rep:
Anyone else on UEFI ditched ELILO for GRUB2 + GPT?
Just wondering if anybody else who moved to Slackware64 on UEFI decided to ditch ELILO and manually setup GRUB2 with GPT?
For the longest while on Slackware32 I've been using LILO on BIOS and having simple and stress-free booting but I think ELILO is just a bit of a mess and was causing lots of stressful and avoidable problems. It also gave me no end of issues when trying to use KMS for my Intel chipset.
I think ELILO is just clinging to the past a little bit, one hack at a time. With UEFI the new de-facto standard I really think it's time to look for a better boot solution that's fully-featured and mature, and I don't think ELILO is it.
My GRUB2 is purely functional and not pretty (not that is matters for about 2 whole seconds before Linux boots) but if anybody has setup theirs up to be a bit fancy I'd love to see your config, please share!
I used elilo for a while but switched to grub2.
Since i'm not that used to grub it was a bit of a headache to set up but that was mostly my inexperience.
Actually grub2 was pretty easy to set up, i followed the archwiki and even set up my windows install in grub but i haven't used it more then testing that it worked.
I've been using grub2 since about 1.91. My present computer is 64 bit with GPT.
Nothing fancy. I just installed the Slackware package and away it went.
I do set the grub.d files 10_linux, 20_linux_zen, 30_osprober permissions to 644
and list bootable partitions in 40_custom. Gives a very plain menu.
It's just a matter of situation and use case, as explained by Rod Smith. This being said, whilst grub is of more broader usage, shipped with elilo comes efibootmgr, that has still no equivalent that I know of to configure your firmware's boot menu (instead of setting a boot menu on a hard disk, as do grub). This has the advantage that your machine will continue to boot if you replace the hard disk where grub could else have installed a boot loader. This make use or a specific UEFI feature, that is the ability to set the firmware's menu from the OS. This being said, there are plenty of other tools that one could consider, see the aforementioned article that gives a practical overview of the landscape.
Just use what fits your needs and taste, there is no absolute answer to "which is better".
I've been using this rather shameless ripoff of grub2's /etc/grub.d/10_linux script for a while. I call it /etc/grub.d/09_slackware_linux
Code:
#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
. "${datarootdir}/grub/grub-mkconfig_lib"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') ${CLASS}"
fi
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
esac
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
linux_entry ()
{
os="$1"
tag="$2"
version="$3"
recovery="$4"
args="$5"
if ${recovery} ; then
title="$(gettext "s, with Linux %s [%s] (recovery mode)")"
else
title="$(gettext "%s, with Linux %s [%s]")"
fi
printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}" "${tag}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
&& grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
cat << EOF
set gfxpayload=keep
EOF
fi
else
cat << EOF
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
fi
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo $(printf "$(gettext "Loading Linux %s ...")" ${version})
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
echo $(gettext "Loading initial ramdisk ...")
initrd ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
}
process_list ()
{
mylist="$1"
tag="$2"
initrd_allowed="$3"
while [ "x$mylist" != "x" ] ; do
linux=`version_find_latest $mylist`
echo "Found linux image: $linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
if [ "x${initrd_allowed}" = "xtrue" ]; then
for i in "initrd-${version}.gz" "initrd.gz" \
"initrd.img-${version}" "initrd-${version}.img" \
"initrd-${version}" "initrd.img-${alt_version}" \
"initrd-${alt_version}.img" "initrd-${alt_version}"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2
else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi
else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi
linux_entry "${OS}" "${tag}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${tag}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi
mylist=`echo $mylist | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done
}
prepare_boot_cache=
list=`for i in /boot/vmlinu[xz]-generic-* /vmlinu[xz]-generic-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
process_list "${list}" "generic" "true"
list=`for i in /boot/vmlinu[xz]-huge-* /vmlinu[xz]-huge-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
process_list "${list}" "huge" "false"
I run the 64 bit version of slackware; the above script will probably require a minor edit to work for 32 bit slackware.
Last edited by Richard Cranium; 11-29-2015 at 10:36 PM.
Reason: Left something out.
I use grub on a server with bios but with gpt disks in raid10. Lilo didn't work and difficult to debug since this is a remote headless server. In grub I don't use the grub-mkconfig script, instead I use a very simple and clear file /boot/grub/grub.cfg:
Code:
set default=0
set timeout=0
search --set=root --label BOOT
menuentry "Linux" {
linux /vmlinuz root=LABEL=ROOT ro nomodeset ipv6.disable=1 quiet
initrd /ucode.cpio /initrd.gz
}
(Here BOOT and ROOT are labels of the partitions /boot and /, /boot/ucode.cpio is the Intel microcode.)
Just wondering if anybody else who moved to Slackware64 on UEFI decided to ditch ELILO and manually setup GRUB2 with GPT?
I have used slackware64's grub-2.00 with UEFI boot, and it works OK (it will also dual boot windows with the right recipe, although windows auto-detection doesn't work), but I much prefer rEFInd. It is considerably nicer than grub with UEFI in my view.
On my MacBook Pro I use no bootloader other than rEFind. No elilo, no syslinux, no grub2. I just have the kernel on the hard disk and rEFind finds it and is able to boot into it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.