LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-07-2013, 09:08 PM   #1
kenw232
Member
 
Registered: May 2006
Posts: 44

Rep: Reputation: 0
GRUB2 in 14.1?


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?
 
Old 11-07-2013, 09:25 PM   #2
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,860
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
To use Grub2 you have to rescue boot as shown on the DVD install boot screen with your main Linux HDD partition.

Then, after you boot successfully, run this command sequence:

mkdir /boot/grub
grub-mkconfig -o /boot/grub/grub.cfg

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.

Last edited by ReaperX7; 11-07-2013 at 09:27 PM.
 
1 members found this post helpful.
Old 11-07-2013, 09:34 PM   #3
kenw232
Member
 
Registered: May 2006
Posts: 44

Original Poster
Rep: Reputation: 0
I found it at http://docs.slackware.com/howtos:sla..._first_install

But now the GRUB2 loading screen has a really big and ugly font. How do I just make the font 80x25 as normal? I'm new to grub.
 
Old 11-07-2013, 09:40 PM   #4
kenw232
Member
 
Registered: May 2006
Posts: 44

Original Poster
Rep: Reputation: 0
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.
 
Old 11-07-2013, 09:45 PM   #5
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,860
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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?
 
Old 11-07-2013, 10:42 PM   #6
kenw232
Member
 
Registered: May 2006
Posts: 44

Original Poster
Rep: Reputation: 0
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?
 
Old 11-08-2013, 11:10 AM   #7
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,860
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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.
 
Old 11-08-2013, 05:24 PM   #8
neymac
Member
 
Registered: May 2009
Distribution: Slackware64-14.0
Posts: 115

Rep: Reputation: 11
I use a dedicated GRUB 2 partition for years, and no regrets up to now, and I edit the file grub.cfg (menus entry without problems). A hint how to do it -> http://rxezlqu.wordpress.com/2010/04...oot-partition/.

PS: as ReaperX7 said - "You're better off not editing grub.cfg unless you are absolutely sure you know what you're doing."

Last edited by neymac; 11-08-2013 at 05:41 PM.
 
Old 11-08-2013, 06:10 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,407
Blog Entries: 2

Rep: Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994
Quote:
Originally Posted by ReaperX7 View Post
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.
 
Old 11-09-2013, 04:40 PM   #10
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,860
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by TobiSGD View Post
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.
 
Old 11-09-2013, 05:25 PM   #11
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,428

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Quote:
Originally Posted by ReaperX7 View Post
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.
 
Old 11-09-2013, 10:33 PM   #12
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,860
Blog Entries: 15

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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.
 
Old 11-09-2013, 11:20 PM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,428

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Quote:
Originally Posted by ReaperX7 View Post
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.
 
Old 11-09-2013, 11:58 PM   #14
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,229

Rep: Reputation: 286Reputation: 286Reputation: 286
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.
 
Old 11-10-2013, 08:47 AM   #15
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,342

Rep: Reputation: 184Reputation: 184
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub2 can't see my win 7 partition and yast2 bootloader can't reinstall grub2 jjrojaspy Suse/Novell 5 07-07-2013 10:38 PM
Need help on Grub2 rng Linux - General 2 07-30-2012 08:39 AM
kcm-grub2 - No valid GRUB2/BURG installation could be detected cristi92b Linux - Newbie 2 06-14-2012 08:01 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
grub2 mbvo Slackware 7 11-12-2009 06:06 AM


All times are GMT -5. The time now is 11:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration