how to edit bootloader linux

1. Enter the terminal CTRL + ALT + T and enter the following code
    root @ bt: ~ # sudo gedit /boot/grub/grub.cfg

With the above command will display a new page with the code that we will later edit, the code is a code that contains information about the grub loader on our computer.

2. Next we will change the code as we want
    Find the following code:



# # # BEGIN / etc/grub.d/10_linux # # #
menuentry 'Ubuntu, kernel 2.6.38' - class ubuntu - class gnu-linux - class gnu - class os {
recordfail
insmod ext2
set root = '(hd0, 9)'
search - no-floppy - fs-uuid - set 3cd41ddd-E322-4a91-a118-dc9069303299
linux / boot/vmlinuz-2.6.38 root = UUID = 3cd41ddd-E322-4a91-a118-dc9069303299 ro text splash nomodeset vga = 791
initrd / boot/initrd.img-2.6.38
}
menuentry 'Ubuntu, with Linux 2.6.38 (recovery mode)' - class ubuntu - class gnu-linux - class gnu - class os {
recordfail
insmod ext2
set root = '(hd0, 9)'
search - no-floppy - fs-uuid - set 3cd41ddd-E322-4a91-a118-dc9069303299
echo 'Loading Linux 2.6.38 ...'
linux / boot/vmlinuz-2.6.38 root = UUID = 3cd41ddd-E322-4a91-a118-ro single dc9069303299
echo 'Loading initial ramdisk ...'
initrd / boot/initrd.img-2.6.38
}
# # # END / etc/grub.d/10_linux # # #

# # # BEGIN / etc/grub.d/20_memtest86 + # # #
menuentry "Memory test (memtest86 +)" {
insmod ext2
set root = '(hd0, 9)'
search - no-floppy - fs-uuid - set 3cd41ddd-E322-4a91-a118-dc9069303299
linux16 / boot/memtest86 +. bin
}
menuentry "Memory test (memtest86 +, serial console 115200)" {
insmod ext2
set root = '(hd0, 9)'
search - no-floppy - fs-uuid - set 3cd41ddd-E322-4a91-a118-dc9069303299
linux16 / boot/memtest86 +. bin console = ttyS0, 115200n8
}
# # # END / etc/grub.d/20_memtest86 + # # #

================================================== ======
Description: Code to be changed is the color code BLUE
================================================== ======
Example:
==============
menuentry 'Ubuntu, kernel 2.6.38' - class ubuntu - class gnu-linux - class gnu - class os {
recordfail
insmod ext2
set root = '(hd0, 9)'
search - no-floppy - fs-uuid - set 3cd41ddd-E322-4a91-a118-dc9069303299
linux / boot/vmlinuz-2.6.38 root = UUID = 3cd41ddd-E322-4a91-a118-dc9069303299 ro text splash nomodeset vga = 791
initrd / boot/initrd.img-2.6.38
}

==============
We replace Being
==============
menuentry 'Ubuntu 99' - class ubuntu - class gnu-linux - class gnu - class os {
recordfail
insmod ext2
set root = '(hd0, 9)'
search - no-floppy - fs-uuid - set 3cd41ddd-E322-4a91-a118-dc9069303299
linux / boot/vmlinuz-2.6.38 root = UUID = 3cd41ddd-E322-4a91-a118-dc9069303299 ro text splash nomodeset vga = 791
initrd / boot/initrd.img-2.6.38
}

3. Once we edit or rename our grub loader, then we save
4. Restart the computer to see the results :)

thx...


Emoticon Emoticon