Feature changed by: Tomas Hehejik (thehejik) Feature #319632, revision 22 Title: [BETA 2] grub2: Scan custom.cfg for grub2-once Requested by: Egbert Eich (eeich) Partner organization: openSUSE.org Description: grub2-once is used to test grub menu entries which may not boot. This feature is often used by developers. However menu entries for testing are frequently added to custom.cfg. Therefore this file should be scanned as well so that boot entries from it can be selected. Documentation Impact: Admin Guide, grub.xml + Test Case: + Preparation: + On default installed SLE_12 (TC tested on SP2_Build2011 in KVM/QEMU + with virtIO disk drive) create a file /boot/grub2/custom.cfg with + custom menuentry: + menuentry 'My custom menuentry' { + load_video + set gfxpayload=keep + insmod gzio + insmod part_msdos + insmod btrfs + set root='hd0,msdos2' + echo 'Loading my custom kernel...' + linux /boot/vmlinuz root=/dev/vda2 #by default the second partition is + used, use vda2 for virtIO driver, sda2 for SATA driver + echo 'Loading my custom initrd...' + initrd /boot/initrd + } + Note: by default the second partition is used for root partition (inc. + /home), if you are using KVM use vda2 for virtIO drive, sda2 for SATA + drive + Test1 - custom menuentry is readable by grub2-once command + After creating /boot/grub2/custom.cfg try to run command grub2-once -- + list as root, it should provide a list of all available grub2 + menuentries include 'My custom menuentry' as last entry, in my case it + has number 3, note the number. + Test2 - Set the custom menuentry as default grub2 boot entry for next + boot ONLY + As root run command grub2-once 3 (number taken in previous step). No + output is provided. Perform reboot and check if in grub2 bootloader is + selected 'My custom menuentry' entry (no need to boot it). + Note: you can use grub2-reboot for setting default menuentry for next + boot as well, but it doesn't provide --list option + Test3 - back to default menuentry + Select default menuentry and boot to SLE_12. Perform reboot and check + if the original boot menuentry is selected. Discussion: #1: Egbert Eich (eeich) (2015-10-18 14:34:51) For openSUSE submitted: SR#339606 For SLE-12-SP1 see: home:eeich: branches:SUSE:SLE-12-SP1:Update #6: Michael Chang (michael-chang) (2015-10-20 12:41:19) (reply to #1) The SR has been accepted to openSUSE Factory. Thanks. #2: Egbert Eich (eeich) (2015-10-18 15:35:34) Maintenance request for SUSE:SLE-11-SP1:Update: ReqID: 74966 This is a really minor feature but it is also interesting for SLE-12. Since it is a very benign change it should go into the SP1 update channel. -- openSUSE Feature: https://features.opensuse.org/319632