How to select grub bootup menu during remote access to server.

2 篇文章 0 订阅
2 篇文章 0 订阅

During remote access t o server with muti os, you may want to switch between different OS, it is impossible if you want to make it by manully select grub menus in this scenario, so cant this be achived? Of course No, you just use the grub-reboot command to make it, here we go.

first, please execute the command "sudo grub-reboot #NO", Which NO means the items you want to bootup in grub bootup menu.

for example

 sudo grub-reboot 3

then reboot the system with command

sudo reboot

Then you will find the items 3(start from item 0) system was seleted and taken as the default system to boot.

afther this, you will bootup the system you want, event if you are in a remote access.

在包含submenu的情境下,比如,要启动的系统在高级菜单里面,可以通过如下字符串的形式提供启动信息,可以通过执行如下命令:

sudo grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-137-generic"

注意,命令行参数要和/boot/grub/grub.cfg文件中的描述完全一致才可以。

sudo grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 5.15.0-58-generic"

或则用数字序号代替,

sudo grub-reboot '1>6'
sudo reboot

'1>6'前一个1代表主菜单的第一项入口,也就是Advanced options for Ubuntu,后面的6表示第子菜单的第六项启动,也就是我们选择的启动内核。主,子菜单序号都从0开始记。

End!
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

papaofdoudou

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值