在线等-刚刚误删 求grub.cfg文件
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
在线等-刚刚误删 求grub.cfg文件
刚刚删除旧内核的时候不小心把grub.cfg文件给删除了。
不知道现在该怎么办。。。
在线等等。有知道该怎么办的吗
不知道现在该怎么办。。。
在线等等。有知道该怎么办的吗
- leeaman
- 帖子: 30702
- 注册时间: 2007-02-02 18:14
- 系统: debian sid
Re: 在线等-刚刚误删 求grub.cfg文件
live cd进去建立一个?或者仔细认真的研究smallaplle的教程?
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
我系统还没重启呢!leeaman 写了:live cd进去建立一个?或者仔细认真的研究smallaplle的教程?
不知道 哪些是要设置的。
下面贴个刚搜到的
#
# 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 ###
set default=0
set timeout=5
set root=(hd0,1)
search --no-floppy --fs-uuid --set 7fd99749-c2c3-4c13-821f-ad6ea0fa86b4
if loadfont /usr/share/grub/ascii.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
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-4-generic" {
set root=(hd0,1)
search --no-floppy --fs-uuid --set 7fd99749-c2c3-4c13-821f-ad6ea0fa86b4
linux /boot/vmlinuz-2.6.31-4-generic root=UUID=7fd99749-c2c3-4c13-821f-ad6ea0fa86b4 ro quiet splash
initrd /boot/initrd.img-2.6.31-4-generic
}
menuentry "Ubuntu, Linux 2.6.31-4-generic (recovery mode)" {
set root=(hd0,1)
search --no-floppy --fs-uuid --set 7fd99749-c2c3-4c13-821f-ad6ea0fa86b4
linux /boot/vmlinuz-2.6.31-4-generic root=UUID=7fd99749-c2c3-4c13-821f-ad6ea0fa86b4 ro single
initrd /boot/initrd.img-2.6.31-4-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###
- leeaman
- 帖子: 30702
- 注册时间: 2007-02-02 18:14
- 系统: debian sid
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
不知道怎么搞了,
google ing。。。
google ing。。。
- toddler
- 帖子: 367
- 注册时间: 2008-04-30 23:11
Re: 在线等-刚刚误删 求grub.cfg文件
问你重启没有?如果没有重启打开终端输入sduo update-grub即可自动生成。哼哼hhhh 写了:不知道怎么搞了,
google ing。。。
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
sudo update-grub
>看下面
haxy@haxy-desktop:~$ sudo update-grub
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 kernel: /boot/vmlinuz-2.6.31-17-generic-pae
Found kernel: /boot/vmlinuz-2.6.31-16-generic-pae
Found kernel: /boot/vmlinuz-2.6.31-14-generic-pae
Found kernel: /boot/vmlinuz-2.6.24-16-386
Found kernel: /boot/vmlinuz-2.6.24-16-virtual
Found kernel: /boot/vmlinuz-2.6.24-16-server
Found kernel: /boot/vmlinuz-2.6.24-16-rt
Found kernel: /boot/vmlinuz-2.6.24-16-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
但是还是没看到 grub.cfg这个文件
>看下面
haxy@haxy-desktop:~$ sudo update-grub
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 kernel: /boot/vmlinuz-2.6.31-17-generic-pae
Found kernel: /boot/vmlinuz-2.6.31-16-generic-pae
Found kernel: /boot/vmlinuz-2.6.31-14-generic-pae
Found kernel: /boot/vmlinuz-2.6.24-16-386
Found kernel: /boot/vmlinuz-2.6.24-16-virtual
Found kernel: /boot/vmlinuz-2.6.24-16-server
Found kernel: /boot/vmlinuz-2.6.24-16-rt
Found kernel: /boot/vmlinuz-2.6.24-16-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
但是还是没看到 grub.cfg这个文件
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
ctl+h 看到 备份的 grub.cfg~, 发现是个里头没写过,是空的。这样重启没事吗。leeaman 写了:靠,没有重起的话,sudo update-grub就可以啦
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
我的menu。list没动过
- leeaman
- 帖子: 30702
- 注册时间: 2007-02-02 18:14
- 系统: debian sid
Re: 在线等-刚刚误删 求grub.cfg文件
晕,你真能哼~~~执行 然后看看那个grub.cfg有内容再重起
代码: 全选
sudo update-grub
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
我已经update-grub了,但是结果 是 Updating /boot/grub/menu.lst ... done
好像是个别更新menulist阿。
geub。cfg这个文件还是没有看到。
我自己建了一个,但是不知道内容是什么,空的。郁闷了
好像是个别更新menulist阿。
geub。cfg这个文件还是没有看到。
我自己建了一个,但是不知道内容是什么,空的。郁闷了
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
Searching for splash image ... none found, skipping ...这个是不是就是没有 grub.cfg造成的?
-
- 帖子: 106
- 注册时间: 2009-07-11 9:40
Re: 在线等-刚刚误删 求grub.cfg文件
解决了。我找到了刚刚删除内核前保存的grub.cfg了。。。开始以为不能保存。。。
- maivel
- 帖子: 293
- 注册时间: 2009-05-01 7:35
Re: 在线等-刚刚误删 求grub.cfg文件
LZ用的什么版本系统?是grub2么?grub是用menu.lst的
我这个人天生愚笨,体内装进一点点东西就会往外面冒,满地都是,一不小心就成了才华横溢。
- leeaman
- 帖子: 30702
- 注册时间: 2007-02-02 18:14
- 系统: debian sid
Re: 在线等-刚刚误删 求grub.cfg文件
呵呵,你现在用的是grub 1 还是 2 啊?生成的是menu.list那就是grub1了,那你折腾grub.cfg干嘛啊
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)