If you can live without the huge kernel, just use removepkg & get rid of it, then run "grub-mkconfig -o /boot/grub/grub.cfg" again & only the generic kernel will be found.
I don't like the above option, so I copy the applicable portions of grub.cnf to "/etc/grub.d/40_custom." I then edit 40_custom to whatever I want, make it executable then make 10_linux, 20_linux_xen & 30_os-prober unexecutable. Then I rerun "grub-mkconfig -o /boot/grub/grub.cfg" & all that shows up is what in 40_custom. The 40_custom that I am currently using is
Code:
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.
menuentry 'Slackware-Current Desktop' --class slackware-14.0 --class gnu-linux
--class gnu --class os {
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
linux /generic root=LABEL=current ro 4
initrd /initrd.gz
}
menuentry 'Slackware-Current Command Line' --class slackware-14.0 --class
gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
linux /generic root=LABEL=current ro
initrd /initrd.gz
}
submenu 'Advanced options for Slackware-14.0 GNU/Linux' {
menuentry 'Slackware-Current Huge' --class slackware-14.0 --class
gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
linux /huge root=LABEL=current ro
}
menuentry 'Slackware-Current Generic (recovery mode)' --class
slackware-14.0 --class gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
linux /generic root=LABEL=current ro single
initrd /initrd.gz
}
menuentry 'Slackware-Current Huge (recovery mode)' --class
slackware-14.0 --class gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
linux /huge root=LABEL=current ro single
}
}
Since I'm using an initrd, I can do several things that make this easier:
1) I do not have to modify inittab, I can just put "4" at the end of the kernel
options, when I want to go to runlevel 4.
2) I use links, generic & huge (in /boot), to the respective kernels.
3) I use partition labels instead of paths for my root partition.
Using the above, I can usually upgrade a kernel without modifying grub.cnf at all.
Regards,
Bill