cms进行网站开发,折一把古风扇子,wordpress获取优酷视频缩略图,可以做彩票广告的网站吗一、grub2的启动配置文件grub.cfggrub2的启动配置文件grub.cfg是/boot/grub/grub.cfg#xff0c;而不是以前的memu.lst。如果你是多系统#xff0c;有Ubuntu和windows#xff0c;那么用下面的命令#xff0c;可以使grub2得到所以可以启动的系统。sudo update-grub实际就是让…一、grub2的启动配置文件grub.cfggrub2的启动配置文件grub.cfg是/boot/grub/grub.cfg而不是以前的memu.lst。如果你是多系统有Ubuntu和windows那么用下面的命令可以使grub2得到所以可以启动的系统。sudo update-grub实际就是让系统自己生成合适的grub.cfg文件。这个grub.cfg文件是只读属性so如果你要修改它需要权限。sudo chmod w /boot/grub/grub.cfg然后可以编辑grub.cfg了。sudo gedit /boot/grub/grub.cfg二、默认系统和等待时间1、set default0这是说从第一项启动。每个启动项都是以menuentry开始menuentry后面“xxx”是启动项名称然后xxx是启动代码。### BEGIN /etc/grub.d/10_linux ###menuentry “Ubuntu, Linux 2.6.31-14-generic” {recordfail1if [ -n ${have_grubenv} ]; then save_env recordfail; fiset quiet1insmod ext2set root(hd0,6)search –no-floppy –fs-uuid –set 040508ff-fec7-4c66-ba64-a09f8abe8059linux /boot/vmlinuz-2.6.31-14-generic rootUUID040508ff-fec7-4c66-ba64-a09f8abe8059 ro quiet splashinitrd /boot/initrd.img-2.6.31-14-generic}menuentry “Ubuntu, Linux 2.6.31-14-generic (recovery mode)” {recordfail1if [ -n ${have_grubenv} ]; then save_env recordfail; fiinsmod ext2set root(hd0,6)search –no-floppy –fs-uuid –set 040508ff-fec7-4c66-ba64-a09f8abe8059linux /boot/vmlinuz-2.6.31-14-generic rootUUID040508ff-fec7-4c66-ba64-a09f8abe8059 ro singleinitrd /boot/initrd.img-2.6.31-14-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 consolettyS0,115200n8}### END /etc/grub.d/20_memtest86 ###### BEGIN /etc/grub.d/30_os-prober ###menuentry “Microsoft Windows XP Home Edition (on /dev/sda1)” {insmod ntfsset root(hd0,1)search –no-floppy –fs-uuid –set 5c108a1c1089fd70drivemap -s (hd0) ${root}chainloader 1}if keystatus; thenif keystatus –shift; thenset timeout-1elseset timeout10fielseif sleep$verbose –interruptible 3 ; thenset timeout10fifi### END /etc/grub.d/30_os-prober ###### BEGIN /etc/grub.d/10_linux ###menuentry “Ubuntu, Linux 2.6.31-14-generic” {recordfail1if [ -n ${have_grubenv} ]; then save_env recordfail; fiset quiet1insmod ext2set root(hd0,6)search –no-floppy –fs-uuid –set 040508ff-fec7-4c66-ba64-a09f8abe8059linux /boot/vmlinuz-2.6.31-14-generic rootUUID040508ff-fec7-4c66-ba64-a09f8abe8059 ro quiet splashinitrd /boot/initrd.img-2.6.31-14-generic}menuentry “Ubuntu, Linux 2.6.31-14-generic (recovery mode)” {recordfail1if [ -n ${have_grubenv} ]; then save_env recordfail; fiinsmod ext2set root(hd0,6)search –no-floppy –fs-uuid –set 040508ff-fec7-4c66-ba64-a09f8abe8059linux /boot/vmlinuz-2.6.31-14-generic rootUUID040508ff-fec7-4c66-ba64-a09f8abe8059 ro singleinitrd /boot/initrd.img-2.6.31-14-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 consolettyS0,115200n8}### END /etc/grub.d/20_memtest86 ###### BEGIN /etc/grub.d/30_os-prober ###menuentry “Microsoft Windows XP Home Edition (on /dev/sda1)” {insmod ntfsset root(hd0,1)search –no-floppy –fs-uuid –set 5c108a1c1089fd70drivemap -s (hd0) ${root}chainloader 1}if keystatus; thenif keystatus –shift; thenset timeout-1elseset timeout10fielseif sleep$verbose –interruptible 3 ; thenset timeout10fifi### END /etc/grub.d/30_os-prober ###我 的第五个启动项是menuentry “Microsoft Windows XP Home Edition (on /dev/sda1)”我要它默认是以xp启动所以修改为set default”4″。(hd0,1)表示第一块硬盘的第一个分区我的Linux在(hd0,6)。当然你也可以把你需要默认启动的系统放到最前面那么就还是set default02、set timeout10if [ ${recordfail} 1 ]; thenset timeout-1elseset timeout10fi这里停留在grub选择系统界面的时间就是10秒即set timeout10。有时候我并不想等待这么久我直接启动xp需要Ubuntu时才按几下Shift键进入grub选择系统界面。可以添加如下代码if keystatus; thenif keystatus –shift; thenset timeout-1elseset timeout10fielseif sleep$verbose –interruptible 3 ; thenset timeout10fifi取消评论