Mengubah Urutan Boot Loader
#1
Sekedar share pengalaman ane. Ane dulu pengen ngerubah urutan boot loader windows jadi urutan pertama, agar pada saat komputer dinyalakan tidak perlu memilih lagi untuk masuk ke windows.
Pada saat grub tampil, biasanya pilihan urutannya adalah :

1. Linux
2. Linux(Recovery Mode)
3. WIndows

Cara untuk merubah urutannya agar windows jadi yang pertama adalah :

1. Ketikkan di terminal
Code:
gedit /boot/grub/grub.cfg

Code:
#
# 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
  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 load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root b2856cc9-3e2e-4619-a92a-0c7c1fa0bf38
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos6)'
  search --no-floppy --fs-uuid --set=root b2856cc9-3e2e-4619-a92a-0c7c1fa0bf38
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root b2856cc9-3e2e-4619-a92a-0c7c1fa0bf38
insmod png
if background_image /usr/share/images/desktop-base/kali-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian' --class debian --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root b2856cc9-3e2e-4619-a92a-0c7c1fa0bf38
    echo    'Loading Linux 3.7-trunk-686-pae ...'
    linux    /boot/vmlinuz-3.7-trunk-686-pae root=UUID=b2856cc9-3e2e-4619-a92a-0c7c1fa0bf38 ro initrd=/install/gtk/initrd.gz quiet radeon.modeset=0
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.7-trunk-686-pae
}
menuentry 'Debian (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos6)'
    search --no-floppy --fs-uuid --set=root b2856cc9-3e2e-4619-a92a-0c7c1fa0bf38
    echo    'Loading Linux 3.7-trunk-686-pae ...'
    linux    /boot/vmlinuz-3.7-trunk-686-pae root=UUID=b2856cc9-3e2e-4619-a92a-0c7c1fa0bf38 ro single initrd=/install/gtk/initrd.gz
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.7-trunk-686-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_otheros ###

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
menuentry "Windows 98" {
    set root=(hd0,msdos1)
    search --no-floppy --fs-uuid --set 20B0A27DB0A258D4
    chainloader +1
}
### END /etc/grub.d/30_otheros ###

### 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 ###

2. Pada grub.cfg akan ada code seperti ini :
[hide]
menuentry 'Debian' --class debian --class gnu-linux --class gnu --class os {

Setiap menu dalam grub diawali dengan "menuentry" dan diakhiri dengan tanda kurung kurawal tutup "}".

Jika melihat grub di atas ada 3 menu yaitu :

Linux, Linux (Recovery Mode) dan Windows

Dimana Linux adalah urutan pertama, Linux (Recovery) adalah urutan kedua dan Windows adalah urutan ketiga

Spoiler! :
[Image: Bootloader1_zpsb63d0a02.png]

Untuk merubah Windows jadi menu pertama, pindahkah menuentry windows ke atas menuentry linux. hasilnya seperti ini

Spoiler! :
[Image: Bootloader2_zpsd76b0b6b.png]

Save & Exit
[/hide]

Maka Urutannya sekarang adalah :
1. Windows
2. Linux
3. Linux (Recovery Mode)

Untuk melihat perubahannya tinggal restart aja :-bd

#2
thanks om, udah ane praktekin nih, biar windus di atas Big Grin soalnya pas temen nyalain lepi, sering lupa ane kasih tau, akhirnya boot ke BT deh Big Grin
When Creatifity Has Been Unlimited

http://duja.web.id

#3
Index bro .. rating, thanks & +1 rep .. thx for share
FOLLOW @DutaLinux
for more question and sharing about security and Opensource only

#4
waaahh,, berguna juga nihh.. nice share om.. Smile






Users browsing this thread: 1 Guest(s)