以下是/boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=929e3371-9e53-437d-b327-9e6dc06642a4 ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=929e3371-9e53-437d-b327-9e6dc06642a4 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
admin_hl 于 2011-12-31 13:37:43发表:
支持下
admin_hl 于 2011-12-31 13:37:42发表:
支持下
admin_hl 于 2011-12-31 13:37:42发表:
支持下
byrand 于 2011-09-04 16:07:07发表:
我也碰到了楼主一样的问题,起先是用vim编辑文件的
后来忘记把sudoers的权限改回去,
我是在虚拟机下装的ubuntu11.04
我的电脑没有光驱,所以楼上的朋友建议的用liveCD这个方法好像不可行吧
还有ubuntu在重新启动后,按ESC键为何无法进入所说的恢复模式呀
按ESC后
看到Removeable Devices
Hard Drive
CD-ROM Drive
network boot from AMD AM79c9
eclipse101 于 2010-09-08 22:18:33发表:
技术帖
zzm35837995 于 2010-09-08 18:38:27发表:
呵呵,今天在一位校友的帮助下已经完成了, 和上面2位说的一样,我开始进去没找到原来的sudoers, 只看到是livecd下的sudoers。 找到以前的sudoers 改下权限就OK了
shenhao0129 于 2010-09-08 17:50:09发表:
在启动菜单选择中选择启动第二项recovery mode
zzm35837995 于 2010-09-08 16:00:16发表:
8# 大宝
我用光盘启动的 ,只有try Ubuntu 10.04 LTS (You can try Ubuntu 10.04 from this cd whisout any changes from your system) 和 Install Ubuntu 10.04 LTS , 怎么进入终端呢?
大宝 于 2010-09-08 15:28:31发表:
用光盘或U盘启动,在终端中把/etc/sudoers的权限改为440
zzm35837995 于 2010-09-08 15:11:53发表:
4# 相思爱文
以单用户启动不是也要用到sudo 吗?
zzm35837995 于 2010-09-08 12:48:52发表:
在另一台电脑 虚拟机上 装的ubuntu 9.04 , 重启时按esc 可以进入选择修复模式的界面
zzm35837995 于 2010-09-08 12:40:30发表:
以下是/boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=929e3371-9e53-437d-b327-9e6dc06642a4 ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=929e3371-9e53-437d-b327-9e6dc06642a4 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 929e3371-9e53-437d-b327-9e6dc06642a4
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
相思爱文 于 2010-09-08 11:31:54发表:
把/boot/grub/grub.cfg贴出来看看
相思爱文 于 2010-09-08 11:31:12发表:
用以下方法都可修改:
单用户方式启动,修改文件权限。
用安装盘(或其他linux系统)启动,chroot方式进入系统修改权限
用安装盘启动,挂载分区,直接修改。
zzm35837995 于 2010-09-08 09:31:30发表:
再到网上看了下说要重启时进入grub界面 选择修复模式(好像就是root 模式) ,但是我重启没有grub提示啊,
我用的是ubuntu 10.04?