grub.cfg文件如何修改。
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 101
- 注册时间: 2009-05-03 8:57
grub.cfg文件如何修改。
刚装完ubuntu 9.10想修改一下grub的设置,可是我用sudo gedit改完保存的时候提示磁盘只读无法保存。请问有什么修改这个文件的方法吗?
- huabinwu
- 帖子: 68
- 注册时间: 2008-08-15 14:38
Re: grub.cfg文件如何修改。
代码: 全选
sudo chmod 744 /boot/grub/grub.cfg
- wangdu2002
- 帖子: 13284
- 注册时间: 2008-12-13 19:39
- 来自: 物华天宝人杰地灵
Re: grub.cfg文件如何修改。
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
海内生明月,天涯共此夕。
--------------------吾本独!
-
- 帖子: 101
- 注册时间: 2009-05-03 8:57
Re: grub.cfg文件如何修改。
感谢各位。知道了
- 真爱唯依
- 帖子: 44
- 注册时间: 2009-09-19 17:41
- 来自: 中國廣州
- 联系:
- jiachaorui
- 帖子: 187
- 注册时间: 2007-05-16 22:30
Re: grub.cfg文件如何修改。
grub.cf默认是只读的,在属性中改为读写就OK了!
*IdeaPad Y450A TSI/T6600/PM45/1TB/GT 130M/2G DDR3/14' LED@1366X768 (2009-05)
xubuntu/Windows 7 32bit
xubuntu/Windows 7 32bit
-
- 帖子: 10
- 注册时间: 2009-05-11 22:40
Re: grub.cfg文件如何修改。
我执行这句也没报错sudo chmod 744 /boot/grub/grub.cfg
但是第次打,还是只读的,不能保存,谁知道为什么?
但是第次打,还是只读的,不能保存,谁知道为什么?
- 速腾1994
- 论坛版主
- 帖子: 17379
- 注册时间: 2008-11-01 20:43
- 系统: Arch+gnome
Re: grub.cfg文件如何修改。
代码: 全选
sudo chmod -w /boot/grub/grub.cfg
- bbeikke
- 帖子: 880
- 注册时间: 2008-10-14 21:54
Re: grub.cfg文件如何修改。
最好不要修改grub.cfg,改了后升级内核或者sudo update-grub还是会变回原来的。
按照smallapple的教程修改相应文件才是王道。
按照smallapple的教程修改相应文件才是王道。
地狱可以想象,天堂却无法描述。
-
- 帖子: 50
- 注册时间: 2009-11-23 11:53
- 来自: 中国江苏省
- 联系:
- peteryeh64
- 论坛版主
- 帖子: 9379
- 注册时间: 2008-12-20 15:43
- 系统: 家kubuntu20.04
- 来自: 心靈深處
Re: grub.cfg文件如何修改。
viewtopic.php?f=77&t=244629..............
[论坛版主行为规定]+[PITIVI簡易教程]+[ubuntu裝迅雷]
[releases.ubuntu.com]+[cdimage.ubuntu.com]+[old-releases.ubuntu.com]
[學ubuntu必須拜讀懶蝸牛"笨兔兔的故事"=viewtopic.php?f=112&t=162040][Linux明日的希望在中國]
[releases.ubuntu.com]+[cdimage.ubuntu.com]+[old-releases.ubuntu.com]
[學ubuntu必須拜讀懶蝸牛"笨兔兔的故事"=viewtopic.php?f=112&t=162040][Linux明日的希望在中國]
-
- 帖子: 2
- 注册时间: 2010-12-26 20:36
Re: grub.cfg文件如何修改。
偶滴grub.cfg重刷了一遍,这样的,怎么改
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
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
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
set locale_dir=($root)/boot/grub/locale
set lang=zh
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### 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 ###
### 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.35-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux /boot/vmlinuz-2.6.35-24-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro quiet splash
initrd /boot/initrd.img-2.6.35-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
echo 'Loading Linux 2.6.35-24-generic ...'
linux /boot/vmlinuz-2.6.35-24-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set c42c44592c44491e
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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
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
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
set locale_dir=($root)/boot/grub/locale
set lang=zh
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### 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 ###
### 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.35-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux /boot/vmlinuz-2.6.35-24-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro quiet splash
initrd /boot/initrd.img-2.6.35-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
echo 'Loading Linux 2.6.35-24-generic ...'
linux /boot/vmlinuz-2.6.35-24-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=064c922c-d3ba-41ba-994d-e9cfca67f41e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 064c922c-d3ba-41ba-994d-e9cfca67f41e
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set c42c44592c44491e
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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###