LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-12-2016, 08:02 AM   #1
alanware
Member
 
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85

Rep: Reputation: Disabled
GRUB2 on LVM - Defaults to CLI, No menu.


I am setting up Slackware64 14.2 on an SSD using LVM and GRUB. When I reboot the system it takes me to GRUB cli. I can boot to my install just fine, but have been unsuccessful in getting a menu to display or even booting directly into my install.

Insights appreciated.

Thanks.
 
Old 12-12-2016, 09:00 PM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
What did grub-mkconfig output?
 
Old 12-12-2016, 11:27 PM   #3
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
I blindly ran boot-repair-disk.iso on a 'broken' slackware14.2 & it 'auto-magically' fixed it!
IF it can connect to the internet, it will post 'all the info anyone could ever want' mine/mine

Last edited by Jjanel; 12-12-2016 at 11:49 PM.
 
Old 12-13-2016, 07:02 AM   #4
alanware
Member
 
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85

Original Poster
Rep: Reputation: Disabled
Code:
grub-mkconfig -o /boot/grub/grub.conf
Code:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-generic-4.4.14
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-huge-4.4.14
Found linux image: /boot/vmlinuz-huge-4.4.14
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-huge
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-generic-4.4.14
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-generic
Found initrd image: /boot/initrd.gz
done
 
Old 12-13-2016, 08:51 AM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
*sigh*

The output of grub-mkconfig is also what is written in /boot/grub/grub.conf, since you told grub-mkconfig to put it there.

Could we see that bit, too?

EDIT: Now that I think about it, does your box use UEFI or BIOS boot? If the former, I won't be able to help since none of my motherboards are UEFI, but I believe that you have to do something different with the conf file in that case. Hopefully someone will chime in if that's the case.

Last edited by Richard Cranium; 12-13-2016 at 08:54 AM.
 
Old 12-13-2016, 09:03 AM   #6
alanware
Member
 
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85

Original Poster
Rep: Reputation: Disabled
I am using BIOS boot. I did setup the SSD with an efi partition, but it is not in use.

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=dejavusansmono
else
insmod part_gpt
insmod lvm
insmod ext2
set root='lvm/slack-usr'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-usr'  c483f8ce-1c65-41c2-bccb-c57d5a9bc3ae
else
  search --no-floppy --fs-uuid --set=root c483f8ce-1c65-41c2-bccb-c57d5a9bc3ae
fi
    font="/share/grub/dejavusansmono.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=10
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/09_slackware_linux ###
menuentry "Slackware-14.2 GNU/Linux, with Linux 4.4.14 [generic]" --class slackware-14.2 --class gnu-linux --class gnu --class os {
	insmod part_gpt
	insmod lvm
	insmod ext2
	set root='lvm/slack-root'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
	else
	  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
	fi
	echo	Loading Linux 4.4.14 ...
	linux	/boot/vmlinuz-generic-4.4.14 root=UUID=c466688b-90de-4452-9675-c73cf09778da ro  
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.gz
}
menuentry "Slackware-14.2 GNU/Linux, with Linux 4.4.14 [generic] (recovery mode)" --class slackware-14.2 --class gnu-linux --class gnu --class os {
	insmod part_gpt
	insmod lvm
	insmod ext2
	set root='lvm/slack-root'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
	else
	  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
	fi
	echo	Loading Linux 4.4.14 ...
	linux	/boot/vmlinuz-generic-4.4.14 root=UUID=c466688b-90de-4452-9675-c73cf09778da ro single 
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.gz
}
menuentry "Slackware-14.2 GNU/Linux, with Linux 4.4.14 [huge]" --class slackware-14.2 --class gnu-linux --class gnu --class os {
	insmod part_gpt
	insmod lvm
	insmod ext2
	set root='lvm/slack-root'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
	else
	  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
	fi
	echo	Loading Linux 4.4.14 ...
	linux	/boot/vmlinuz-huge-4.4.14 root=/dev/mapper/slack-root ro  
}
menuentry "Slackware-14.2 GNU/Linux, with Linux 4.4.14 [huge] (recovery mode)" --class slackware-14.2 --class gnu-linux --class gnu --class os {
	insmod part_gpt
	insmod lvm
	insmod ext2
	set root='lvm/slack-root'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
	else
	  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
	fi
	echo	Loading Linux 4.4.14 ...
	linux	/boot/vmlinuz-huge-4.4.14 root=/dev/mapper/slack-root ro single 
}
### END /etc/grub.d/09_slackware_linux ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Slackware-14.2 GNU/Linux' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c466688b-90de-4452-9675-c73cf09778da' {
	load_video
	insmod gzio
	insmod part_gpt
	insmod lvm
	insmod ext2
	set root='lvm/slack-root'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
	else
	  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
	fi
	echo	'Loading Linux 4.4.14 ...'
	linux	/boot/vmlinuz-huge-4.4.14 root=/dev/mapper/slack-root ro  
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.gz
}
submenu 'Advanced options for Slackware-14.2 GNU/Linux' $menuentry_id_option 'gnulinux-advanced-c466688b-90de-4452-9675-c73cf09778da' {
	menuentry 'Slackware-14.2 GNU/Linux, with Linux 4.4.14' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.14-advanced-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux 4.4.14 ...'
		linux	/boot/vmlinuz-huge-4.4.14 root=/dev/mapper/slack-root ro  
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
	menuentry 'Slackware-14.2 GNU/Linux, with Linux 4.4.14 (recovery mode)' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.14-recovery-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux 4.4.14 ...'
		linux	/boot/vmlinuz-huge-4.4.14 root=/dev/mapper/slack-root ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
	menuentry 'Slackware-14.2 GNU/Linux, with Linux huge' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-huge-advanced-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux huge ...'
		linux	/boot/vmlinuz-huge root=/dev/mapper/slack-root ro  
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
	menuentry 'Slackware-14.2 GNU/Linux, with Linux huge (recovery mode)' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-huge-recovery-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux huge ...'
		linux	/boot/vmlinuz-huge root=/dev/mapper/slack-root ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
	menuentry 'Slackware-14.2 GNU/Linux, with Linux 4.4.14' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.14-advanced-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux 4.4.14 ...'
		linux	/boot/vmlinuz-generic-4.4.14 root=/dev/mapper/slack-root ro  
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
	menuentry 'Slackware-14.2 GNU/Linux, with Linux 4.4.14 (recovery mode)' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.14-recovery-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux 4.4.14 ...'
		linux	/boot/vmlinuz-generic-4.4.14 root=/dev/mapper/slack-root ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
	menuentry 'Slackware-14.2 GNU/Linux, with Linux generic' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-generic-advanced-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux generic ...'
		linux	/boot/vmlinuz-generic root=/dev/mapper/slack-root ro  
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
	menuentry 'Slackware-14.2 GNU/Linux, with Linux generic (recovery mode)' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-generic-recovery-c466688b-90de-4452-9675-c73cf09778da' {
		load_video
		insmod gzio
		insmod part_gpt
		insmod lvm
		insmod ext2
		set root='lvm/slack-root'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvm/slack-root'  c466688b-90de-4452-9675-c73cf09778da
		else
		  search --no-floppy --fs-uuid --set=root c466688b-90de-4452-9675-c73cf09778da
		fi
		echo	'Loading Linux generic ...'
		linux	/boot/vmlinuz-generic root=/dev/mapper/slack-root ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.gz
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
 
Old 12-13-2016, 10:06 PM   #7
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Hey, you used my script!

Those entries should work. I don't boot directly from an LVM volume; I still use an ext2 partition. Nonetheless, the menu entries should show up.

You should look at https://help.ubuntu.com/community/Grub2/Troubleshooting and see if that helps.
 
Old 12-13-2016, 10:20 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Looks like gpt (with BIOS, not UEFI) - you need to create a bios_grub partition (0xEF02 partition type).
Then grub-install again to write the core.img properly.
 
Old 12-13-2016, 10:53 PM   #9
alanware
Member
 
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85

Original Poster
Rep: Reputation: Disabled
I have a BIOS boot partition setup.

Code:
Part. #     Size        Partition Type            Partition Name
----------------------------------------------------------------
            1007.0 KiB  free space
   1        3.0 MiB     BIOS boot partition       BIOS boot partition
   2        300.0 MiB   EFI System                EFI System
   3        100.0 GiB   Linux LVM                 Linux LVM
            11.5 GiB    free space
 
Old 12-13-2016, 11:18 PM   #10
alanware
Member
 
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85

Original Poster
Rep: Reputation: Disabled
According to the Ubuntu link grub cannot find the config file.

This is my prompt

Code:
grub>
prompt: GRUB 2 loaded modules but was unable to find the grub.cfg file.
 
Old 12-13-2016, 11:22 PM   #11
alanware
Member
 
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85

Original Poster
Rep: Reputation: Disabled
I found my issue. My grub.cfg was named grub.conf. I simply renamed the file and it works. Thanks for you help. That grub troubleshooting link was very helpful. I did you use your script.
 
Old 12-13-2016, 11:38 PM   #12
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Sweet! I'm glad that your menus and stuff show up now.

EDIT: Hey, I wasn't trying to shame you into admitting that you used my grub script. I was just happy that someone was using it.

Last edited by Richard Cranium; 12-13-2016 at 11:41 PM.
 
Old 12-13-2016, 11:50 PM   #13
alanware
Member
 
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85

Original Poster
Rep: Reputation: Disabled
I figured as much. Thanks for writing it.
 
  


Reply



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
Centos 7: Customize GRUB2 menu to include options to boot GUI or CLI powerplyer Linux - Newbie 7 11-22-2015 07:59 PM
GRUB2 menulist configuration, root in LVM r4czek Linux - Newbie 2 09-20-2012 11:48 AM
[SOLVED] GRUB2 menu nasa_pete Linux - Newbie 3 06-12-2011 10:44 PM
GRUB2 - FreeBSD-8.0 does not show up in triple boot menu, dual boot menu it does.. wiliweld *BSD 7 05-03-2010 01:05 PM
How to add e menu entry to KDE start menu over CLI browny_amiga Linux - General 7 02-08-2009 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration