Adding Puppy Linux to Ubuntu's Grub2 Menu

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
yorkiesnorkie
Posts: 504
Joined: Mon 04 Jun 2007, 13:11
Location: George's Island

Adding Puppy Linux to Ubuntu's Grub2 Menu

#1 Post by yorkiesnorkie »

Hi,

On the shoulders of giants, I added puppy linux 5.2.8 to my Ubuntu grub2 menu. After I installed Ubuntu 12.04 LTS I discovered that the usual grub menu installed with puppy linux was no longer working. Instead, I now had Grub2, and no entry for puppy linux.

Just to be clear, I have a frugal installation of Puppy528 on sda1, the windows ntfs partition.

After a bit of research I learned that the entry for puppy linux can be entered into the file etc/grub.d/40_custom, it looks like this:

Code: Select all

#!/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.
menuentry   "Puppy Linux Lupu 528 on sda1"  {
set   root=(hd0,1)
linux   /puppy528/vmlinuz   root=/dev/sda1  psubdir=puppy528
initrd  /puppy528/initrd.gz
}
I edited 40_custom from within Ubuntu, which required a bit of command line work.

At the terminal I entered:

Code: Select all

sudo gedit etc/grub.d/40_custom
This causes Ubutu to ask for the password. Enter it and press enter.

I have geany installed, so the gedit part could be substituted with another program.

I pasted in the boot stanza, and saved the file. Then you have to enter another command

Code: Select all

sudo update-grub
This updates the grub2 menu. When you reboot Puppy Linux is now the last entry in the menu.

I hope this is clear enough!

Yorkiesnorkie
:-)
Last edited by yorkiesnorkie on Mon 14 Jan 2013, 14:20, edited 1 time in total.
[url]http://www.busygamemaster.com[/url]

User avatar
yorkiesnorkie
Posts: 504
Joined: Mon 04 Jun 2007, 13:11
Location: George's Island

#2 Post by yorkiesnorkie »

The gksudo in ubuntu doesn't seem to be necessary. I just used sudo, and that works. e.g.

Code: Select all

sudo geany etc/grub.d/40_custom
and

Code: Select all

sudo update-grub
I noticed that in the boot stanza hda0,1 is sda1, apparently the numbers now match your drive, sda2 would be hda0,2.
[url]http://www.busygamemaster.com[/url]

.israel.
Posts: 6
Joined: Mon 06 Jan 2014, 22:48

#3 Post by .israel. »

sudo is not recommended when running a GUI app.
http://www.psychocats.net/ubuntu/graphicalsudo

basically some changes can cause HUGE problems if you use sudo instead of gksu (i.e. root owning things). On puppy it isn't an issue because you are root and do not need su or gksu or sudo :)
p.s. thanks for the post, this is great info for everyone!

Post Reply