Love Puppy but want it on your HDD alongside Ubuntu/Mint?

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
Artistjsb
Posts: 2
Joined: Tue 13 Dec 2011, 18:35

Love Puppy but want it on your HDD alongside Ubuntu/Mint?

#1 Post by Artistjsb »

The definitive guide to setting up a frugal install of any puppy distro alongside Ubuntu 9.10/Mint 9 and later (the ones that use Grub2 rather than Grub Legacy)

After a huge amount of searching and investigating I have at last managed to conquer this problem.

Yes the answer is out there somewhere, but you have to know what you're asking for and it helps if you understand the Grub terminology, Puppy terminology and also Ubuntu/Mint terminology.

The experts can do this with ease, I'm sure; but for new linux users, and those who want to start experimenting after a few years with one distro I intend this to be the one page answer.

I am not going to pretend I'm any sort of expert on other linux stuff as I'm learning all the time, but I think I have found the easiest way to tackle this particular problem here.

First of all – The problem

Many Linux distros still use Grub Legacy and will probably continue to do so, however, the most popular – Ubuntu and Mint have moved to Grub2 and consequently instructions on setting up frugal installs and Grub from Puppy distros don't work. (You cannot just follow Grub Bootloader Config (in System) instructions and hope to get your new distro working, as it is based on Grub Legacy and this is not properly compatible with Grub2.)

So here is the way to do it so that your frugal install Puppy will appear in Ubuntu's/Mint's Grub2 menu (and boot up too).

I will make the assumption that
a. you already have a recent version of Ubuntu/Mint running on your PC or laptop.
b. you have already prepared a partition (fat32, ext2 or ext3) for your frugal install and you know the partition's label.

1. Boot up your PC with your live Puppy CD/USB.
a) Either use Puppy Universal Installer (in Setup) or manually copy the necessary files to your new puppy partition (instructions for this can be found fairly easily).
b) Ignore the final suggestion that you use Grub Bootloader Config.
c) Check that the relevant files have been copied to your new puppy partition.
2. Log out and reboot into Ubuntu/Mint
a) Open up the Terminal
b) Type:

Code: Select all

sudo gedit
c) Type in your password
d) Use gedit to open the 40_custom file (File system/etc/grub.d/40_custom).
e) Add in a second line under - '#!/bin/sh' – This will provide visual notification in Grub2 that the '40_custom' file is being read.

Code: Select all

echo "Adding 40_custom menu entries." >&2 
f) Ensure that - exec tail -n +3 $0 -is now the third line.
g) Now type:

Code: Select all

menuentry "Puppy 431 frugal on sda6" { 
set root=(hd0,6) 
linux /puppy431/vmlinuz psubdir=puppy431 
initrd /puppy431/initrd.gz 
} 
EOF
h) Check that the '40-custom' file is 'executable'
1. Open Terminal
2. Type:

Code: Select all

sudo nautilus
or if using MintLXDE –

Code: Select all

sudo pcmanfm
3. Open system/etc/grub.d
4. Right click on '40_custom' file
5. Left click on 'Permissions'
6. Check 'Make executable' button
7. Close your file manager.
i) Update Grub
1. Open Terminal
2. Type:

Code: Select all

sudo update-grub
3. Close Terminal once it has run the relevant script
j) Reboot and you should be presented with a choice of OS on the newly updated Grub menu.

If you would rather have Puppy as your default – once you have added the script to '40_custom' – Go to File/Save As and change the name of your file to '07_custom'. This will place Puppy before the default Ubuntu/Mint entry. Ensure that you make this new file 'Executable' otherwise Grub won't see it.

Best of luck!

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#2 Post by Jim1911 »

Hi Artistjsb,

Nice tutorial, however, for users that are already familiar with legacy grub and don't want to learn grub2. Assuming a current pup, 5.2.8 or later, when installation is complete use grub configuration or better yet use grub4dos which will recognize all installed OS and uses a standard menu.lst. It's much faster and easier to configure for pup installations.

Artistjsb
Posts: 2
Joined: Tue 13 Dec 2011, 18:35

#3 Post by Artistjsb »

Jim1911 wrote:Hi Artistjsb,

Nice tutorial, however, for users that are already familiar with legacy grub and don't want to learn grub2. Assuming a current pup, 5.2.8 or later, when installation is complete use grub configuration or better yet use grub4dos which will recognize all installed OS and uses a standard menu.lst. It's much faster and easier to configure for pup installations.
Absolutely right Jim and as I've just found with the latest MintLXDE on my old Dell it doesn't seem to want to show the grub menu as it did on my earlier Ubuntu 10.04. So I've got to work out where that's gone now :?

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

grub4dos to grub2

#4 Post by shinobar »

As Jim says:
After installing Ubuntu/Mint, run the Grub4Dos config from Puppy Linux(you need live CD or some way to boot up Puppy).
It automatically detects Ubuntu/Mint and also shows a menu to chain the existing grub2.
Image

Of course Artistjsb tutorial is effective if you want to set Puppy up doing on Ubuntu/Mint.
But still i recommend to run the Grub4Dos config again from the Puppy.
Ubuntu/Mint do not know Puppy, but Puppy knows Ubuntu/Mint.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#5 Post by emil »

I spotted

Code: Select all

menuentry "Puppy 431 frugal on sda6" {
set root=(hd0,6)
... 
in the instructions - "usually" this should be (hd0, 5) since count starts from 0.
Or has this changed in grub2?

Nice tutorial.
And comments are great pointing out alternatives.
cheers
emil

stu90

#6 Post by stu90 »

emil wrote:I spotted

Code: Select all

menuentry "Puppy 431 frugal on sda6" {
set root=(hd0,6)
... 
in the instructions - "usually" this should be (hd0, 5) since count starts from 0.
Or has this changed in grub2?

Nice tutorial.
And comments are great pointing out alternatives.
cheers
emil
Yes partition numbering has been changed in grub2.

User avatar
sgull
Posts: 63
Joined: Mon 26 Mar 2012, 20:09

#7 Post by sgull »

After looking over all replies here, I've set myself up with the following set of instructions to follow, based on the various inputs and suggestions. At the end, under "Uncertainties" are a few remaining uncertainties I have of which I would appreciate further knowledgeable answers. Also, if it seems I'm off track anywhere in the numbered procedure below, I'd like to know about it please. Thanks!

1. Prepare an ext3 partition for the frugal Puppy installation. Currently my disk looks as follows, with Mint occupying sda1 and swap occupying sda2: http://imagebin.org/204013
2. Boot Puppy from CD.
3. Choose Universal Installer from setup menu.
4. Choose to install to internal hard drive.
5. Select hard drive and partition that I want Puppy to be installed to.
6. Click on the "frugal" installation button.
7. Ignore any further instruction to install grub and just logout/close Puppy. Before it exits out, it should ask me to save my session and make a savefile, which I say yes to (and I should use .3fs format when it asks me, and I select my savefile size. Close Puppy CD.
8. Boot into Mint. Use gedit to open the 40_custom file (File system/etc/grub.d/40_custom).
9. Add in a second line under - '#!/bin/sh' – This will provide visual notification in Grub2 that the '40_custom' file is being read. This second line should be the code: echo "Adding 40_custom menu entries." >&2 Ensure that - exec tail -n +3 $0 -is now the third line.
10. type, on the next line down:

menuentry "Puppy 431 frugal on sda6" {
set root=(hd0,6)
linux /puppy431/vmlinuz psubdir=puppy431
initrd /puppy431/initrd.gz
}
EOF

11. Check that the '40-custom' file is 'executable'
a. Open Terminal
b. Type: sudo nautilus
c. Open system/etc/grub.d
d. Right click on '40_custom' file
e. Left click on 'Permissions'
f. Check 'Make executable' button
g. Close your file manager.
h. Update Grub
i. Open Terminal
j. Type: sudo update-grub
k. Close Terminal once it has run the relevant script
l. Reboot and should be presented with a choice of OS on the newly updated Grub menu

Uncertainties:
1. In step 1 above how large a partition to create for the frugal Puppy installation. And whether to create it as a new primary partition (sda3?)or perhaps as an extended (logical) partition of sda1.
2. In step 10 above what specifically to enter instead of the text I've set in bold type in step 10.

capicoso
Posts: 172
Joined: Fri 13 Jan 2012, 23:38
Location: Argentina

#8 Post by capicoso »

sgull wrote:After looking over all replies here, I've set myself up with the following set of instructions to follow, based on the various inputs and suggestions. At the end, under "Uncertainties" are a few remaining uncertainties I have of which I would appreciate further knowledgeable answers. Also, if it seems I'm off track anywhere in the numbered procedure below, I'd like to know about it please. Thanks!

1. Prepare an ext3 partition for the frugal Puppy installation. Currently my disk looks as follows, with Mint occupying sda1 and swap occupying sda2: http://imagebin.org/204013
2. Boot Puppy from CD.
3. Choose Universal Installer from setup menu.
4. Choose to install to internal hard drive.
5. Select hard drive and partition that I want Puppy to be installed to.
6. Click on the "frugal" installation button.
7. Ignore any further instruction to install grub and just logout/close Puppy. Before it exits out, it should ask me to save my session and make a savefile, which I say yes to (and I should use .3fs format when it asks me, and I select my savefile size. Close Puppy CD.
8. Boot into Mint. Use gedit to open the 40_custom file (File system/etc/grub.d/40_custom).
9. Add in a second line under - '#!/bin/sh' – This will provide visual notification in Grub2 that the '40_custom' file is being read. This second line should be the code: echo "Adding 40_custom menu entries." >&2 Ensure that - exec tail -n +3 $0 -is now the third line.
10. type, on the next line down:

menuentry "Puppy 431 frugal on sda6" {
set root=(hd0,6)
linux /puppy431/vmlinuz psubdir=puppy431
initrd /puppy431/initrd.gz
}
EOF

11. Check that the '40-custom' file is 'executable'
a. Open Terminal
b. Type: sudo nautilus
c. Open system/etc/grub.d
d. Right click on '40_custom' file
e. Left click on 'Permissions'
f. Check 'Make executable' button
g. Close your file manager.
h. Update Grub
i. Open Terminal
j. Type: sudo update-grub
k. Close Terminal once it has run the relevant script
l. Reboot and should be presented with a choice of OS on the newly updated Grub menu

Uncertainties:
1. In step 1 above how large a partition to create for the frugal Puppy installation. And whether to create it as a new primary partition (sda3?)or perhaps as an extended (logical) partition of sda1.
2. In step 10 above what specifically to enter instead of the text I've set in bold type in step 10.
5. Before doing the frugal install to a partition, you have to format that partition first. Frugal isn't like a normal installation that eats the whole partition. It's copying 4 files to a folder, just that, you can even copy it to your sda1. But supposing you want to do it in that unallocated space:
First, imo, 136gb is too much, i'd make a partition of 10gb. So select that 136gb and make a new primary partition of 10gb, ext2 or 3. That'll be sda3 then.

7. Puppy will ask you to make a savefile, thats correct. It'll also ask you where you want to save that file. Save it to where you made the frugal install. If you made it on sda3/sgull/ then save it there.

Uncertainties:
1. Just answered it... You can't make a logical of sda1, it's already a primary, you can't change it to extended without formating first. Just make it a primary, you can have a total of 4 primary partitions, so no prob. It'll be sda3.

2. When you make the frugal install it'll ask you where you want to do it, do it in sda3/ and add a directory if you want, like the example i told you before. /sgull on sda3. So you'd have to type:

menuentry "Puppy 528 frugal on sda3" {
set root=(hd0,3)
linux /sgull/vmlinuz psubdir=sgull
initrd /sgull/initrd.gz
}
EOF

menuentry " " is what its going to look like in the grub menu, so you can add whatever you want.

User avatar
sgull
Posts: 63
Joined: Mon 26 Mar 2012, 20:09

#9 Post by sgull »

So could I get a confirmation please that when I edit the /etc/grub.d/40_custom file, that the following would be how it should appear (assuming I've named the menuentry and directory as given in previous example):

#!/bin/sh
echo "Adding 40_custom menu entries." >&2
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 528 frugal on sda3" {
set root=(hd0,3)
linux /sgull/vmlinuz psubdir=sgull
initrd /sgull/initrd.gz
}
EOF

Does the formatting as shown above look correct? Also, I wondering about the EOF at the bottom. What is that, and is it necessary too?

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#10 Post by Lobster »

Another solution?
Omniboot will give you Slacko, Mint, Ubuntu and the Out house sink
http://omniboot.sourceforge.net/

I have downloaded but not tested.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#11 Post by nooby »

Lobster I tried to alert about that one too but seems to be invisible :)

I got interested in these lines of text by Artistjsb.
If you would rather have Puppy as your default –
once you have added the script to '40_custom' –
Go to File/Save As and change the name of your file to '07_custom'.

This will place Puppy before the default Ubuntu/Mint entry.
Ensure that you make this new file 'Executable' otherwise Grub won't see it.
That sounds like something I want to apply on a computer that I ahve
dedicated to Full install Linux test machine with grub2.

And I had forgotten about the count from "0" that differs from count from "1"?
I get very confused now :)

So Lobster how long took that download. 3.7GB something. Awful lot of bits


Edit. Say I want to use it as a test machine.
That means I want to change the OS that are added and new ones
come or stand on line to take over.

Each of these to be tested Linux take over and delete all the Puppy frugal files.

How do I solve that dilemma? Okay one can have them back up on DVD
or USB and add them each time one test a new Linux?
I guess I should start a new thread about it?

Link here
http://www.murga-linux.com/puppy/viewto ... 575#615575
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#12 Post by Tman »

In my opinion, using the grub4dos bootloader config that comes with most modern pups is the simplest method.
As Shinobar has said, it will autodetect other Grub2 installs. (Ubuntu, Debian etc.)

Grub4Dos needs to be installed on the first partition of the first hard-drive (for me it is "sda1"), but your frugal pup can be in a folder on any hard-drive partition.
A grub4dos menu entry for frugal pups would look like this.

title Frugal Pup (in a folder on any hard-drive partition)
find --set-root --ignore-floppies --ignore-cd /frugalpup/initrd.gz
kernel /frugalpup/vmlinuz psubdir=frugalpup pmedia=atahd pfix=ram
initrd /frugalpup/initrd.gz

Rename what is in bold letters to the name of your frugal-pup folder.
Usually only 3 files need to be copied from the iso: the main sfs file, the initrd file, and the vmlinuz file.
Sometimes there is also zdrive.sfs and in Saluki's case, also an adrive sfs. These files can be found usually by left-clicking on an ISO ... or
sometimes by right-clicking on an ISO and choosing "Open With" filemnt.

=====

To set up a Grub4dos menu entry for a different bootloader, that you installed on a different partition, I find this entry is the easiest:

Code: Select all

title Launch a different bootloader (Windows, Lilo, Extlinux, Grub2 etc.)
  uuid e622dc98-a6b9-47f6-aee9-7a81423e2fd8
  chainloader +1
The uuid is a unique identifier for each pariticular partition. My uuid will not work in your menu.lst
To find it, I use gparted, select the partition and select "Information"
Then I highlight the uuid, and copy + paste it into my grub4dos menu.lst entry.

The above method also works for liveusb installs as well. :wink:
Attachments
uuid.jpg
finding uuid with gparted
(40.21 KiB) Downloaded 1904 times

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#13 Post by Tman »

You can acutally boot any Linux distro with Grub4Dos, without even needing the native bootloader that comes with the distro, but this requires more advanced tweaking of the menu.lst file.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#14 Post by nooby »

Tman wrote:You can acutally boot any Linux distro with Grub4Dos, without even needing the native bootloader that comes with the distro, but this requires more advanced tweaking of the menu.lst file.
I know almost nothing but my experience is that that only is true if
you are on ext2 or ext3 or some other linux format. If the drive is NTFS
which 90% of all drives already installed and sold over desk at Mall
and big retail chains then it is already a Ms Win there using NTFS.

Many Debians and Arch failed to boot for me on NTFS and I did searches
all over the internet to find examples from others how to set it up and none
could unless one used USB or Virtual boot.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#15 Post by Tman »

nooby wrote:
Tman wrote:You can acutally boot any Linux distro with Grub4Dos, without even needing the native bootloader that comes with the distro, but this requires more advanced tweaking of the menu.lst file.
I know almost nothing but my experience is that that only is true if
you are on ext2 or ext3 or some other linux format. If the drive is NTFS
which 90% of all drives already installed and sold over desk at Mall
and big retail chains then it is already a Ms Win there using NTFS.

Many Debians and Arch failed to boot for me on NTFS and I did searches
all over the internet to find examples from others how to set it up and none
could unless one used USB or Virtual boot.
nooby,

You can have the bootloader and frugal installs on an NTFS partition,
but full linux installs are supposed to be on a linux partition. (ext2, 3, 4). All the distros I have tried come preinstalled with a partitioning program either on the live cd/dvd or the install disc.

User avatar
sgull
Posts: 63
Joined: Mon 26 Mar 2012, 20:09

#16 Post by sgull »

Tman wrote:In my opinion, using the grub4dos bootloader config that comes with most modern pups is the simplest method.
As Shinobar has said, it will autodetect other Grub2 installs.
Although the method I used, that of editing Grub2 configuration files, seems to have worked, I really wish I'd looked more closely at using the grub4dos bootloader instead. As you say it does seem simpler than the more involved "round-about" method I ended up messing with.

Next time... :?
Last edited by sgull on Sat 07 Apr 2012, 14:53, edited 1 time in total.
[b]Lucid Puppy 5.2.8 Frugal[/b]

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#17 Post by nooby »

Guys are you really sure that grub4dos work for every full install distro?

Re the editing of grub.conf directly. I read about that thing on another site too.
But where using an old scrap machine that I ditched and forgot to do a note
where I read it. Typical of me. That guy renamed 10_custom to 07_custom
or something. Humor that one :)

Edit Ooops it where in this thread by Artistjsb. first post.
Correction it is 40_custom he renames not the other one.

Hahah my poor memory change things around. Not good memory at all.
Happy though that I have found this thread again. Bookmark it now! :)
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#18 Post by Tman »

nooby wrote:Guys are you really sure that grub4dos work for every full install distro?
It has worked for every distro I tried so far. For distros that use grub2, it should be fairly easy. I had to tweak the menu.lst for vector linux. I just installed Arch and had to tweak it also. Actually it wasn't really that hard.
You just need to provide the proper uuid, and the exact path+name for the initrd file and the kernel file. Some distros have totally different names for them ( see Slitaz menu entry below ).
But there are only 2 files to search for (usually located in the /boot folder).

Below are my menu entries for full-installs. I don't have the settings for Vector Linux, cause I removed it. I also removed Mint and Debian because usage and commands are pretty much the same as Ubuntu-Studio. My final distro is going to be Fedora.

Code: Select all

### Slitaz frugal installs

title SilTaz 4.0 RC3 - chainloader method
  root (hd0,1)
  chainloader +1

title SilTaz 4.0 RC3 - uuid method
  uuid 88a85285-c831-46e4-a400-c771b6625876
  kernel /boot/bzImage   rw root=/dev/null home=88a85285-c831-46e4-a400-c771b6625876
  initrd /boot/rootfs.gz

### Full installed Linux

title Ubuntu Studio 11.10 (sda2)
  uuid 3db3c8d0-00dd-4886-baf8-68502d04004e
  kernel /vmlinuz root=/dev/sda2 pmedia=atahd ro
  initrd /initrd.img

title Arch Linux (sda4)
  uuid 1c81c9c8-50a7-435d-ac96-bf795cab63d5
  kernel /boot/vmlinuz-linux root=/dev/sda4 ro vga=773
  initrd /boot/initramfs-linux.img

title  Arch Linux Fallback (sda4)
  uuid 1c81c9c8-50a7-435d-ac96-bf795cab63d5
  kernel /boot/vmlinuz-linux root=/dev/sda4 ro
  initrd /boot/initramfs-linux-fallback.img
EDIT: oops Slitaz was an unconventional frugal install..I've corrected the menu description.
-
Last edited by Tman on Sun 15 Apr 2012, 00:18, edited 2 times in total.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#19 Post by nooby »

Thanks for sharing that one.

I will try your code on the crunch variant of arch?
And Crunchbang for debian too?

I have an 8Gb usb running now so hopefully I managed
to download the iso and set it all up within the two hours
I have before bed time.
I use Google Search on Puppy Forum
not an ideal solution though

Post Reply