GRUB

From MEPIS Documentation Wiki

Jump to: navigation, search
Default MEPIS 8.5 Grub Screen

Contents

Introduction

GRUB is the boot loader used by MEPIS. GRUB is a very powerful boot loader, which can load a wide variety of free operating systems, as well as proprietary operating systems with chain-loading.

Installation

GRUB is installed by default.

Use

MEPIS 11

MEPIS 8

The default GRUB screen in MEPIS shows 3 kernel entries followed by a MEMTEST entry. The GRUB screen is defined by the /boot/grub/menu.lst file which looks something like this depending on your version of MEPIS and hard drive configuration:

 timeout 15
 color cyan/blue white/blue
 foreground ffffff
 background 0639a1

 gfxmenu /boot/grub/message

 title MEPIS at sda1, newest kernel
 root (hd0,2)
 kernel /boot/vmlinuz root=/dev/sda1 nomce quiet splash vga=791 resume=/dev/sda4  
 boot

 title MEPIS at sda1, previous kernel (if any)
 root (hd0,2)
 kernel /boot/vmlinuz.old root=/dev/sda1 nomce quiet splash vga=791 resume=/dev/sda4  
 boot

 title MEPIS at sda1, kernel 2.6.22-1-mepis-smp
 root (hd0,2)
 kernel /boot/vmlinuz-2.6.22-1-mepis-smp root=/dev/sda1 nomce quiet splash vga=791 resume=/dev/sda4  
 boot

 title MEMTEST
 kernel /boot/memtest86+.bin

Three kernel entries are listed for technical reasons. Warren, the developer of MEPIS, provides this explanation: "Some software, for example os-prober, only recognizes kernels that have specific entries in menu.lst, for example the 3rd entry in the usual MEPIS menu.lst. The Debian kernel installation script does something special if the vmlinuz and vmlinuz.old symlinks exist. When a new kernel is installed, it automatically becomes vmlinuz and the previous vmlinuz becomes vmlinuz.old. So if a new kernel, for example the desktop-smp kernel, is installed, then in the menu.lst it is automatically the newer kernel and the previous newer kernel becomes the older kernel. This was a simple way to allow users to add new kernels without having to edit the menu.lst every time."

The final entry, Memtest is a thorough, stand-alone memory test for 386, 486 and Pentium systems. It writes a series of test patterns to every memory address, then reads back the data written and compares it for errors.

Tips and tricks

Create your own GRUB screen

1) Install cpio from the repos if not installed already

2) Create the image

  • Scale your background picture to 800x600 px.
  • Use inkscape (available from the repos) to make box and boot options line or whatever you want, (800x600).
  • Merge them with Gimp. Use "posterize" in the color menu to reduce the number of colors to 255 and save to the desktop.

3) Extract the message
After creating a folder named h on desktop, enter it and open a terminal by pressing F4

cd /home/username/Desktop/h
cp /boot/grub/message /home/username/Desktop/h/message
cpio -idv < message

Now you have extracted the files from the cpio archive. If you have any problems you can use su, some files inside the message are write protected.

4) Adjust the image

  • Open the picture you want to replace (in this case back.jpg) with Gimp.
  • Go to your own picture and open it with Gimp (not as a layer) and select the whole picture. Now press Ctrl+c to copy the image.
  • Click the window with the original image and press ctrl+v to paste your own image over the old one. This way you can be sure the resulting file will have correct color depth.
  • Name the image back.jpg and save to the desktop. Don't make the file to large, the upper limit is 170 Kb.

5) Adjust the message
Now inside the folder h again, open a terminal:

rm back.jpg
rm message
cp /home/username/Desktop/back.jpg /home/username/Desktop/h/back.jpg
ls | cpio -ov > ../message

This will create the message on desktop, outside the h folder.
6) Move everything back to GRUB

cd /home/Henry/Desktop
su
cp /home/Henry/Desktop/message /boot/grub/message

Run this command as root after replacing the message image:

update-initramfs -u -t

Links

More: Wikipedia article

Personal tools
In other languages