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.
I just installed Slackware 14.1. I selected MBR something along the way. It asked if I wanted to setup LILO, I selected no because I want to use GRUB2 but setup never asked to set it up afterwards. So now when I boot I get "operating system not found".
How do I make grub work now? I assumed setup would ask me. Do I have to use LILO then?
This should give you a basic grub.cfg file. Check it with a text editor like vi, nano, or emacs, and then run:
grub-install /dev/sda
Remember Grub2 uses a shell script layout of the grub.cfg file. If you need to edit it in any way, edit the /etc/defaults/grub file, then regenerate the grub.cfg and reinstall grub back to the MBR.
I changed the grub.cfg to disable the graphical font. Now I'm just trying to edit the grub boot menu options. Should I edit /boot/grub/grub.cfg directly to remove boot menu options I don't want to see? I'd like to rename them too.
I'm building up a slackware server for the first time since Slackware 10. I'm glad nothing has changed, it's still the best.
You're better off not editing grub.cfg unless you are absolutely sure you know what you're doing. Easy way to end up with a non-bootable system.
If you need to edit anything, edit /etc/defaults/grub only. Editing grub.cfg is not recommended, even if the naming of the operating systems is awkward.
What exactly are you trying to hide from the menu?
I see like 4 entries, I'd like it reduced to 2, the original "Slackware 14.1" and the "Advanced options for Slackware 14.1". It seems to have added it twice. If I can't edit grub.cfg directly how do I update and manage these menu options?
One set of entries is for the Huge kernel and the other is for the Generic kernel. You'd have to find the package for the kernel you don't want, uninstall it, and then regenerate grub again.
Remember Grub2 uses a shell script layout of the grub.cfg file. If you need to edit it in any way, edit the /etc/defaults/grub file, then regenerate the grub.cfg and reinstall grub back to the MBR.
Just a minor correction, it is not necessary to re-install to the MBR every time you change a setting, regenerating the config file is sufficient.
Just a minor correction, it is not necessary to re-install to the MBR every time you change a setting, regenerating the config file is sufficient.
That was Grub-Legacy where you could edit /boot/grub/grub.lst and not have to regenerate. Grub-Legacy read the /boot/grub/grub.lst file upon boot and generated the menu from that file.
Grub2 works completely different and uses a method that requires regeneration of the file and reinstallation. It does read some files from /boot/grub/* but mostly only the modules it uses for VBE and fonts.
That was Grub-Legacy where you could edit /boot/grub/grub.lst and not have to regenerate. Grub-Legacy read the /boot/grub/grub.lst file upon boot and generated the menu from that file.
Grub2 works completely different and uses a method that requires regeneration of the file and reinstallation. It does read some files from /boot/grub/* but mostly only the modules it uses for VBE and fonts.
How odd. I've recently re-generated the grub.config file by running grub-mkconfig and things booted up just fine. (The was to find the partition that holds a Kubuntu installation that I use to log into work.)
So unless you are embedding the config file into your boot image, you don't have to do a re-install each time.
I've always installed Grub to the /dev/sda master boot record which is the recommended method. I've never installed Grub into it's own partition.
Neither have I. I *do* have a /boot partition that isn't a logical volume.
You can still bring up a command line as part of the Grub2 boot process to fix boot problems, so I don't see why changing the config file would force a re-install.
I have been booting Slackware from Lubuntu's grub2 for some time now.
My solution is to create a custom grub2 boot file in /etc/grub.d/ directory.
The file is named 31_Slackware64-14.1 so that it ends up at the bottom of the grub boot menu.
The contents of the file is this:
Code:
echo "Adding Slackware64-14.1 on /dev/sda5" >&2
cat << EOF
##!/bin/sh
#exec tail -n +3 $0
menuentry "Slackware64-14.1 on /dev/sda5" {
set root=(hd0,5)
linux /boot/vmlinuz-generic-3.10.17 root=/dev/sda5 ro
initrd /boot/initrd.gz
}
EOF
This allows me to boot the Slackware 14.1 generic kernel. Be sure to make this file executable.
Ubuntu also creates 4 entries in the grub boot menu for Slackware. It is confusing. This is why I use my custom boot file in /etc/grub.d/ to boot the Slackware generic kernel.
Note that the only parts of that file that you really need are the parts that I have made bold here.
I vaguely remember having to reinstall grub2 to get changes to take place when grub first came out but I think that changed after a few updates to grub2
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.