系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
pengdong17
- 帖子: 197
- 注册时间: 2009-02-15 16:46
#1
帖子
由 pengdong17 » 2009-10-18 20:01
启动的过程中碰到了"erro:invalid environment block"错误
然后 我就按照 下面的操作了下
由于我在某次启动的过程中碰到了"erro:invalid environment block"错误,在google上搜到了解决办法,我转述一下,希望对大家有帮助
1、在启动grub的界面按“e”,找到"save_env",删除整行
2、执行ctrl+x启动系统,此时你应该能进入x了
3、执行如下命令,貌似要用sudo
代码:
cd /boot/grub
rm grubenv // 成功了
grub-editenv grubenv create // 失败~!!好像说grub-editenv 没找到,下面几步也不行
grub-editenv grubenv set default=0
grub-editenv grubenv list
default=0
4、执行下面命令,修复grub菜单
代码:
sudo update-grub //这个倒是没问题....
所以我 删了/boot/grub/grubenv 文件........
然后 自然 启动时 提示 File not found.
有什么办法么??
要是不行...我就等U910 正式版重装了........
never mind
-
pengdong17
- 帖子: 197
- 注册时间: 2009-02-15 16:46
#4
帖子
由 pengdong17 » 2009-10-19 18:48
smallapple 写了:Livecd进去改grub.cfg。
怎么改啊..~
never mind
-
smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
#5
帖子
由 smallapple » 2009-10-19 18:52
把grub.cfg与grubenv的内容删了。
代码: 全选
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
可以先试试 出现File not found.后按回车能否出现菜单
-
pengdong17
- 帖子: 197
- 注册时间: 2009-02-15 16:46
#6
帖子
由 pengdong17 » 2009-10-19 19:03
#
# 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 ###
load_env
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,4)
search --no-floppy --fs-uuid --set 9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8
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
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/white
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-13-generic" {
recordfail=1
save_env recordfail
set quiet=1
insmod ext2
set root=(hd0,4)
search --no-floppy --fs-uuid --set 9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8
linux /boot/vmlinuz-2.6.31-13-generic root=UUID=9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8 ro quiet splash
initrd /boot/initrd.img-2.6.31-13-generic
}
menuentry "Ubuntu, Linux 2.6.31-13-generic (recovery mode)" {
recordfail=1
save_env recordfail
insmod ext2
set root=(hd0,4)
search --no-floppy --fs-uuid --set 9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8
linux /boot/vmlinuz-2.6.31-13-generic root=UUID=9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8 ro single
initrd /boot/initrd.img-2.6.31-13-generic
}
menuentry "Ubuntu, Linux 2.6.31-11-generic" {
recordfail=1
save_env recordfail
set quiet=1
insmod ext2
set root=(hd0,4)
search --no-floppy --fs-uuid --set 9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8
linux /boot/vmlinuz-2.6.31-11-generic root=UUID=9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8 ro quiet splash
initrd /boot/initrd.img-2.6.31-11-generic
}
menuentry "Ubuntu, Linux 2.6.31-11-generic (recovery mode)" {
recordfail=1
save_env recordfail
insmod ext2
set root=(hd0,4)
search --no-floppy --fs-uuid --set 9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8
linux /boot/vmlinuz-2.6.31-11-generic root=UUID=9ff3c0d2-d7c3-4d9d-8893-ffa369dae7c8 ro single
initrd /boot/initrd.img-2.6.31-11-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod fat
set root=(hd0,1)
search --no-floppy --fs-uuid --set 8c68-6106
drivemap -s (hd0) ${root}
chainloader +1
}
### 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 ###
never mind
-
smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
#7
帖子
由 smallapple » 2009-10-19 19:07
load_env 删除或加 # 注释掉
recordfail=1
save_env recordfail
这两个删掉
-
pengdong17
- 帖子: 197
- 注册时间: 2009-02-15 16:46
#8
帖子
由 pengdong17 » 2009-10-19 19:07
上面是GRUB.CFG
没有找到 if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
以及grubenv 相关大的东西。。。。。。。。。。。。
我能看到 grub 的,XP 也是能进的~~
Memory test (memtest86+) 也行,就是 不能进入UBUNTU
never mind
-
pengdong17
- 帖子: 197
- 注册时间: 2009-02-15 16:46
#9
帖子
由 pengdong17 » 2009-10-19 19:13
You are trying to save the file on a read-only disk. Please check that you typed the location correctly and try again
I can't edit it
i have been ROOT~
never mind
-
smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
#10
帖子
由 smallapple » 2009-10-19 19:14
sudo chmod +x ....
sudo gedit ....
sudo nano ....
-
pengdong17
- 帖子: 197
- 注册时间: 2009-02-15 16:46
#12
帖子
由 pengdong17 » 2009-10-19 19:25
i changed
but i failed ...
it says
File not found.
all the same
.............i am going to give up .
or i think
我就等U910 正式版重装了........
#
# 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 ###
#load_env
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,4)
never mind
-
smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
#13
帖子
由 smallapple » 2009-10-19 19:30
不知道是没了内核还是分区不对?
在grub启动画面上按c进入命令行模式,
search -f /boot/vmlinuz-2.6.31-11-generic
和
search -f /boot/initrd.img-2.6.31-11-generic
看看内核在不在,还有回显是不是 (hd0,4), 不是的话重新改下。