Pages

Friday, June 29, 2012

How to add Puppy Linux "Frugal" installation to the Grub2?

Having a light-weight Linux distro like Puppy Linux is always handy to have on hard disk. Of course, you can keep it as a CD or USB and boot it as and when required. But, I prefer the traditional way - have it in HDD when there is no scarcity of space.


First install Puppy after booting it from CD or USB. Installations are very easy to follow and self-explanatory. Choose the "Frugal" option if you want it to co-exist with your existing OSs.


Once installation is done a text file with the grub2 update instructions will pop up. It is, however, not easy to follow. Copy and save it to a location which your primary linux distro can access. Then, reboot to your primary linux distro and type in the terminal


$gedit /etc/grub.d/40_custom


For Ubuntu, add sudo.


The initial lines would look like 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.



Add the following lines below it:


menuentry "Puppy Linux 5.3.3 (frugal on sda5)" {
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 2C20-6100
linux /slacko5.3.3frugal/vmlinuz pmedia=atahd psubdir=slacko5.3.3frugal
initrd /slacko5.3.3frugal/initrd.gz
}



Change the menuentry to your Puppy Linux version, anyway it is for your reference and doesn't matter what you write till you are aware what you are booting up.


Set root option you'll get from the text file pop up you had saved earlier after frugal installation of Puppy.


In search option, edit the uuid of the hard disk where you saved Puppy. You can get your all HDD uuid's by typing the following in the terminal:


$ls -l /dev/disk/by-uuid/


Next line would come from the text file again. Edit the folder name (here /slacko5.3.3frugal).


For example, I installed  Puppy Precise in sdb1 (with uuid 5ddaba1b-a977-4409-a78d-09f6993275a8) in root (hd1,0) folder /precise5.2.60frugal then my menuentry will be:


menuentry "Puppy Linux 5.2.60 (frugal on sdb1)" {

set root='(hd1,0)'
search --no-floppy --fs-uuid --set 5ddaba1b-a977-4409-a78d-09f6993275a8
linux /precise5.2.60frugal/vmlinuz pmedia=atahd psubdir=precise5.2.60frugal initrd /precise5.2.60frugal/initrd.gz
}





Finally, update grub! That's it. On rebooting, you'll get the Puppy boot option in the grub.

3 comments:

  1. Thanks a bundle for this guide!

    It's also handy to those of us doing a full HD install of Puppy.

    I am a Linux newbie and was attempting to install Puppy Linux alongside Unbuntu and Windows Vista using Grub2 which was installed by Ubuntu automatically.

    Ubuntu and Windows were showing up on the Grub bootloading menu OK.

    But Grub wouldn't detect my Puppy Linux (surprise!).

    As I was doing a full HD install, not the frugal, I added (instead) the commands suggested by the universal installer during the install process to th 40_custom file. Which in my case happened to be : -

    title Puppy Linux 5.4 full install in sda4
    root (hd0,3)
    kernel /boot/vmlinuz root=/dev/sda4 pmedia=atahd

    I then ran a grub update, and this time when I ran the grub2 customiser Puppy is detected by Grub2. I saved the changes and rebooted .... all working perfectly now!

    ReplyDelete
  2. Why is linux so hard? There are so many tweaks and files to get something as basic as booting an installation to work, None of the above worked for me and frankly I think I am off back to Windows - it works!

    ReplyDelete
  3. Wow, What an Outstanding post. I found this too much informatics. It is what I was seeking for. I would like to recommend you that please keep sharing such type of info.If possible, Thanks. I loved this article

    ReplyDelete