在线等-刚刚误删 求grub.cfg文件

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

在线等-刚刚误删 求grub.cfg文件

#1

帖子 哼哼hhhh » 2010-01-17 14:41

刚刚删除旧内核的时候不小心把grub.cfg文件给删除了。
不知道现在该怎么办。。。
在线等等。有知道该怎么办的吗
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 在线等-刚刚误删 求grub.cfg文件

#2

帖子 leeaman » 2010-01-17 14:43

live cd进去建立一个?或者仔细认真的研究smallaplle的教程?
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#3

帖子 哼哼hhhh » 2010-01-17 14:45

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

Re: 在线等-刚刚误删 求grub.cfg文件

#4

帖子 leeaman » 2010-01-17 14:47

靠,没有重起的话,sudo update-grub就可以啦
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#5

帖子 哼哼hhhh » 2010-01-17 14:47

不知道怎么搞了,
google ing。。。
头像
toddler
帖子: 367
注册时间: 2008-04-30 23:11

Re: 在线等-刚刚误删 求grub.cfg文件

#6

帖子 toddler » 2010-01-17 14:50

哼哼hhhh 写了:不知道怎么搞了,
google ing。。。
问你重启没有?如果没有重启打开终端输入sduo update-grub即可自动生成。
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#7

帖子 哼哼hhhh » 2010-01-17 14:55

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这个文件
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#8

帖子 哼哼hhhh » 2010-01-17 14:59

leeaman 写了:靠,没有重起的话,sudo update-grub就可以啦
ctl+h 看到 备份的 grub.cfg~, 发现是个里头没写过,是空的。这样重启没事吗。
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#9

帖子 哼哼hhhh » 2010-01-17 15:01

我的menu。list没动过
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 在线等-刚刚误删 求grub.cfg文件

#10

帖子 leeaman » 2010-01-17 15:03

晕,你真能哼~~~执行

代码: 全选

sudo update-grub
然后看看那个grub.cfg有内容再重起
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#11

帖子 哼哼hhhh » 2010-01-17 15:10

我已经update-grub了,但是结果 是 Updating /boot/grub/menu.lst ... done
好像是个别更新menulist阿。
geub。cfg这个文件还是没有看到。
我自己建了一个,但是不知道内容是什么,空的。郁闷了
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#12

帖子 哼哼hhhh » 2010-01-17 15:12

Searching for splash image ... none found, skipping ...这个是不是就是没有 grub.cfg造成的?
哼哼hhhh
帖子: 106
注册时间: 2009-07-11 9:40

Re: 在线等-刚刚误删 求grub.cfg文件

#13

帖子 哼哼hhhh » 2010-01-17 15:15

解决了。我找到了刚刚删除内核前保存的grub.cfg了。。。开始以为不能保存。。。
:em03
头像
maivel
帖子: 293
注册时间: 2009-05-01 7:35

Re: 在线等-刚刚误删 求grub.cfg文件

#14

帖子 maivel » 2010-01-17 15:16

LZ用的什么版本系统?是grub2么?grub是用menu.lst的
我这个人天生愚笨,体内装进一点点东西就会往外面冒,满地都是,一不小心就成了才华横溢。
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 在线等-刚刚误删 求grub.cfg文件

#15

帖子 leeaman » 2010-01-17 15:16

呵呵,你现在用的是grub 1 还是 2 啊?生成的是menu.list那就是grub1了,那你折腾grub.cfg干嘛啊 :em20
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
回复