Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
12-12-2016, 08:02 AM
#1
Member
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85
Rep:
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.
12-12-2016, 09:00 PM
#2
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858
What did grub-mkconfig output?
12-12-2016, 11:27 PM
#3
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
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 .
12-13-2016, 07:02 AM
#4
Member
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85
Original Poster
Rep:
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
12-13-2016, 08:51 AM
#5
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858
*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 .
12-13-2016, 09:03 AM
#6
Member
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85
Original Poster
Rep:
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 ###
12-13-2016, 10:06 PM
#7
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858
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.
12-13-2016, 10:20 PM
#8
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126
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.
12-13-2016, 10:53 PM
#9
Member
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85
Original Poster
Rep:
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
12-13-2016, 11:18 PM
#10
Member
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85
Original Poster
Rep:
According to the Ubuntu link grub cannot find the config file.
This is my prompt
prompt: GRUB 2 loaded modules but was unable to find the grub.cfg file.
12-13-2016, 11:22 PM
#11
Member
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85
Original Poster
Rep:
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.
12-13-2016, 11:38 PM
#12
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858
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 .
12-13-2016, 11:50 PM
#13
Member
Registered: Aug 2011
Location: Midwest-USA
Distribution: Slackware
Posts: 85
Original Poster
Rep:
I figured as much. Thanks for writing it.
All times are GMT -5. The time now is 08:01 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News