Any Tutorial about GRUB2 and PUPPY?

Booting, installing, newbie
Message
Author
frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

Any Tutorial about GRUB2 and PUPPY?

#1 Post by frktons »

Hi everybody.

I'd like to install (frugal would be enough) on my system with LINUX and
GRUB2 already there. Almost all the info I've found is about WIN-XP, or
GRUB. What about GRUB2?
I have a 12 Gb EXT4 partition ready to install puppy, but GRUB2 doesn't
see PUPPY if I check the installation with "update-grub". Where can I find info about this installation procedure?
The Universal Installer seems to do fine, but at the end it doesn't work.

Thanks

frktons

rokytnji
Posts: 2262
Joined: Tue 20 Jan 2009, 15:54

Might help

#2 Post by rokytnji »

I don't know if this will help you but figured the link won't hurt

http://murga-linux.com/puppy/viewtopic. ... b0cff6ce27

User avatar
scabz
Posts: 364
Joined: Thu 30 Apr 2009, 18:14
Location: Tallahassee FL US
Contact:

#3 Post by scabz »

another link i used a long time ago to help me it has all the info just broken up http://murga-linux.com/puppy/viewtopic.php?t=54210

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#4 Post by frktons »

There are many different versions of GRUB2 and it looks like any LINUX distro has its own small differences. I'm actually on a Sabayon Gentoo based
distro and some configuration files of GRUB2 are different than the ones
discussed.

The operation in itself is quite simple. The difficult thing is just finding the
right info. I think I've to read the posts you have suggested, and to use Google if not enough. Let's find some time to invest. :wink:

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#5 Post by ICPUG »

frktons wrote:There are many different versions of GRUB2 and it looks like any LINUX distro has its own small differences.
That's a curious thing to say. There is only one Grub2 although of course it may get updates like anything else. Maybe you meant there are many different grub2 configurations.

While it is not Puppy specific I find the best tutorial for Grub2 is here:
http://www.dedoimedo.com/computers/grub-2.html
I've just looked at it again and it was updated at the end of last year to say that grub2 is now at 1.99, amongst other useful info.

It tells you all about booting legacy from grub2 and how you should update grub2 configuration file properly (which is something the contributors to the link posted by rokytnji did not do!).

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#6 Post by frktons »

Thanks ICPUG.

I've still to decide if it is worth enough to study all the needed stuff or just
use Puppy in Live-CD mode.
The link you provided is really useful and complete. I'll see what to do. 8)

User avatar
dk60902
Posts: 230
Joined: Sun 26 Sep 2010, 22:34
Location: In front of my computer

#7 Post by dk60902 »

Have you considered Grub4Dos? It's easier to configure. It works well with Puppy.

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#8 Post by frktons »

dk60902 wrote:Have you considered Grub4Dos? It's easier to configure. It works well with Puppy.
Do you mean I have to change the grub2 bootloader with Grub4Dos?
The name seems to indicate it works with DOS/WIN filesystem, does it work on Linux?

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#9 Post by Burn_IT »

Boot loaders like Grub and Most others are OS independent.

I say MOST as there are the likes of MS who like to pretend that the Windows ones are boot loaders.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
dk60902
Posts: 230
Joined: Sun 26 Sep 2010, 22:34
Location: In front of my computer

#10 Post by dk60902 »

frktons wrote:
dk60902 wrote:Have you considered Grub4Dos? It's easier to configure. It works well with Puppy.
Do you mean I have to change the grub2 bootloader with Grub4Dos?
The name seems to indicate it works with DOS/WIN filesystem, does it work on Linux?
Yes, it works well with Puppy Linux. I have one of my computers triple booting WinXP, Puppy Linux 5.28, and Ubuntu 12.04.

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

Re: Might help

#11 Post by nooby »

rokytnji wrote:I don't know if this will help you but figured the link won't hurt

http://murga-linux.com/puppy/viewtopic. ... b0cff6ce27
frktons that thread does have important explanation of what one need to know.

Here is another but old one that maybe has additional info.
http://www.murga-linux.com/puppy/viewtopic.php?t=45961

I think that this one show that we does need a good tutorial on grub2.
http://murga-linux.com/puppy/viewtopic.php?t=77067
As far as I know I have still not got any good answer why some entries
fails to be seen. Maybe the developer of grub2 wants to protect me from
cheating on what code to enter. I hate when they build such "protection"
into their code.

frktons May I kindly ask you to describe here in this thread
what you finally did to make it work for you. Grub2 is easy
when one get it to work but one need to know rather much
before due to the many variables involved.

I edit out some text out due to failure to boot on my netbook Acer D255 :)

Grub2 is more difficult than what I want it to be. And very few cares about it it seems. That is sad.
I use Google Search on Puppy Forum
not an ideal solution though

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#12 Post by frktons »

Considering that many of the actual distros use GRUB2 I'd prefer to stick with
it and slowly find my way through it.
I have to say that things have got more complicated from GRUB to GRUB2,
nevertheless I prefer to stay on the mainstream.
Some weeks ago I tried to install (a full install) Lucid Puppy on an external
USB hard disk, and it worked with GRUB2, maybe because after Puppy I also
installed Linux Mint on another partition of the same external HD.
Probably GRUB2 replaced GRUB and inherited the previous configuration.
Now I've tried a full install with FATSLACKO 5.3.3, without installing GRUB, but GRUB2 didn't see Puppy. When I have some spare time I'll try new ways
and post the results.

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

#13 Post by capicoso »

Grub2 is the easiest imo. Problem is there's too much info out there.

Do you have, /etc/grub.d/XX_custom file?(XX = two digits number)

Do you have /boot/grub/grub.cfg?

It's not too much to study actually...

In short words, you have to:

On your Sabayon, edit your /etc/grub.d/XX_custom file

supposing you installed it on sda5 /frktons

to something 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 "Lucid Puppy Linux Frugal" {
set root='(hd0,5)'
linux /frktons/vmlinuz psubdir=frktons
initrd /frktons/initrd.gz
}
EOF
Maybe you have to change the permissions of XX_custom to make it executable. I didn't have to.

go to terminal, type sudo update-grub and it's done.


And of course you have to make all this as administrator.
I think it's worth it, it'll speed up the booting. On my 667MHz laptop it boots in 15secs. When you add the line psubdir=frktons(or whatever directory is puppy savefile on) it'll search for the savefile there. I'd also suggest to have your savefile and puppy on the same folder.

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#14 Post by frktons »

So far I managed to have a full install on a internal HD partition:

1 - I made a full install on a reserved partition.
2 - I booted to another distro that uses GRUB2.
3 - From the console I executed the "sudo update-grub" command.
4 - I edited as root the /boot/grub/grub.cfg file.
5 - I changed the entry for Puppy from "unknown linux distribution" to
"Puppy Full FatSLACKO 5.3.3"
6 - I rebooted the pc and this time it worked.

GRUB2 sees the partition of Puppy and correctly starts it.

Next step will be the "frugal Puppy". I've still to find a way through my messy
hard disk with a dozen partitions.

I think the problems I'm confronting with are partially generated by the
kind of partitioning I've done.

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

#15 Post by capicoso »

frktons wrote:So far I managed to have a full install on a internal HD partition:

1 - I made a full install on a reserved partition.
2 - I booted to another distro that uses GRUB2.
3 - From the console I executed the "sudo update-grub" command.
4 - I edited as root the /boot/grub/grub.cfg file.
5 - I changed the entry for Puppy from "unknown linux distribution" to
"Puppy Full FatSLACKO 5.3.3"
6 - I rebooted the pc and this time it worked.

GRUB2 sees the partition of Puppy and correctly starts it.

Next step will be the "frugal Puppy". I've still to find a way through my messy
hard disk with a dozen partitions.

I think the problems I'm confronting with are partially generated by the
kind of partitioning I've done.
The method i said is for afrugal. If you follow it, it'll work.

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#16 Post by frktons »

capicoso wrote:
The method i said is for afrugal. If you follow it, it'll work.
I suppose it does. As I find a partition that allows me to try it I'll do the
"frugal" as well.

At the moment the system is a bit messy and some partitions are not seen
by Puppy. I'll manage it someway.

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#17 Post by frktons »

Nothing as worked so far regarding the "frugal installation".
Grub2 created the following entry in grub.cfg for the "full installation"
and it works fine:

Code: Select all

menuentry "PUPPY FULL (on /dev/sdd9)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sdd,msdos9)'
	search --no-floppy --fs-uuid --set=root 4f313f4a-2182-4dfc-a8cf-7007556a6c34
	linux /boot/vmlinuz root=/dev/sdd9
}
So I tried to use it for the "frugal" as well, but it says "invalid name 'vmlinuz'":

Code: Select all

menuentry "PUPPY FRUGAL (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sdb,msdos5)'
	search --no-floppy --fs-uuid --set=root 7adfb900-d535-cd01-30ce-b800d535cd01
	linux vmlinuz root=/dev/sdb5
}
Still trying to find a solution.

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

#18 Post by nooby »

I guess you know by now.

Manually it is a two layered thing.

First one write here /etc/grub.d/40_custom

### BEGIN /etc/grub.d/40_custom ###
# 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 your puppy entry(mine looks like this):
Code:
echo "Adding Puppy Linux to GRUB 2"

menuentry "Lucid Puppy Linux 5.28 (frugal on sda6)"{
set root='(hd0,6)'
linux /puppycapi/vmlinuz
initrd /puppycapi/initrd.gz
}

Try to edit your version so it is more in line with the one above.
Change the (hd0,6) to what you have. The counting is different from
Grub legacy so you have to find that out by comparing how they do it above.

Then the second thing is to do the grub update command in the terminal on the linux that owns the grub2
or you should add the above code manually into both /etc/grub.d/40_custom and the grub.conf file where ever that one is placed.
And then to not make the grub update. And repair it if grub does get
updated due to your primary linux update itself. Which they tend to do
after a security upgrade.

I am a total noob so take my advice a bit like a hint and not a true step for step thing.
I use Google Search on Puppy Forum
not an ideal solution though

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#19 Post by frktons »

nooby wrote: ...
First one write here /etc/grub.d/40_custom

### BEGIN /etc/grub.d/40_custom ###
# 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 your puppy entry(mine looks like this):
Code:
echo "Adding Puppy Linux to GRUB 2"

menuentry "Lucid Puppy Linux 5.28 (frugal on sda6)"{
set root='(hd0,6)'
linux /puppycapi/vmlinuz
initrd /puppycapi/initrd.gz
}

Try to edit your version so it is more in line with the one above.
Change the (hd0,6) to what you have. The counting is different from
Grub legacy so you have to find that out by comparing how they do it above.

Then the second thing is to do the grub update command in the terminal on the linux that owns the grub2...
.
My frugal is on sdb5, so I translated:

Code: Select all

set root='(hd0,6)'
to:

Code: Select all

set root='(hd1,5)'
and after a update-grub and a reboot, when I choose the option to start
Puppy I have an "unknown partition" answer.

The theory is simple, the practice sometime is not. :shock:

frktons
Posts: 17
Joined: Fri 11 May 2012, 12:42

#20 Post by frktons »

A solution that I've found by trial and errors is:

1 - created a /boot folder in the partition with frugal puppy
2 - moved inside the 3 usual files
3 - edited the grub.cfg file
4 - inserted the code for "frugal puppy" in this way:

Code: Select all

menuentry "PUPPY FRUGAL (on /dev/sdb5)" --class gnu-linux --class gnu --class os { 
   insmod part_msdos 
   insmod ext2 
   set root='(/dev/sdb,msdos5)' 
   search --no-floppy --fs-uuid --set=root 7adfb900-d535-cd01-30ce-b800d535cd01 
   linux /boot/vmlinuz root=/dev/sdb5
   initrd /boot/initrd.gz  root=/dev/sdb5
} 
5 - rebooted and tried. OK it works, at the end I got it. :wink:

Post Reply