User Tools

Site Tools


linux:boot

This is an old revision of the document!


Boot

Grub

  • Grub 2 - Setting default entry
    Open /etc/default/grub and ensure this line exists:
    GRUB_DEFAULT=saved
     
    Apply the change to grub.cfg by running:
    # grub2-mkconfig -o /boot/grub2/grub.cfg
     
    Now list all possible menu entries
    # grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
     
    Now set the desired default menu entry
    # grub2-set-default <menu entry title>
     
    Verify the default menu entry
    # grub2-editenv list

grubby

# grubby --default-kernel
# grubby --set-default=/boot/vmlinuz-3.10.0-514.el7.x86_64 
<code>
=== Systemd ===
  * Enable rc-local in OL7<code bash>
cat >> /usr/lib/systemd/system/rc-local.service <<EOF

[Install]
WantedBy=multi-user.target
EOF
chmod +x /etc/rc.d/rc.local
systemctl enable rc-local.service
systemctl start rc-local.service
systemctl status rc-local.service

echo "systemctl restart network.service" >> /etc/rc.d/rc.local
linux/boot.1485889340.txt.gz · Last modified: 2017/01/31 11:02 by frank