Linuz

Just Open Source


Ads

Grub Setting on Ubuntu 9.10 Karmic Koala

GRand Unified Bootloader it is the software responsible for loading and transferring control to the operating system kernel during the initial boot. On the Koala Karmic is using GRUB version 2. On this version there is a bit different on file configuration. On last version, all of the GRUB configuration can we see on file ‘/boot/grub/menu.list’. On this version, the configuration file is on this path :


vmlinuz@linuz:~$ sudo gedit /etc/default/grub
01 # If you change this file, run 'update-grub' afterwards to update
02 # /boot/grub/grub.cfg.
03
04 GRUB_DEFAULT=0
05 #GRUB_HIDDEN_TIMEOUT=10
06 #GRUB_HIDDEN_TIMEOUT_QUIET=true
07 GRUB_TIMEOUT="10"
08 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
09 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
10 GRUB_CMDLINE_LINUX=""
11
12 # Uncomment to disable graphical terminal (grub-pc only)
13 #GRUB_TERMINAL=console
14
15 # The resolution used on graphical terminal
16 # note that you can use only modes which your graphic card supports via VBE
17 # you can see them in real GRUB with the command `vbeinfo'
18 #GRUB_GFXMODE=640x480
19
20 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
21 #GRUB_DISABLE_LINUX_UUID=true
22
23 # Uncomment to disable generation of recovery mode menu entrys
24 #GRUB_DISABLE_LINUX_RECOVERY="true"
This file contain GRUB setting variable. You can make any change setting of this variable to make the GRUB running as you want. Beware that after you editing this file, you must running the update-grub syntax on console to update the GRUB setting.
If you want to change the list of the Boot Menu, you can edit on this path :
vmlinuz@linuz:~$ sudo gedit /boot/grub/grub.cfg
01 #
02 # DO NOT EDIT THIS FILE
03 #
04 # It is automatically generated by /usr/sbin/grub-mkconfig using templates
05 # from /etc/grub.d and settings from /etc/default/grub
06 #
07
08 ### BEGIN /etc/grub.d/00_header ###
09 if [ -s /boot/grub/grubenv ]; then
10 have_grubenv=true
11 load_env
12 fi
13 set default="0"
14 if [ ${prev_saved_entry} ]; then
15 saved_entry=${prev_saved_entry}
16 save_env saved_entry
17 prev_saved_entry=
18 save_env prev_saved_entry
19 fi
20 insmod ext2
21 set root=(hd0,1)
22 search --no-floppy --fs-uuid --set 15ed4e71-1d78-4ed8-9855-3b3771861ce9
23 if loadfont /usr/share/grub/unicode.pf2 ; then
24 set gfxmode=640x480
25 insmod gfxterm
26 insmod vbe
27 if terminal_output gfxterm ; then true ; else
28 # For backward compatibility with versions of terminal.mod that don't
29 # understand terminal_output
30 terminal gfxterm
31 fi
32 fi
33 if [ ${recordfail} = 1 ]; then
34 set timeout=-1
35 else
36 set timeout=3
37 fi
38 ### END /etc/grub.d/00_header ###
39
40 ### BEGIN /etc/grub.d/05_debian_theme ###
41 set menu_color_normal=white/black
42 set menu_color_highlight=black/white
43 ### END /etc/grub.d/05_debian_theme ###
44
45 ### BEGIN /etc/grub.d/10_linux ###
46 menuentry "Ubuntu, Linux 2.6.31-14-generic" {
47 recordfail=1
48 if [ -n ${have_grubenv} ]; then save_env recordfail; fi
49 set quiet=1
50 insmod ext2
51 set root=(hd0,1)
52 search --no-floppy --fs-uuid --set 15ed4e71-1d78-4ed8-9855-3b3771861ce9
53 linux /boot/vmlinuz-2.6.31-14-generic root=UUID=15ed4e71-1d78-4ed8-9855-3b3771861ce9 ro   quiet splash
54 initrd /boot/initrd.img-2.6.31-14-generic
55 }
56 menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
57 recordfail=1
58 if [ -n ${have_grubenv} ]; then save_env recordfail; fi
59 insmod ext2
60 set root=(hd0,1)
61 search --no-floppy --fs-uuid --set 15ed4e71-1d78-4ed8-9855-3b3771861ce9
62 linux /boot/vmlinuz-2.6.31-14-generic root=UUID=15ed4e71-1d78-4ed8-9855-3b3771861ce9 ro single
63 initrd /boot/initrd.img-2.6.31-14-generic
64 }
65 ### END /etc/grub.d/10_linux ###
66
67 ### BEGIN /etc/grub.d/20_memtest86+ ###
68 menuentry "Memory test (memtest86+)" {
69 linux16 /boot/memtest86+.bin
70 }
71 menuentry "Memory test (memtest86+, serial console 115200)" {
72 linux16 /boot/memtest86+.bin console=ttyS0,115200n8
73 }
74 ### END /etc/grub.d/20_memtest86+ ###
75
76 ### BEGIN /etc/grub.d/30_os-prober ###
77 menuentry "Windows Vista (loader) (on /dev/sda2)" {
78 insmod ntfs
79 set root=(hd0,2)
80 search --no-floppy --fs-uuid --set 5220fd0220fcedbb
81 chainloader +1
82 }
83 if [ ${timeout} != -1 ]; then
84 if sleep --interruptible 3 ; then
85 set timeout=0
86 fi
87 fi
88 ### END /etc/grub.d/30_os-prober ###
89
90 ### BEGIN /etc/grub.d/40_custom ###
91 # This file provides an easy way to add custom menu entries.  Simply type the
92 # menu entries you want to add after this comment.  Be careful not to change
93 # the 'exec tail' line above.
94 ### END /etc/grub.d/40_custom ###
If you want to hide the boot menu on GRUB 2, you must do little more things like this one.
vmlinuz@linuz:~$ sudo gedit /etc/grub.d/30_os-prober
27 adjust_timeout () {
28 if [ "x${found_other_os}" = "x" ] ; then
29 if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
30 if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
31 verbose=
32 else
33 verbose=" --verbose"
34 fi
35
36 if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then
37 cat <<EOF
38 if [ \${timeout} != -1 ]; then
39 if keystatus; then
40 if keystatus --shift; then
41 set timeout=-1
42 else
43 set timeout=0
44 fi
45 else
46 if sleep$verbose --interruptible 3 ; then
47 set timeout=0
48
49 fi
50 fi
51 fi
52 EOF
53 else
54 cat << EOF
55 if [ \${timeout} != -1 ]; then
56 if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
57 set timeout=0
58 fi
59 fi
60 EOF
61 fi
62 fi
63 fi
64 }

Replace the script

Post Metadata

Date
May 14th, 2010

Author
vmlinuz

Category

Tags



Comments are closed.