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.
Although GRUB has its advantages, it can be a PITA to set up and configure. And now with GRUB2 it's even more confusing. Do you run grub-setup or grub-install? Or is it install-grub? Do you start counting the hard drives and partitions at 0 or 1? Do you use the menu.lst file in /boot/grub or do you now tinker with the scattered files in /etc/grub.d? It used to be if you made changes you could just restart and the changes were there. That used to be a supposed advantage over LILO. Now, you have to, what, run update-grub? Or is it grub-update? Same thing as having to run lilo after editing its configuration file so that advantage to GRUB is no more.
I haven't touched it because I don't use it (so I can't test it): what I don't touch is what's in slackbuilds.org repository for 13.37, that's not guaranteed to work on current; maybe you're referring to crocket's version for 13.37.
If you test it and can guarantee that upversioning to 2.00 is enough to make it work on -current, I can update it
Well, I have built it on two different computers now & it has worked fine. The dependencies have not changed & I have done none of the work on the SlackBuild files that it needs, but the result is good.
Regards,
Bill
Although GRUB has its advantages, it can be a PITA to set up and configure. And now with GRUB2 it's even more confusing. Do you run grub-setup or grub-install? Or is it install-grub? Do you start counting the hard drives and partitions at 0 or 1? Do you use the menu.lst file in /boot/grub or do you now tinker with the scattered files in /etc/grub.d? It used to be if you made changes you could just restart and the changes were there. That used to be a supposed advantage over LILO. Now, you have to, what, run update-grub? Or is it grub-update? Same thing as having to run lilo after editing its configuration file so that advantage to GRUB is no more.
PITA, I tell ya, PITA! :-)
Well, it's a PITA at the moment because there are no slackware-specific os-probe scripts. Once you have one, it's pretty simple to set up.
Well, it's a PITA at the moment because there are no slackware-specific os-probe scripts. Once you have one, it's pretty simple to set up.
Actually the current probe scripts work reasonably well even now. The only problem is that '10_linux' from '/etc/grub.d/' expects certain naming for initrd files (presumably based on how other distros name them). You can either adjust '/etc/grub.d/10_linux' directly and tell it to look for initrd.gz in addition to the other naming formats or just rename your initrd.gz to one of the names it expects. Several naming formats are supported, e.g. initrd-kernel-release. So if you were using 32Bit Slackware 13.37 with vmlinuz-generic-smp-2.6.37.6-smp then you could issue the following:
Code:
# mv /boot/initrd.gz /boot/initrd-2.6.37.6-smp
(Another alternative is to use the '-o' switch of mkinitrd to output a name like this in the first place).
Once you have either tweaked /etc/grub.d/10_linux or given your initrd a name in the format it currently expects, grub-install and grub-mkconfig work as expected.
GRUB 2 tries to solve a lot of the same problems as UEFI. GRUB 2 would be great if we weren't going to have UEFI. Unfortunately I think Microsoft and a few big OEM PC manufacturers will force UEFI to be adopted on all new PCs. For that reason, GRUB 2 suffers from unfortunate timing. GRUB 2 will probably become unnecessary. In defense of GRUB 2, UEFI is even more complicated than GRUB 2, and it remains to be seen how well UEFI can automate the installation of new operating system boot loaders.
The thought of GRUB 2 and UEFI is rather daunting. However we are likely to see that situation for a while as BIOS based PCs are ubiquitous. I don't see the need for GRUB 2 to replace LILO. In my opinion, improving UEFI support would be more useful.
I would like to see Slackware include "dmraid", and I hope that "mdadm" will support additional fake hardware RAID. UEFI and GRUB 2 may solve the booting from fake hardware RAID problem (not sure about that). Linux distros have few resources to support fake RAID, so booting is not the real issue. Software to understand the various RAID metadata formats is the issue.
I am also hoping that Slackware will include multilib, at least as an optional package. With KDE growing in size, it makes less sense to worry about the extra memory and disk space for multilib. Much more space could be saved by removing or reducing KDE software.
It might be time for Slackware to standardize on a different desktop environment, such as XFCE instead of KDE. KDE is the least static part of Slackware. KDE is likely to change frequently for the foreseeable future. With the last two Slackware releases, KDE has been the reason that I didn't use the releases. I had to quickly move to more current KDE versions, and along with that update other parts of Slackware. I like KDE. I think it has a lot of potential. But I also think that KDE will not be stable until the design is finished. I hope that KDE design changes stop because of a decision, and not simply because everyone tires of the never ending redesign.
All of those comments are from my own limited perspective. I'm sure that the many other Slackware users have unique concerns and preferences about the direction of Slackware. The important thing is to keep the tradition of Slackware being useful, reliable and straightforward.
Well, it's a PITA at the moment because there are no slackware-specific os-probe scripts. Once you have one, it's pretty simple to set up.
I know. I'm an old fart and just like to grouse sometimes. ;-) Even still, I don't think it's as simple as LILO.
Quote:
Originally Posted by Erik_FL
In my opinion, improving UEFI support would be more useful.
As someone who uses Slackware on a Macbook Pro, I can attest to this. UEFI is very temperamental and difficult.
Quote:
I am also hoping that Slackware will include multilib, at least as an optional package.
Personally, I don't see this happening. I have no inside information, but it's my impression that, like GNOME, since there is a good third-party resource for multilib (and you can't get much better than AlienBOB outside official Slackware), Pat will probably maintain the status quo.
Quote:
It might be time for Slackware to standardize on a different desktop environment, such as XFCE instead of KDE. KDE is the least static part of Slackware. KDE is likely to change frequently for the foreseeable future. With the last two Slackware releases, KDE has been the reason that I didn't use the releases. I had to quickly move to more current KDE versions, and along with that update other parts of Slackware. I like KDE. I think it has a lot of potential. But I also think that KDE will not be stable until the design is finished. I hope that KDE design changes stop because of a decision, and not simply because everyone tires of the never ending redesign.
Since Pat himself uses and enjoys KDE, I would bet that KDE will be part of Slackware for the forseeable future. And, again, AlienBOB provides an easy path for updating KDE for those that want to move beyond what ships with an official release - http://alien.slackbook.org/ktown/.
I'm not very much into technical details, but I can't see why grub shouldn't be default, since it's rather stable and, most important, it can handle a number of different boot configurations.
A boot loader with redundant file system drivers is just architecturally wrong. Having said that, the industry is moving in a totally crazy direction right now, with the abomination called EFI, that the architectural flaws and the bloat introduced by grub pale in comparison.
I've just tested it, adding the autodetect of initrd.gz (thanks ruario ), in a qemu host that has two slackware installs, one on /dev/sda1 and another on /dev/sdb1: I installed the package and then
maybe grub-mkconfig needs some more tweaking (but I'm not about to do it ) or this is the default behaviour (as I said, I don't use it)
EDIT: counter-order, it was my fault, the two virtual volumes got the same volume ID, and this was obviously confusing the poor grubby, with two different volume IDs all is ok.
I'll push it to my repository for -current soon, in the meantime please test it.
sorry, what do you mean with this? are you referring only to changing the VERSION number or there's more?
Sorry, this just means that I did not modify grub2.info, thus never tried to install it with sbopkg, although there should be no problems with that.
I have been running grub-mkconfig, editing the results to incorporate initab, putting my edits into 40_custom, removing execute permissions on 10_linux, adding them to 40_custom then rerunning grub-mkconfig. I'll have to look seriously into modifying 10_linux.
Regards,
Bill
#! /bin/sh -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}
bindir=${exec_prefix}/bin
libdir=/usr/lib64
. ${libdir}/grub/grub-mkconfig_lib
export TEXTDOMAIN=grub
export TEXTDOMAINDIR=@LOCALEDIR@
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"
It's a modified 10_linux script that attempts to match generic kernels with initrd images. It will attempt to match something like vmlinuz-generic-2.6.37.6 with initrd-generic-2.6.37.6.gz, but will fall back to initrd.gz if that's all it can find.
Tested on Slackware 64 and a relatively late version of Grub 1.99.
It is much less messier than digging in lilo.conf, although I admit that my motivation is mostly academic. I had mailed all my work to the SBo maintainer and to volkerdi.
Now I am booting from Grub 2.00. It also just works if properly configured, but I lost my splash image capability. That is not a priority right now and I am just an amateur.
Last edited by ChrisAbela; 07-01-2012 at 03:11 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.