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.
root@revenge grub.d]# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# 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.
echo "Adding Slackware-current." >&2
cat << EOF
menuentry "Slackware-current" {
set root=(hd0,3)
linux /mnt/boot/vmlinuz-generic root=/dev/mmcblk0p3 ro quiet splash
initrd /mnt/boot/initrd.gz
}
EOF
[root@revenge grub.d]#
Where is the syntax error. grub-mkconfig -o /boot/grub/grub.cfg reports it. The command was
Code:
[root@revenge grub]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found Slackware 14.2 (pre-15.0 -current) on /dev/mmcblk0p3
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 223
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
[root@revenge grub]#
why are you using a custom file for slackwhere, grub doe not pick it up on its own?
do you have one of them laptops that has their "hdd" as a sd card setup, or are you using a SD Card plugged into your laptop SD Card Slot?
for current as it is right now grub shows it as slackwear 14.2+ for current.
[root@revenge grub]# cat grub.cfg
#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
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=unicode
else
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
font="/usr/share/grub/unicode.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_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
menuentry 'Arch Linux, with Linux linux-zen' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
menuentry 'Arch Linux, with Linux linux-zen (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-zen-fallback.img
}
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
}
### 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 ###
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class slackware --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-generic-4.14.34 root=/dev/mmcblk0p3
}
submenu 'Advanced options for Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' $menuentry_id_option 'osprober-gnulinux-advanced-ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-4.14.34--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-generic-4.14.34 root=/dev/mmcblk0p3
}
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-4.14.34--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-huge-4.14.34 root=/dev/mmcblk0p3
}
}
### 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.
menuentry "Slackware-current" {
set root=(hd0,3)
linux /mnt/boot/vmlinuz-generic root=/dev/mmcblk0p3 ro quiet splash
initrd /mnt/boot/initrd.gz
}
### 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 ###
[root@revenge grub]#
You see?, the os-prober puts the huge kernel, but I want the generic one to be booted!
You say that's the submenu I should use? But where is the initrd line? Anyway, I erased the /mnt element from the path and ran grub-mkconfig, booted and the following happened:
Code:
/boot/initrd.gz: Loading kernel modules from initrd image:
insmod /lib/modules/blah/blah
insmod /lib/modules/blah/blah
mount: can't find /mnt in /etc/fstab
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
I mount could not mount whatever it was then the error following makes sense (not mounted). The question is where does /mnt come from. Any file containing that word? I search the string 'mnt' in /boot/grub/grub.cfg and did not find it.
I will run the mkinitrd-command-generator and see what happens.
You say that's the submenu I should use? But where is the initrd line? Anyway, I erased the /mnt element from the path and ran grub-mkconfig, booted and the following happened:
Code:
/boot/initrd.gz: Loading kernel modules from initrd image:
insmod /lib/modules/blah/blah
insmod /lib/modules/blah/blah
mount: can't find /mnt in /etc/fstab
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
I mount could not mount whatever it was then the error following makes sense (not mounted). The question is where does /mnt come from. Any file containing that word? I search the string 'mnt' in /boot/grub/grub.cfg and did not find it.
I will run the mkinitrd-command-generator and see what happens.
the custom file is made by the user, so you tell me where did you get the /mnt/
linux /boot/vmlinuz-generic-4.14.34 root=/dev/mmcblk0p3
I do not know the file structure for this type, but go to that link and read the instructions to change your kernel, but you have to boot in using your hudge then do the work when when you're finished then do not do the LiLo step, update grub instead.
[root@revenge grub]# cat grub.cfg
#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
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=unicode
else
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
font="/usr/share/grub/unicode.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_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
menuentry 'Arch Linux, with Linux linux-zen' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
menuentry 'Arch Linux, with Linux linux-zen (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-zen-fallback.img
}
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
}
### 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 ###
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class slackware --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-generic-4.14.34 root=/dev/mmcblk0p3
}
submenu 'Advanced options for Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' $menuentry_id_option 'osprober-gnulinux-advanced-ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-4.14.34--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-generic-4.14.34 root=/dev/mmcblk0p3
}
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-4.14.34--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-huge-4.14.34 root=/dev/mmcblk0p3
}
}
### 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.
menuentry "Slackware-current" {
set root=(hd0,3)
linux /mnt/boot/vmlinuz-generic root=/dev/mmcblk0p3 ro quiet splash
initrd /mnt/boot/initrd.gz
}
### 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 ###
[root@revenge grub]#
You see?, the os-prober puts the huge kernel, but I want the generic one to be booted!
Either with my 40_custom or with Richard Cranium's file I get the same errors:
Code:
mbcache: export duplicate syjbol _mb_cache_entry_free (owned by kernel)
modprobe: ERROR: could not insert 'mb_cache': Exec format error
[Idem]
modprobe: ERROR: could not insert 'ext2': Exec format error
mmc0: new HS200 MMC card at address 0001
mount: mounting /dev/mmcblk0p3 on /mnt failed: No such file or directory
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
Notice the slackware installer reads/writes the eMMC memory perfectly well. So in principle the drivers to access that device are there. By doing mkinitrd_command_generator.sh the driver for mmc (I forgot the name) appeared. So this was a great step forward in the road to boot Slackware on this machine. Now perhaps /dev/mmcblk0p3 should be named by the long name given by blkid.
mbcache: export duplicate syjbol _mb_cache_entry_free (owned by kernel)
modprobe: ERROR: could not insert 'mb_cache': Exec format error
[Idem]
modprobe: ERROR: could not insert 'ext2': Exec format error
Those errors indicate that you are still using the HUGE kernel instead of the generic kernel. The error is harmless by the way. It's what happens if you 'modprobe' a module which is already built into the kernel.
Since you are using "/boot/vmlinuz-generic" in your grub configuration, which is a symlink, it is probably pointing to the huge kernel.
You should always use the full name of the generic kernel and not rely on a symlink which is only there for newbies and to make unattended (huge) kernel installs and upgrades possible.
Well, there are two things I don't understand here. This is the latest grub.cfg I have used, which produced the errors shown above (post #):
Code:
[root@revenge grub]# cat /boot/grub/grub.cfg
#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
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=unicode
else
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
font="/usr/share/grub/unicode.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_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/09_slackware_linux ###
### END /etc/grub.d/09_slackware_linux ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
menuentry 'Arch Linux, with Linux linux-zen' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-zen.img
}
menuentry 'Arch Linux, with Linux linux-zen (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux-zen ...'
linux /boot/vmlinuz-linux-zen root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-zen-fallback.img
}
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-4b48227b-6b20-4cdd-b9a4-fee01fab42d4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
else
search --no-floppy --fs-uuid --set=root 4b48227b-6b20-4cdd-b9a4-fee01fab42d4
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=4b48227b-6b20-4cdd-b9a4-fee01fab42d4 rw quiet noapic
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
}
### 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 ###
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class slackware --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz root=/dev/mmcblk0p3
initrd /boot/initrd.gz
}
submenu 'Advanced options for Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' $menuentry_id_option 'osprober-gnulinux-advanced-ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz root=/dev/mmcblk0p3
initrd /boot/initrd.gz
}
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz root=/dev/mmcblk0p3
initrd /boot/initrd.gz
}
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-generic root=/dev/mmcblk0p3
}
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-4.14.34--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-generic-4.14.34 root=/dev/mmcblk0p3
}
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-huge root=/dev/mmcblk0p3
}
menuentry 'Slackware 14.2 (pre-15.0 -current) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-4.14.34--ca12f07c-07c7-4c0a-a9c1-597b0d7020f0' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
else
search --no-floppy --fs-uuid --set=root ca12f07c-07c7-4c0a-a9c1-597b0d7020f0
fi
linux /boot/vmlinuz-huge-4.14.34 root=/dev/mmcblk0p3
}
}
### 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.
# menuentry "Slackware-current" {
# set root=(hd0,3)
# linux /boot/vmlinuz-generic root=/dev/mmcblk0p3 ro quiet splash
# initrd /boot/initrd.gz
# }
### 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 ###
[root@revenge grub]#
If you see the entry of 09_slackware_linux, which is the stanza provided by Richard Cranium, you'll see the section is empty. This stanza is:
Code:
[root@revenge grub.d]# cat /etc/grub.d/09_slackware_linux
#! /bin/sh
set -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}"
datarootdir="${prefix}/share"
. "${datarootdir}/grub/grub-mkconfig_lib"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
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"
[root@revenge grub.d]#
Why did grub-mkconfig not include this stanza? Second question. In the grub.cfg file there are a lot of menues and submenues for slackware in the os_prober section. Two of them have the words vmlinuz which is a symlink pointing to the huge kernel. And the submenu where it puts 'vmlinuz-generic' it does not include the initrd file!!!
In short: I need to know what the 09_slackware_linux file has that makes grub-mkinstall not to include it in grub.cfg. On the other hand, the vmlinuz-generic link is pointing to the generic kernel, as I have just checked.
EDIT: I have just edited by hand the grub.cfg file, replacing 'vmlinuz' by 'vmlinuz-generic' in the first submenu. The second submenu I don't care right now as it is the Advanced Options option when one boots. Result: no more errors due to modprobe but still it does not find /dev/mmcblk0p3. I'll replace this by the uuid number provided by blkid and see what happens.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.