Grub2grub4dos菜单制作教程怎么写

您的位置: >
> 修改Grub2启动菜单等待时间的正确方法
修改Grub2启动菜单等待时间的正确方法
 发布日期:  浏览: 次 
在使用Ubuntu和Windows双系统的时候,有时候需要使用Grub2引导。而Grub2引导后,默认的等待时间为10秒,很多人可能会觉得这个时间比较长,想要修改得短一些。
Ubuntu系统的Grub2菜单的相关信息在读取/boot/grub/grub.cfg文件,不过Ubuntu官方不建议直接修改这个文件,想要修改Grub2的等待时间还可以修改/etc/deafalt/grub来实现。具体的修改方法如下:
1、使用Ctrl+Alt+T快捷键打开终端,输入:
sudo&/etc/default/grub
3、再次回到终端,输入下面的命令刷新/boot/grub/grub.cfg文件:
sudo&update-grub2
到这里修改就完成了,重启系统看看效果吧
相关文章:
相关软件:
装机必备:
有任何意见或者建议请联系邮箱:[或
本站部分内容收集于互联网,如果有侵权内容、不妥之处,请联系我们删除。敬请谅解!
Copyright © . All Rights Reserved修改grub2系统选择菜单等待时间(Debian 7)
修改grub2系统选择菜单等待时间(Debian 7)
grub2的等待时间由/etc/default/grub中GRUB_TIMEOUT设定,改为:
GRUB_TIMEOUT=3
以上代表等待3秒。
修改完后需要执行update-grub,使配置生效。
感谢关注 Ithao123精品文库频道,是专门为互联网人打造的学习交流平台,全面满足互联网人工作与学习需求,更多互联网资讯尽在 IThao123!
Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。
Hadoop是一个由Apache基金会所开发的分布式系统基础架构。
用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。
Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。
Hadoop的框架最核心的设计就是:HDFS和MapReduce。HDFS为海量的数据提供了存储,则MapReduce为海量的数据提供了计算。
随着国内互联网的发展,产品经理岗位需求大幅增加,在国内,从事产品工作的大部分岗位为产品经理,其实现实中,很多从事产品工作的岗位是不能称为产品经理,主要原因是对产品经理的职责不明确,那产品经理的职责有哪些,本专题将详细介绍产品经理的主要职责
Swift是Apple在WWDC2014所发布的一门编程语言,用来撰写OS X和iOS应用程序[1]。在设计Swift时.就有意和Objective-C共存,Objective-C是Apple操作系统在导入Swift前使用的编程语言
Swift是供iOS和OS X应用编程的新编程语言,基于C和Objective-C,而却没有C的一些兼容约束。Swift采用了安全的编程模式和添加现代的功能来使得编程更加简单、灵活和有趣。界面则基于广受人民群众爱戴的Cocoa和Cocoa Touch框架,展示了软件开发的新方向。
IThao123周刊grub升级到grub2的操作
grub升级到grub2的操作
由于公司大多数用的还是传统GRUB(0.97版),后阶段需要升级为GRUB2,该版本为1.96或者更新版本.
先来看下grub2与传统的grub相比之下主要增加的功能包含:
1.支持脚本,包括条件语法和函数
2.动态加载模块
3.救援模式
4.可定制菜单,主题
5.支持图形化启动菜单以及增强的引导画面功能
6.新的配置文件结构,全面支持UUID
& & & & 虽然grub2默认菜单对使用过grub的人来说看起来很熟悉,但是里面还是有很大不同.
1.没有/boot/grub/menu.1st。已被/boo/grub/grub.cfg取代
2.在grub提示符下没有find命令,已变成search.
3.grub2已经模块化,不再需要'stage1.5'.所以引导器可以变得很小.
4.磁盘分区编号变更。现在第一个磁盘分区是 1 而不是 0。然而第一个设备仍然是 0(没有改变)&
5./etc/grub/grub.cfg,不应在被手动编辑,主要用来编辑的配置文件是/etc/default/grub,还有所在/etc/grub.d/目录下的文件,在update-grub命令执行前,所有配置文件的修改都不会生效.
查看grub版本,升级至grub2
root@10.1.1.45:~# grub-install -v
grub-install (GNU GRUB 0.97)
root@10.1.1.45:~# dpkg -i grub-common_1.96+_amd64.deb
(Reading database ... 35648 files and directories currently installed.)
Preparing to replace grub-common 1.96+ (using grub-common_1.96+_amd64.deb) ...
Unpacking replacement grub-common ...
Setting up grub-common (1.96+) ...
root@10.1.1.45:~# dpkg -i grub-pc_1.96+_amd64.deb
Selecting previously deselected package grub-pc.
dpkg: considering removing grub in favour of grub-pc ...
dpkg: yes, will remove grub in favour of grub-pc.
(Reading database ... 35648 files and directories currently installed.)
Unpacking grub-pc (from grub-pc_1.96+_amd64.deb) ...
Setting up grub-pc (1.96+) ...
Generating core.img
Saving menu.lst backup in /boot/grub/menu.lst_backup_by_grub2_postinst
Running update-grub Legacy to hook our core.img in it
& & Searching for GRUB installation directory ... found: /boot/grub
& & Searching for default file ... found: /boot/grub/default
& & Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
& & Searching for splash image ... none found, skipping ...
& & Found GRUB 2: /boot/grub/core.img
& & Found kernel: /boot/vmlinuz-2.6.26-2-amd64
& & Updating /boot/grub/menu.lst ... done
Updating /boot/grub/grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.26-2-amd64
Found initrd image: /boot/initrd.img-2.6.26-2-amd64
Processing triggers for man-db ...
1.期间会有提示信息,在选择「OK」后,下一个选项允许用户在正常的 GRUB 菜单中通过新增一个菜单项来测试GRUB2.选择「Yes」将在 GRUB 菜单中增加一个 Chainload 项.当下次使用 GRUB 启动时,使用者可以选择正常的 GRUB 菜单项或是将控制权通过 Chainload 菜单项转到 GRUB 2。 &
2.下一步将会把来自 GRUB 的 menu.lst 中的内容导入到[ command line](如下图),或者导入[Linux default command line]。这些项目允许用户输入任意的特殊命令,例如 quiet, splash,noapic 或是其他同样性质的命令。GRUB 2 将会自动导入这些配置。通常用户不需要修改并选择「OK」。若有需要,选项也可以在以后再加入。
当系统已安装完成grub2,还需要更改几个参数
root@10.1.1.45:grub# cat /etc/default/grub
# This file is sourced by update-grub, and its variables are propagated
# to its children in /etc/grub.d/
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2& /dev/null || echo Debian`
GRUB_CMDLINE_LINUX=&console=tty0 console=ttyS1,115200& &#在内核引导加入console连接的相关参数,保证可以通过ipmi连接该服务器.由于该机器型号是R710故用115200.
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console #选择console作为终端设备,保证ipmi连接显示正色.
# Uncomment if you don't want GRUB to pass &root=UUID=xxx& parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
root@10.1.1.45:# vi /etc/inittab
T1:23:respawn:/sbin/getty -L ttyS1 115200 vt100 & &保证登录不显示乱码
root@10.1.1.45:grub# update-grub & & & & & & 生效配置文件
Updating /boot/grub/grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.26-2-amd64
Found initrd image: /boot/initrd.img-2.6.26-2-amd64
重启机器后可以看到更新的grub传统菜单欢迎画面,也会看到一个「Chainload into GRUB 2」菜单项,用来测试 GRUB 2 安装。选择 Chainload 选项将会把控制权转到 GRUB 2 并显示GRUB2菜单。
使用以下命令可以完全升至grub2.
root@10.1.1.45:~# upgrade-from-grub-legacy
Installing GRUB to Master Boot Record of your first hard drive ...
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) & /dev/hda
GRUB Legacy has been removed, but its configuration files have been preserved,
since this script cannot determine if they contain valuable information. &If
you would like to remove the configuration files as well, use the following
& rm -f /boot/grub/menu.lst*
下面介绍grub2使用的主要配置目录和文件:
1./boot/grub/grub.cfg:类似grub下/boot/grub/menu.1st的文件.包含grub2菜单信息.不应该手动编辑.应该由update-grub来更新,在/boot/grub目录小会看到许多*.mod文件,这表明grub2的模块化本质.grub2启动时按需要加载不同的模块.
root@10.1.1.45:grub# ls
acorn.mod & & &_bsd.mod & & & &device.map & &gzio.mod & & lnxboot.img & & & & & & & & & & & &multiboot.mod &reiserfs.mod &vbe.mod
affs.mod & & & bsd.mod & & & & diskboot.img &halt.mod & & loadenv.mod & & & & & & & & & & & &normal.mod & & search.mod & &vbetest.mod
afs.mod & & & &cat.mod & & & & echo.mod & & &hello.mod & &loopback.mod & & & & & & & & & & & ntfscomp.mod & serial.mod & &vga.mod
amiga.mod & & &cdboot.img & & &elf.mod & & & help.mod & & ls.mod & & & & & & & & & & & & & & ntfs.mod & & & sfs.mod & & & video.mod
aout.mod & & & _chain.mod & & &ext2.mod & & &hexdump.mod &lspci.mod & & & & & & & & & & & & &partmap.lst & &sleep.mod & & videotest.mod
apple.mod & & &chain.mod & & & fat.mod & & & hfs.mod & & &lvm.mod & & & & & & & & & & & & & &pci.mod & & & &sun.mod & & & xfs.mod
ascii.pff & & &cmp.mod & & & & font.mod & & &hfsplus.mod &memdisk.mod & & & & & & & & & & & &pc.mod & & & & terminal.mod
ata.mod & & & &command.lst & & fshelp.mod & &iso9660.mod &menu.lst & & & & & & & & & & & & & play.mod & & & terminfo.mod
biosdisk.mod & configfile.mod &fs.lst & & & &jfs.mod & & &menu.lst~ & & & & & & & & & & & & &png.mod & & & &test.mod
bitmap.mod & & core.img & & & &fs_uuid.mod & jpeg.mod & & menu.lst_backup_by_grub2_postinst &pxeboot.img & &tga.mod
blocklist.mod &cpio.mod & & & &gfxterm.mod & kernel.img & minix.mod & & & & & & & & & & & & &raid.mod & & & udf.mod
boot.img & & & cpuid.mod & & & gpt.mod & & & _linux.mod & moddep.lst & & & & & & & & & & & & read.mod & & & ufs.mod
boot.mod & & & default & & & & grub.cfg & & &linux.mod & &_multiboot.mod & & & & & & & & & & reboot.mod & & vbeinfo.mod
2./etc/default/grub:包含以前在 GRUB 传统的 menu.lst 前半部配置内容;以及每行内核配置后面的追加配置。
3./etc/grub.d/:在此目录中的文件将会在执行 update-grub 命令的时候读取,并将其中的命令合并至 /boot/grub/grub.cfg 中。&
在 grub.cfg 菜单中的菜单项顺序是依照在此目录中文件的顺序来决定。 具有较小数字前缀文件名的文件将会先执行.
在update-grub 执行过程中只有可执行文件会输出至 grub.cfg。 &
在此目录中的默认文件为: &
00_header 配置初始显示项目,例如图形模式、默认选项、时间限制等等。这些配置信息一般由/etc/default/grub 中导入。使用者一般不需要对此文件做任何更动。 &
05_debian_theme 此文件中的配置用来配置引导画面、文字颜色、高亮度选项及主题。再没有引导画面的情况下,此文件会配置一个单色的主题来显示初始菜单画面。如何配置字体显示及引导画面将会在引导画面和主题小节中讨论。 &
10_hurd 定位 Hurd 内核位置。目前未使用。 &
10_linux 定位当前操作系统使用中的 root 设备内核位置。此信息将会用来建立这些内核显示在菜单中的名称。
30_os-prober 此文件和 os-prober,用来搜索 Linux 和其他操作系统。结果将会依据此文件中的内容而放至 grub.cfg 中。此文件被划分成四个段落,代表由该脚本所处理的四种操作系统类型:Windows, Linux, OSX 和 Hurd。此脚本中的变量用来指定在 /boot/grub/grub.cfg 和 GRUB 2 菜单中的名称显示格式。熟悉基本脚本的用户可以修改这些变量来改变菜单选项的显示格式。此外,用户可以修改 /etc/default/grub 的一个选项来关闭这个脚本。
40_custom 用来加入自定义菜单项的样板,将会在执行 update-grub 命令时嵌入至 grub.cfg 中。此文件中的内容,在「exec tail -n +3 $0」这一行和默认的注释后,会毫无改变地直接导入至/etc/default/grub.cfg.
root@10.1.1.45:grub.d# ll
-rwxr-xr-x 1 root root -11 09:58 00_header
-rwxr-xr-x 1 root root -11 09:52 05_debian_theme
-rwxr-xr-x 1 root root -11 09:58 10_hurd
-rwxr-xr-x 1 root root -11 09:58 10_linux
-rwxr-xr-x 1 root root -11 09:58 30_os-prober
-rwxr-xr-x 1 root root & 84
09:58 40_custom
-rw-r--r-- 1 root root &483
09:58 README
在升级其它debian机器时,其中重启机器过了grub遇到error: unknown command 'initrd'错误,后来谷歌一番,发现出问题的command list一般是如下形式:
menuentry &Debian GNU/Linux, linux 2.6.32-2-amd64& {
& & set root=(hd0,1)
& & search --fs-uuid --set c618b7d1-4769-4dfe-f8aace43
& & linux & /boot/vmlinuz-2.6.32-2-amd64 root=UUID=c618b7d1-4769-4dfe-f8aace43 ro console=tty0 console=ttyS1,115200
& & initrd &/boot/initrd.img-2.6.32-2-amd64
解决办法是删掉search那一行.
(window.slotbydup=window.slotbydup || []).push({
id: '2467140',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467141',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467142',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467143',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467148',
container: s,
size: '1000,90',
display: 'inlay-fix'Grub菜单编辑器(GMEditor)下载 v1.2.2_ - pc6下载站

我要回帖

更多关于 grub菜单编辑器 的文章

 

随机推荐