更新Ubuntu Server 10.4 内核及编辑内核启动项
2010-06-29 19:25
369 查看
环境:Ubuntu Server 10.04
UB 10.04 使用 GRUB2
配置文件在
root@ServerU3:/etc/default# vim /etc/default/grub
参考:
http://ubuntuforums.org/showthread.php?t=1302743&highlight=grub2+common
http://ubuntuforums.org/showthread.php?t=1195275
如果仅有一个操作系统时,一定要按住 SHFIT 键,
详细内容参考上面的两篇文章。
Unhide/Hide the Menu 隐藏/显示菜单
File: /etc/default/grub
Line to edit (5):
Quote:
Example to unhide the menu: # GRUB_HIDDEN_TIMEOUT=0 and DEFAULT_TIMEOUT=X
注释掉 #GRUB_HIDDEN_TIMEOUT=0
设置等待时间 DEFAULT_TIMEOUT=X
By default, if no other operating system is found on the system, GRUB 2 will not display the menu. The system will boot directly into the default entry.
当没有别的操作系统时,GRUB 2默认不显示菜单。系统直接进入默认入口。
To display the menu:
Place a comment symbol (#) at the start of the "GRUB_HIDDEN_TIMEOUT=X" line.
X=要停留的秒数
Make sure the "DEFAULT_TIMEOUT=X" entry is a positive integer. X is the number of seconds the menu will be displayed.
Quote:
ode:
Save the file, then update the menu:
Code:
这时系统查找
Searching for GRUB installation director y ... found: /boot/grub
Searching for default file ... Generatin g /boot/grub/default file and setting th e default boot entry to 0
Searching for GRUB installation director y ... found: /boot/grub
Testing for an existing GRUB menu.lst fi le ...
Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst gene rated for you? (y/N) y
发现没有 /boot/grub/menu.lst ,新建一个,
Searching for splash image ... none found, skipping ...
Found GRUB 2: /boot/grub/core.img
Found kernel: /memtest86+.bin
Found kernel: /vmlinuz-2.6.32-22-server
Found kernel: /vmlinuz-2.6.32-21-server
Found GRUB 2: /boot/grub/core.img
Found kernel: /memtest86+.bin
Updating /boot/grub/menu.lst ... done
更新 完成。
root@ServerU3:/etc/default#
/boot/grub# vim menu.lst
这样一来,就有了启动选择内核的项目了。
To hide the menu on boot:
There should be no # symbol at the start of the line: GRUB_HIDDEN_TIMEOUT=0 line. "0" will boot the system without a timeout. A positive integer will leave a blank screen for that number of seconds, allowing the user time to press "ESC" or "SHIFT" to display the menu. The splash screen will still display during the timeout.
cat /etc/lsb-release
输入:
sudo uname -r 查看内核版本
root@ServerU2:~# uname -r
2.6.32-22-server
/lib/modules
/lib/modules# ls
2.6.32-21-server 2.6.32-22-server
输入 : apt-cache search linux image server
apt-get install linux-image-2.6.32-22-server
安装完成后查看
root@ServerU2:/lib/modules# ls -la
总计 24
drwxr-xr-x 4 root root 4096 2010-06-29 19:44 .
drwxr-xr-x 13 root root 12288 2010-06-26 08:57 ..
drwxr-xr-x 4 root root 4096 2010-06-25 20:47 2.6.32-21-server
drwxr-xr-x 4 root root 4096 2010-06-29 19:45 2.6.32-22-server
查看当前内核,没有变,
uname -r
2.6.32-21-server
reboot 后查看,
root@ServerU2:~# uname -r
2.6.32-22-server
root@ServerU2:~#
UB 10.04 使用 GRUB2
配置文件在
root@ServerU3:/etc/default# vim /etc/default/grub
参考:
http://ubuntuforums.org/showthread.php?t=1302743&highlight=grub2+common
http://ubuntuforums.org/showthread.php?t=1195275
如果仅有一个操作系统时,一定要按住 SHFIT 键,
详细内容参考上面的两篇文章。
Unhide/Hide the Menu 隐藏/显示菜单
File: /etc/default/grub
Line to edit (5):
Quote:
GRUB_HIDDEN_TIMEOUT=0 |
注释掉 #GRUB_HIDDEN_TIMEOUT=0
设置等待时间 DEFAULT_TIMEOUT=X
By default, if no other operating system is found on the system, GRUB 2 will not display the menu. The system will boot directly into the default entry.
当没有别的操作系统时,GRUB 2默认不显示菜单。系统直接进入默认入口。
To display the menu:
Place a comment symbol (#) at the start of the "GRUB_HIDDEN_TIMEOUT=X" line.
X=要停留的秒数
Make sure the "DEFAULT_TIMEOUT=X" entry is a positive integer. X is the number of seconds the menu will be displayed.
Quote:
# GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="10" |
gksu gedit /etc/default/grub
Save the file, then update the menu:
Code:
sudo update-grub
这时系统查找
Searching for GRUB installation director y ... found: /boot/grub
Searching for default file ... Generatin g /boot/grub/default file and setting th e default boot entry to 0
Searching for GRUB installation director y ... found: /boot/grub
Testing for an existing GRUB menu.lst fi le ...
Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst gene rated for you? (y/N) y
发现没有 /boot/grub/menu.lst ,新建一个,
Searching for splash image ... none found, skipping ...
Found GRUB 2: /boot/grub/core.img
Found kernel: /memtest86+.bin
Found kernel: /vmlinuz-2.6.32-22-server
Found kernel: /vmlinuz-2.6.32-21-server
Found GRUB 2: /boot/grub/core.img
Found kernel: /memtest86+.bin
Updating /boot/grub/menu.lst ... done
更新 完成。
root@ServerU3:/etc/default#
/boot/grub# vim menu.lst
这样一来,就有了启动选择内核的项目了。
To hide the menu on boot:
There should be no # symbol at the start of the line: GRUB_HIDDEN_TIMEOUT=0 line. "0" will boot the system without a timeout. A positive integer will leave a blank screen for that number of seconds, allowing the user time to press "ESC" or "SHIFT" to display the menu. The splash screen will still display during the timeout.
cat /etc/lsb-release
输入:
sudo uname -r 查看内核版本
root@ServerU2:~# uname -r
2.6.32-22-server
/lib/modules
/lib/modules# ls
2.6.32-21-server 2.6.32-22-server
输入 : apt-cache search linux image server
apt-get install linux-image-2.6.32-22-server
安装完成后查看
root@ServerU2:/lib/modules# ls -la
总计 24
drwxr-xr-x 4 root root 4096 2010-06-29 19:44 .
drwxr-xr-x 13 root root 12288 2010-06-26 08:57 ..
drwxr-xr-x 4 root root 4096 2010-06-25 20:47 2.6.32-21-server
drwxr-xr-x 4 root root 4096 2010-06-29 19:45 2.6.32-22-server
查看当前内核,没有变,
uname -r
2.6.32-21-server
reboot 后查看,
root@ServerU2:~# uname -r
2.6.32-22-server
root@ServerU2:~#
相关文章推荐
- ubuntu server 更新为hwe内核 开启BBR
- 删除ubuntu多余的内核和启动项
- Debian/Ubuntu server上安装安全更新
- ubuntu server 13.10修改引导等待时间与配置更新源
- ubuntu更新内核
- ubuntu10.4的更新源因过期无法更新的解决方法
- Ubuntu提供新补丁更新内核不需要重启了
- ubuntu server 12.04 更新源
- ubuntu server 12.04.1和14.04.1 更新源的修改办法
- Ubuntu Server 12.04 更新源
- Ubuntu 提供实时补丁服务,更新内核不需要重启了
- Ubuntu 更新内核及删除无用文件
- ubuntu10.4 国内更新源
- Ubuntu server安装apache2及重要配置(持续更新)
- Ubuntu 8.04 Linux系统下面编译更新内核版本
- Ubuntu自动更新后 启动项变得起来越多的解决办法
- ubuntu server 12.04.1和14.04.1 更新源的修改办法
- ubuntu 11.04 更新后无法动态获取ip,network manager ifupdown 无法编辑
- Canonical发布适用于Ubuntu 18.04 LTS的Linux内核安全补丁,立即更新