How to change OS Name in Dual Boot Menu List

pyoon
  13 years ago
  0

This tutorial is same way with tutorial 3 Steps to Remove Windows from Dual Boot Menu (it's very easy).

and How to Change Order of Dual Boot MenuList. But Step 2 is different. Take a look.

SCENARIO

We have 2 OS's, Linuxmint and Windows 7 (or other Windows). This time, we will change OS Name in the boot menu list, the first one. This way is not only for dual boot buat also for single boot Linuxmint.

STEP 1

Fisrt, enter your Linuxmint. Open Terminal and type :

gksudo gedit /boot/grub/grub.cfg

this command will open file grub.cfg. It contains some commands that set dual boot menu. Yes, we can edit it.

STEP 2

Search word "Windows" in this file, and we will find some commands like this.

### BEGIN /etc/grub.d/30_os-prober ###
menuentry “Windows 7 (on /dev/sda1)” {
insmod ntfs
set root=’(hd0,1)’
search –no-floppy –fs-uuid –set 2c72f8d872f8a7aa
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Change the word "Windows 7" with other word, such as "My Secret Windows". So that command become like this.

### BEGIN /etc/grub.d/30_os-prober ###
menuentry “My Secret Windows (on /dev/sda1)” {
insmod ntfs
set root=’(hd0,1)’
search –no-floppy –fs-uuid –set 2c72f8d872f8a7aa
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Other Example :

### BEGIN /etc/grub.d/10_linux ###
menuentry "Linux Mint 9, 2.6.32-21-generic (/dev/sda6)" --class linuxmint --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,6)'
    search --no-floppy --fs-uuid --set 32054218-5964-40c0-84e7-efb0cd3a3a2e
    linux    /boot/vmlinuz-2.6.32-21-generic root=UUID=32054218-5964-40c0-84e7-efb0cd3a3a2e ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-21-generic
}
menuentry "Linux Mint 9, 2.6.32-21-generic (/dev/sda6) -- recovery mode" --class linuxmint --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,6)'
    search --no-floppy --fs-uuid --set 32054218-5964-40c0-84e7-efb0cd3a3a2e
    echo    'Loading Linux 2.6.32-21-generic ...'
    linux    /boot/vmlinuz-2.6.32-21-generic root=UUID=32054218-5964-40c0-84e7-efb0cd3a3a2e ro single
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

After change the name become like this.

### BEGIN /etc/grub.d/10_linux ###
menuentry "My Favourite Linux (/dev/sda6)" --class linuxmint --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,6)'
    search --no-floppy --fs-uuid --set 32054218-5964-40c0-84e7-efb0cd3a3a2e
    linux    /boot/vmlinuz-2.6.32-21-generic root=UUID=32054218-5964-40c0-84e7-efb0cd3a3a2e ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-21-generic
}
menuentry "My Favourite Linux-generic (/dev/sda6) -- recovery mode" --class linuxmint --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,6)'
    search --no-floppy --fs-uuid --set 32054218-5964-40c0-84e7-efb0cd3a3a2e
    echo    'Loading Linux 2.6.32-21-generic ...'
    linux    /boot/vmlinuz-2.6.32-21-generic root=UUID=32054218-5964-40c0-84e7-efb0cd3a3a2e ro single
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

STEP 3

To make it works. Update the grub. Type to Terminal :

sudo update-grub

FInally, restart your computer.

Done

Comments
pyoon 13 years ago

"grub.cfg is overwritten anytime there is an update, a kernel is added/removed, or the user runs update-grub."
as long as there're no those actions, grub.cfg wont overwritten. CMIIW.


remoulder 13 years ago

Your 3 tutorials all involve editing grub.cfg which is incorrect as your changes will be overwritten at some point. See https://help.ubuntu.com/community/Grub2 for basic help with grub2