Revision [11645]

This is an old revision of Grub2 made by its-me-again on 2010-12-23 20:45:15.

 

Grub 2 Made Easy

Most people in our freenode channel #puppylinux think that Grub 2 is confusing, and it can be. I tried for some time then gave up and continued booting from cd.

The information below was done using linux mint 10 and is a general guide. Most steps will be similar for other linux.

The first thing about grub 2 is that it can detect and auto generate menus for all os it detects. this can be good, it does have some drawbacks. For some os and os configurations it may use a generic name. My vista os was detected as "windows recovery environment". And it will not detect a puppy frugal install.

First you need to set up your puppy frugal install. Don't forget to save the extra files to make it boot faster when prompted to.

(As mint is built on ubuntu base here is a tutoral on grub 2 for ubuntu. Click Here)

You will probably want to turn on the OS-Prober feature so you don't have a messy confusing grub. I have found this easier. (when you stop OS-Prober it is ok to change or remove unwanted auto detected entries from grub.cfg under # BEGIN /etc/grub.d/10_linux Remember to leave your os that the grub 2 is on).

In ubuntu baised os go to the file /etc/default/grub.
set GRUB_DISABLE_OS_PROBER=true (Enables/disables the os-prober check of other partitions for operating systems, including Windows, Linux, OSX and Hurd).

Now you need to go to /etc/grub.d/ (this is where you manually edit all your grub entries each filel edits a different part of /boot/grub/grub.cfg).

open 40_custom you will see this

#!/bin/sh
exec tail -n +3 $0
# 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.

here are my custom entries. (note that the main entry for Mint 10 I left in grub.cfg this is needed incase ou update the os changes).

#windows Vista Partition /dev/sda1
menuentry "Vista" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set dcdc98a0dc98768c
drivemap -s (hd0) ${root}
chainloader +1
}

# linux mint 9 own grub on /dev/sda3 #
menuentry "Load Linux Mint 9's grub.cfg" {
search --set --fs-uuid a3ae7b78-414e-429c-89e0-8ba82c952877
configfile /boot/grub/grub.cfg
}

linux mint Debian own grub on dev/sda5
menuentry "Load Linux Mint Debian's grub.cfg" {
search --set --fs-uuid 77419c15-6c3c-4e67-95f2-3d8588bb3613
configfile /boot/grub/grub.cfg
}

#menuentry "Linux Mint 9, 2.6.32-25-generic (/dev/sda3) (on /dev/sda3)" {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos3)'
# search --no-floppy --fs-uuid --set #a3ae7b78-414e-429c-89e0-8ba82c952877
# linux /boot/vmlinuz-2.6.32-22-generic root=UUID=a3ae7b78-414e-429c-89e0-8ba82c952877 ro quiet splash
# initrd /boot/initrd.img-2.6.32-22-generic
#}
#menuentry "Linux Mint 9, 2.6.32-25-generic (/dev/sda3) -- recovery mode (on /dev/sda3)" {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos3)'
# search --no-floppy --fs-uuid --set a3ae7b78-414e-429c-89e0-8ba82c952877
# linux /boot/vmlinuz-2.6.32-22-generic root=UUID=a3ae7b78-414e-429c-89e0-8ba82c952877 ro single
# initrd /boot/initrd.img-2.6.32-22-generic
#}

#menuentry "Linux Mint 9, 2.6.32-22-generic (/dev/sda3) (on /dev/sda3)" {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos3)'
# search --no-floppy --fs-uuid --set
#}
#menuentry "Linux Mint 9, 2.6.32-22-generic (/dev/sda3) -- recovery mode #(on /dev/sda3)" {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos3)'
# search --no-floppy --fs-uuid --set a3ae7b78-414e-429c-89e0-8ba82c952877
# linux /boot/vmlinuz-2.6.32-21-generic root=UUID=a3ae7b78-414e-429c-89e0-8ba82c952877 ro single
# initrd /boot/initrd.img-2.6.32-21-generic
#}
#menuentry "Linux Mint 9, 2.6.32-21-generic (/dev/sda3) (on /dev/sda3)" {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos3)'
# search --no-floppy --fs-uuid --set
#}
#menuentry "Linux Mint 9, 2.6.32-21-generic (/dev/sda3) -- recovery mode #(on /dev/sda3)" {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos3)'
# search --no-floppy --fs-uuid --set a3ae7b78-414e-429c-89e0-8ba82c952877
# linux /boot/vmlinuz-2.6.32-21-generic root=UUID=a3ae7b78-414e-429c-89e0-8ba82c952877 ro single
# initrd /boot/initrd.img-2.6.32-21-generic
#}

#menuentry 'LinuxMint Debian GNU/Linux, with Linux 2.6.32-5-686' --class linuxmint --class gnu-linux --class gnu --class os {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos5)'
# search --no-floppy --fs-uuid --set 77419c15-6c3c-4e67-95f2-3d8588bb3613
# echo 'Loading Linux 2.6.32-5-686 ...'
# linux /boot/vmlinuz-2.6.32-5-686 root=UUID=77419c15-6c3c-4e67-95f2-3d8588bb3613 ro vga=773 quiet
# echo 'Loading initial ramdisk ...'
# initrd /boot/initrd.img-2.6.32-5-686
#}
#menuentry 'LinuxMint Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os {
# insmod part_msdos
# insmod ext2
# set root='(hd0,msdos5)'
# search --no-floppy --fs-uuid --set 77419c15-6c3c-4e67-95f2-3d8588bb3613
# echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=77419c15-6c3c-4e67-95f2-3d8588bb3613 ro single vga=773
# echo 'Loading initial ramdisk ...'
# initrd /boot/initrd.img-2.6.32-5-686
#}

menuentry "Cloud Bible 3 (frugal on sda8)" {
set root=(hd0,7)
linux /qrky-130/vmlinuz
initrd /qrky-130/initrd.gz
}

menuentry "quirky-130 (on /dev/sdc3)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set c87ab663-e503-4833-8b7c-f52a114f8ad0
linux /qrky-130/vmlinuz pdev=sdc3 psubdir=quirky130
initrd /qrky-130/initrd.gz
}

Notice any entries beginning with # are ignored. its useful for infomation about each section or unused entries. to boot my other os i set up a link to there own grub menus for Mint 9 and Mint Debian. my puppy entries for quirky are booting frugal install on hdd and are there for an example you will have to tweak them for your own particular needs.

here are some other posts in forums that may be of interest.
http://www.murga-linux.com/puppy/viewtopic.php?t=54210
http://www.murga-linux.com/puppy/viewtopic.php?t=63175
http://www.murga-linux.com/puppy/viewtopic.php?p=452811#452811

I hope this takes some confusion out of grub 2 for you all who have os that use it adn also puppy. have fun with grub 2
if only I had something ,like this when i started out trying to learn grub 2.

My other wikka links
1) What puppy Linux is best for you
2) Puppy Linux 431
3) Puppy Linux 5 Series
4) Lighthouse Puppy
5) Quirky Puppy
6) what are .sfs files
There is one comment on this page. [Display comment]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki