Read : 3 minutes. 30 November 2022
Tags: Linux Windows

Cara Setting Dual Grub Linux Mint Dan Windows

Cara Setting Dual grub linux Mint dan Windows Cara mengubah urutan boot loader Grub (edit grub linux mint)

Berikut Cara mengubah urutan boot loader Grub (edit grub linux mint)

Cara edit grub linux mint

  • Buka Terminal kemudian masukkan Perintah

sudo /boot/grub/grub.cfg

  • kemudian masukkan password
  • lalu edit file grub.cfg
 1
 2menuentry ‘Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda7)’ -class linuxmint -class gnu-linux -class gnu -class os {
 3recordfail
 4set gfxpayload=$linux_gfx_mode
 5insmod gzio
 6insmod part_msdos
 7insmod ext2
 8set root='(hd0,msdos7)’
 9search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
10linux /boot/vmlinuz-3.0.0-12-generic root=UUID=5c4f76a1-95a9-48d6-a71c-df1bd92b24e9 ro quiet splash vt.handoff=7
11initrd /boot/initrd.img-3.0.0-12-generic
12}
13
14menuentry ‘Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda7) — recovery mode’ -class linuxmint -class gnu-linux -class gnu -class os {
15recordfail
16insmod gzio
17insmod part_msdos
18insmod ext2
19set root='(hd0,msdos7)’
20search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
21echo ‘Loading Linux 3.0.0-12-generic …’
22linux /boot/vmlinuz-3.0.0-12-generic root=UUID=5c4f76a1-95a9-48d6-a71c-df1bd92b24e9 ro recovery nomodeset
23echo ‘Loading initial ramdisk …’
24initrd /boot/initrd.img-3.0.0-12-generic
25}
26
27## END /etc/grub.d/10_linux ###
28## BEGIN /etc/grub.d/10_lupin ###
29## END /etc/grub.d/10_lupin ###
30## BEGIN /etc/grub.d/20_linux_xen ###
31## END /etc/grub.d/20_linux_xen ###
32## BEGIN /etc/grub.d/20_memtest86+ ###
33
34menuentry “Memory test (memtest86+)” {
35insmod part_msdos
36insmod ext2
37set root='(hd0,msdos7)’
38search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
39linux16 /boot/memtest86+.bin
40}
41
42menuentry “Memory test (memtest86+, serial console 115200)” {
43insmod part_msdos
44insmod ext2
45set root='(hd0,msdos7)’
46search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
47linux16 /boot/memtest86+.bin console=ttyS0,115200n8
48}
49
50## END /etc/grub.d/20_memtest86+ ###
51## BEGIN /etc/grub.d/30_os-prober ###
52menuentry “Windows (on /dev/sda1 )” -class windows -class os {
53insmod part_msdos
54insmod ntfs
55set root='(hd0,msdos1)’
56search -no-floppy -fs-uuid -set=root 66F28887F2885D65
57chainloader +1
58}
59## END /etc/grub.d/30_os-prober ###

Setiap menu dalam grub loader di awali dengan tulisan “menuentry” dan diakhiri dengan tanda kurung kurawal tutup “}”. Jadi kalo kita lihat sebagian kode di atas ada 5 menu.

Jika ingin memindahkan boot order windows menjadi urutan paling atas, tinggal cut saja tulisan yang saya beri warna font merah ke urutan paling atas. Jadi nanti seperti ini:

 1## BEGIN /etc/grub.d/30_os-prober ###
 2menuentry “Windows (on /dev/sda1 )” -class windows -class os {
 3insmod part_msdos
 4insmod ntfs
 5set root='(hd0,msdos1)’
 6search -no-floppy -fs-uuid -set=root 66F28887F2885D65
 7chainloader +1
 8}
 9## END /etc/grub.d/30_os-prober ###
10
11menuentry ‘Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda7)’ -class linuxmint -class gnu-linux -class gnu -class os {
12recordfail
13set gfxpayload=$linux_gfx_mode
14insmod gzio
15insmod part_msdos
16insmod ext2
17set root='(hd0,msdos7)’
18search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
19linux /boot/vmlinuz-3.0.0-12-generic root=UUID=5c4f76a1-95a9-48d6-a71c-df1bd92b24e9 ro quiet splash vt.handoff=7
20initrd /boot/initrd.img-3.0.0-12-generic
21}
22
23menuentry ‘Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda7) — recovery mode’ -class linuxmint -class gnu-linux -class gnu -class os {
24recordfail
25insmod gzio
26insmod part_msdos
27insmod ext2
28set root='(hd0,msdos7)’
29search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
30echo ‘Loading Linux 3.0.0-12-generic …’
31linux /boot/vmlinuz-3.0.0-12-generic root=UUID=5c4f76a1-95a9-48d6-a71c-df1bd92b24e9 ro recovery nomodeset
32echo ‘Loading initial ramdisk …’
33initrd /boot/initrd.img-3.0.0-12-generic
34}
35
36## END /etc/grub.d/10_linux ###
37## BEGIN /etc/grub.d/10_lupin ###
38## END /etc/grub.d/10_lupin ###
39## BEGIN /etc/grub.d/20_linux_xen ###
40## END /etc/grub.d/20_linux_xen ###
41## BEGIN /etc/grub.d/20_memtest86+ ###
42
43menuentry “Memory test (memtest86+)” {
44insmod part_msdos
45insmod ext2
46set root='(hd0,msdos7)’
47search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
48linux16 /boot/memtest86+.bin
49}
50
51menuentry “Memory test (memtest86+, serial console 115200)” {
52insmod part_msdos
53insmod ext2
54set root='(hd0,msdos7)’
55search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
56linux16 /boot/memtest86+.bin console=ttyS0,115200n8
57}
58## END /etc/grub.d/20_memtest86+ ###

Tulisan diantara tanda petik pada: menuentry “Windows (on /dev/sda1 )” dapat kita ubah sesuka hati kita.

Misalnya menjadi menuentry “My OS Windows 7 “

Begitu juga dengan menu lainnya. Pada menuentry ‘Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda7)’

Kita bisa mengubahnya menjadi: menuentry ‘Linux Mint Favoritku’

Menu entry -menu entry lain bisa kita hapus jika mau. Dengan syarat menghapusnya mulai dari tulisan menuentry hingga tanda kurung kurawal tutup. Misalnya kode ini dihapus semua:

1menuentry “Memory test (memtest86+, serial console 115200)” {
2insmod part_msdos
3insmod ext2
4set root='(hd0,msdos7)’
5search -no-floppy -fs-uuid -set=root 5c4f76a1-95a9-48d6-a71c-df1bd92b24e9
6linux16 /boot/memtest86+.bin console=ttyS0,115200n8
7}

Kemudian Save, dan masukkan Perintah update-grub dan reboot

Cara Setting Dual Grub Linux Mint Dan Windows