Frugal Install and Grub 2

Booting, installing, newbie
Post Reply
Message
Author
User avatar
jamalexa
Posts: 92
Joined: Wed 18 Jul 2007, 21:27
Location: Philadelphia, PA. United States

Frugal Install and Grub 2

#1 Post by jamalexa »

does anyone how would you do a frugal install with Grub 2. The old method with grub was a simple cut and paste into menu.lst but I can't understand how to modify Grub 2 it does not have a menu.lst file.

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

#2 Post by nooby »

I had dualboot with Linux Mint KDE CE on an older computer and the installer of Mint did a Grub2 install so I used this suggestion.
davesurrey wrote:
Well I'm not a grub2 expert (who is??) but let's try to help you.

Ubuntu 9.10 uses a new type of grub which is often termed grub2 but I think ubuntu 9.10 actually uses version 1.97. No matter.
Instead of the /boot/grub/menu.lst file which puppy still uses and you may be used to, Ubuntu now uses a /boot/grub/grub.cfg file but you should not edit it. If you do your changes won't persist.

Instead you need to edit file /etc/grub.d/40_custom or add a similar one.
To make it easy we'll just edit the 40_custom file.

In ubuntu go to a terminal and type
Code:
sudo gedit
type in your password and then use gedit to open the 40_custom file.

Add:
Code:
menuentry "Puppy 431 frugal on sda6" {
set root=(hd0,6)
linux /puppy431/vmlinuz psubdir=puppy431
initrd /puppy431/initrd.gz
}
EOF
to the bottom of the file.

Then save the file and go back to the terminal to make the file executable by typing
Code:
sudo chmod +x /etc/grub.d/40_custom

And finally in terminal type
Code:
sudo update-grub


Hopefully when you reboot Ubuntu's grub will show a screen giving you the choice of Ubuntu or Puppy 431.


Note this assumes that you have installed puppy431 to /sda6/puppy431 sub-directory. If you have installed it instead to /sda6/ then change the 40_custom file accordingly.

Tell us how it goes.
HTH
Dave
this part is most important I guess

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

Grub4DOS has title but grub2 should always have

menuentry "Puppy 431 frugal on sda6" {
and the "text about the entry in " quotes followed by the special sign

set root=(hd0,6) instead of just root

linux /puppy431/vmlinuz psubdir=puppy431 instead of kernel

initrd /puppy431/initrd.gz
}
EOF

I had to take away EOF to work on my machine. Try both to see if there is any difference.

Tell us if it worked.
ffrom this thread
http://www.murga-linux.com/puppy/viewto ... 058971f9d2
I use Google Search on Puppy Forum
not an ideal solution though

lemmy999
Posts: 102
Joined: Sat 12 Jan 2008, 16:52

#3 Post by lemmy999 »

I have amended the file and now get " Error : unknown command EOF"

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

#4 Post by Jim1911 »

Try this thread which has a number of success stories booting with Grub2.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

grub2 setup

#5 Post by don570 »

I just installed ubuntu 10.04 lucid and Grub2 was automatically installed.
It was setup to bootup Ubuntu not Puppy linux.I had to go to the Ubuntu support pages and find out about Grub2. It's quite simple to setup.
First the setup file has been already been created at installation of the system software, so while running the Ubuntu operating system[not puppy] open the file up with the terminal command:

sudo nano /etc/grub.d/40_custom

Let's say I have 2 folders named lighthouse443 and quirky1 on the first partion of the first hard drive(sda1) containing the relevant puppy kernels.
I write the following script:

#!/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 "lighthouse" {
set root=(hd0,1)
linux /lighthouse443/vmlinuz pmedia=atahd psubdir=lighthouse443
initrd /lighthouse443/initrd.gz
}

menuentry "quirky1" {
set root=(hd0,1)
linux /quirky1/vmlinuz pmedia=atahd psubdir=quirky1
initrd /quirky1/initrd.gz
}

EOF

Now write out and exit. One last terminal command is needed:
sudo update-grub
You can now reboot.Hold the shift key down to get the grub screen and choose your operating system.
Note 1:The second line of script was a suggestion from Ubuntu to
provide visual notification that the '40_custom' file was being read
Note 2:The '40_custom' file is a script and must be made executable but
it is already so no need to worry, but if you aren't sure you can always run:
sudo chmod +x /etc/grub.d/40_custom

Ozviking
Posts: 3
Joined: Sat 04 Dec 2010, 04:07

Grub2 problems

#6 Post by Ozviking »

I installed Puppy 5.11 on my dual boot system, with Pinguy Os (ubuntu 10.04) and win xp and used frugal.
Only problem that the add boot entry (that you get from Puppy) is for the old grub that use the "menu.ls".
The new grub2 use the "grub.conf"
I have tried the Nooby"s instructions and a few more but no luck....I manage to get puppy 5.11 in to the grub but when I boot from it I get this:
error: unknown command `'.
error: unknown filesystem.
error: you need to load kernel first.

Here is some part of the Grub.conf

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-26-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9e7bf572-9771-4fd3-bff2-6a70dced3bf3
linux /boot/vmlinuz-2.6.32-26-generic root=UUID=9e7bf572-9771-4fd3-bff2-6a70dced3bf3 ro quiet splash
initrd /boot/initrd.img-2.6.32-26-generic
}


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

Puppy is installed on /dev/sda7
Any one that could help me??

Patrick
Last edited by Ozviking on Sun 05 Dec 2010, 00:02, edited 2 times in total.

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

Re: Grub2 problems

#7 Post by shinobar »

Ozviking wrote:The new grub2 use the "grub.conf"
grub.cfg? Yes the new grub2 uses the grub.cfg, but you never edit the grub.cfg manally.
I recommend you to revert it with running 'sudo update-grub' from ubuntu.

If you cannot handle grub2, you can use grub4dos instead. Grub4dos and grub2 can co-exist.
See the topic 'Try the Grub4Dos and make a rescue':
http://www.murga-linux.com/puppy/viewtopic.php?t=61348
Ozviking wrote:menuentry "Puppy 511 frugal on sda6" {
set root=(hd0,6)
linux /puppy511/vmlinuz psubdir=puppy431
initrd /puppy511/initrd.gz
}
Puppy is installed on /dev/sda7
Where is your puppy files? /mnt/sda6/puppy511', '/mnt/sda7/puppy511' or '/mnt/sda7/puppy431'...?
I recommend you to use the 'Frugalinstaller'.
Another topic, Enrich 'Frugal' instead of doing full install:
http://www.murga-linux.com/puppy/viewtopic.php?t=62476
Last edited by shinobar on Sat 04 Dec 2010, 05:38, edited 1 time in total.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

Ozviking
Posts: 3
Joined: Sat 04 Dec 2010, 04:07

Re: Grub2 problems

#8 Post by Ozviking »

shinobar wrote:
Ozviking wrote:The new grub2 use the "grub.conf"
grub.cfg? Yes the new grub2 uses the grub.cfg, but you never edit the grub.cfg manally.
If you cannot handle grub2, you can use grub4dos instead. Grub4dos and grub2 can co-exist.
See the topic 'Try the Grub4Dos and make a rescue':
http://www.murga-linux.com/puppy/viewtopic.php?t=61348
Ozviking wrote:linux /puppy511/vmlinuz psubdir=puppy431
Puppy is installed on /dev/sda7
Where is your puppy files?
I recommend you to use the 'Frugalinstaller'.
Another topic, Enrich 'Frugal' instead of doing full install:
http://www.murga-linux.com/puppy/viewtopic.php?t=62476

My puppy frugal is on a ext4 partition, I'll check the link
Cheers

Ozviking
Posts: 3
Joined: Sat 04 Dec 2010, 04:07

Grub2 problems solved

#9 Post by Ozviking »

I just got it working :D
The grub2 use the same numbers as you see on Ubuntu, in my case I installed on "/dev/sda7" before you use to drop one number down to 6 but I just used the same number and it works fine :lol:

Here is what i used:
}

menuentry "Puppy 511 frugal on sda7" {
set root=(hd0,7)
linux /puppy511/vmlinuz psubdir=puppy511
initrd /puppy511/initrd.gz
}
EOF
}

And I used Nooby's instructions with modify the /etc/grub.d/40_custom

Cheers

Thauriswulfa
Posts: 5
Joined: Sat 31 Jul 2010, 08:02

help needed to make puppylinux custom entry in grub2

#10 Post by Thauriswulfa »

i just installed ubuntu10.10 and its grub2 didn't detect my puppy510 as i have very little knowledge of linux and grub.
and don't have much time these days to study grub manual so please help me to
add custom menuentry to the file 40_custom

other entries in my grub.cfg file is

Code: Select all

menuentry 'Ubuntu, with Linux 2.6.35-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos4)'
	search --no-floppy --fs-uuid --set 3e9bc03c-8e94-4759-af71-7e6ac4973155
	linux	/boot/vmlinuz-2.6.35-24-generic root=UUID=3e9bc03c-8e94-4759-af71-7e6ac4973155 ro  vga=792 splash  quiet splash
	initrd	/boot/initrd.img-2.6.35-24-generic
i tried many times editing it and using command

Code: Select all

sudo update-grub 
but no success.

my frugal install is on sda3 , ext4 files system in directory puppy510 and uuid is
ab4b85ab-02a0-46f0-b4aa-f5e3af480087
please help me in adding this custom menu entry....................[/code]

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

Re: help needed to make puppylinux custom entry in grub2

#11 Post by nooby »

Thauriswulfa wrote: please help me in adding this custom menu entry....................[/code]
Have you read through this thread?

http://www.murga-linux.com/puppy/viewtopic.php?t=45961

There you have several successes so it should be possible to learn from them.

My experience are too old but I remember that one can do it manually if one don't update it. Or if it get updated then just add it manually again.

So try that out. Even I managed to do it and I am not good at computers.
I use Google Search on Puppy Forum
not an ideal solution though

attila3453
Posts: 2
Joined: Mon 22 Aug 2011, 08:59

#12 Post by attila3453 »

When I do update-grub, there is an error at the end:
/etc/grub.d/40_custom: 1: dem#!/bin/sh: not found

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

#13 Post by nooby »

attila3453 wrote:When I do update-grub, there is an error at the end:
/etc/grub.d/40_custom: 1: dem#!/bin/sh: not found
The following is my low quality answer so look for better answers from those who know more first. Only use mine when nothing else works.

You write your first post into a thread that has been silent for some 7 months so maybe not many look into it. But who knows. I will most likely not read here again. I know too little. :)

Which Linux are you in when you do that update-grub?

How did you install Puppy. I am not good at logistic things but maybe you have a greater chance if you have your own thread in beginners and there tells as much as is needed about what sort of puppy and how it is installed and what linux you have grub2 on and how that one is installed too.

There are so many ways to combine linux os. partitions and formatting and external usb and full install and frugal install and so on.

One maybe need to be fluent in how the other OS with grub 2 works?

if one have control over the other OS so it does not do unwanted updates then one can manually add the needed code to grub.cfg even if it warns that it will be overwritten next upgrade and then make a backup of that entry so one can add it in if it get overwritten. Cheat but if that is the only way to add puppy then why not.
I use Google Search on Puppy Forum
not an ideal solution though

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

update

#14 Post by fyujj »

I boot Wary 5.3 frugal from the HD with grub 1.99, version 19.fc17 from Fedora.
My /etc/grub.d/39_puppy:

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 "Wary-5.3" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set=root e811049c-dd64-4a31-b0a0-45a107b8e26b
linux /Wary_5.3/vmlinuz pdev1=sda3 psubdir=Wary_5.3 pmedia=atahd pfix=fsck
initrd /Wary_5.3/initrd.gz
}

menuentry "Wary-5.3 fresh" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set=root e811049c-dd64-4a31-b0a0-45a107b8e26b
linux /Wary_5.3/vmlinuz pdev1=sda3 psubdir=Wary_5.3 pmedia=atahd pfix=fsck,ram
initrd /Wary_5.3/initrd.gz
}
Note that --set=root is needed otherwise grub will complain of a missing argument (it will boot after a while or a key press, though).
I didn't search if having "--set=root <UUID>" can dispense with the "set root=(hdx,y)" line.

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

#15 Post by nooby »

Thanks

So you have changed /etc/grub.d/40_custom to /etc/grub.d/39_puppy:

Does that mean it will update both /etc/grub.d/39_puppy: and /etc/grub.d/40_custom or have you renamed /etc/grub.d/40_custom to /etc/grub.d/39_puppy?

I mean you don't have any /etc/grub.d/40_custom so that one will not rewrite
the grub.conf?

I agree about the conclusion you make
Note that --set=root is needed otherwise grub will complain of a missing argument (it will boot after a while or a key press, though).
I didn't search if having "--set=root <UUID>" can dispense with the "set root=(hdx,y)" line.
Maybe it is the uuid that is needed too.

But that it complain if you don't add root=(hdx,y) that is good to know.

Maybe that explains why some of my entries are invisible. I should look
if they have the root=(hdx,y) in those examples and the uuid too.

So to me now the big mystery is the 39_puppy does it go for the number
and don't care if it says puppy or custom? It only look for the number?

Would that mean that one can have

35_slitaz
36_porteus
37_antix
38_knoppix
39_puppy
files and all will be considered in that order by the update prog in grub2?
I use Google Search on Puppy Forum
not an ideal solution though

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

#16 Post by fyujj »

Hi nooby.
I just added 39_puppy. I have something else in 40_custom.
I could've added the Puppy entries in 40_custom, though, but since I was trying to figure the correct entry I chose to add a separate file.
The name doesn't matter, only the number.

The =root that's needed is the one after --set and before the UUID number. Otherwise GRUB will complain of a missing argument.

edit- on the other hand, by http://www.murga-linux.com/puppy/viewto ... 523#547523 the
search --no-floppy --fs-uuid --set=root UUID
isn't really needed for it to work (but I didn't try myself).
But I'll try the other way round. I'll remove
set root=(hd0,3)
and see if it works.

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

#17 Post by fyujj »

It works. So one can use either

Code: Select all

set root=(hdx,y)
or

Code: Select all

--set=root <UUID>
Note that that line has "--fs-uuid" (must be related).

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

#18 Post by nooby »

Thanks for sharing. I have to test it. I should be at sleep now
itis 03.00AM soon but I could not fall asleep so I got up
and got curious of if you or anybody else made a comment.

grub2 seems very keen on having the right syntax.
Sure that is important for any boot loader but the others
allow that one edit on the fly while Grub two make the
improper ones invisible instead. Not what I like at all.

I report if I get it to work. I will be traveling and get back
at about 03PM or so and will buy gadgets like DVI to HDMI adapters
whatever they have or is needed for my new Monitor that have HDMI sockets
I use Google Search on Puppy Forum
not an ideal solution though

Post Reply