How to configure dual-boot of Puppy and Ubuntu?

Booting, installing, newbie
Message
Author
jahmbahwahnn
Posts: 17
Joined: Mon 02 Nov 2009, 05:22

How to configure dual-boot of Puppy and Ubuntu?

#1 Post by jahmbahwahnn »

I installed ubuntu karmic kola in my desktop. 40 gb hd.(1gb ram) i have
sda1 swap partition (2gb)
sda2 ext2 partition (11gb) (where i have frugally installed puppy linux release before installing ubuntu)
sda3 ext2 partition (11gb)(my personal storage partition)
sda4 Extended partition (15gb)
sda5 ext3 partition (8gb) (where i installed ubuntu)
sda6 ext2 partition (7gb) (common use partition)

I had installed puppy linux releases in sda2 frugally.
After my installation of ubuntu i couldnt find the menu.lst file in /boot/grub folder in ubuntu file system.
The menu.lst file of frugally installed puppy linux in sda2 is intact.
I followed the sudo gedit /boot/grub/menu.lst and i get a blank gedit file with nothing in it.
how do i have dual boot of puppy linux and ubuntu option during boot start up?.
Or do i have to run the bootloader config after puppy live cd boot?
Thanks in advance.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#2 Post by rcrsn51 »

Some of the big-boy distros use the file grub.conf instead of menu.lst. Do you have this file?

I have also read that Ubuntu is switching to GRUB2 as its bootloader. But if you can still boot Puppy OK, it sounds like Ubuntu didn't install a bootloader at all.

In order to continue booting from Puppy's GRUB, you would need to know the correct menu.lst entry for Ubuntu. But you won't know that until you let Ubuntu do its own GRUB setup.

I suspect that you somehow need to make Ubuntu do a GRUB install, then add Puppy to its menu.

[Edit] After re-reading your post, I can't tell which OS is now booting - Puppy or Ubuntu. Which is it?

jahmbahwahnn
Posts: 17
Joined: Mon 02 Nov 2009, 05:22

Re: dual boot

#3 Post by jahmbahwahnn »

Hi dave, Thanks for the reply.
I followed your steps. however, as i didnt have the permission to edit the 40_custom file while in ubuntu, i live booted puppy 431, edited the file, i mean added the necessry boot commands for puppy linux 431.
Then made the file executable by rightclicking on the file while being in puppy 431 > permissions> executable file.
Then i booted ubuntu. updated the grub and then rebooted. The boot menu display showed the menuentry(title) puppylinux frugal 431. however when i selected the option to boot puppy error message came as
error: you must load the kernel first
press any key
(kindly clarify whether it would be hdo,6 or hdo,5. I tried by entering both one by one and booted. but the error message was the same.)
I opened the grub.conf file and checked the entries. the added command was updated in grub.conf file.
kindly advise
Thanks
Last edited by jahmbahwahnn on Tue 05 Jan 2010, 06:34, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

So are you now booting from Ubuntu?
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
This sounds like important information.

I suspect that you now need a GRUB2 expert to explain how to add the Puppy entry to your grub.conf file.

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#5 Post by davesurrey »

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: Select all

sudo gedit
type in your password and then use gedit to open the 40_custom file.

Add:

Code: Select all

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: Select all

sudo chmod +x /etc/grub.d/40_custom 
And finally in terminal type

Code: Select all

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

jahmbahwahnn
Posts: 17
Joined: Mon 02 Nov 2009, 05:22

#6 Post by jahmbahwahnn »

Hi dave, Thanks for the reply.
I followed your steps. however, as i didnt have the permission to edit the 40_custom file while in ubuntu, i live booted puppy 431, edited the file, i mean added the necessry boot commands for puppy linux 431.
Then made the file executable by rightclicking on the file while being in puppy 431 > permissions> executable file.
Then i booted ubuntu. updated the grub and then rebooted. The boot menu display showed the menuentry(title) puppylinux frugal 431. however when i selected the option to boot puppy error message came as
error: you must load the kernel first
press any key
(kindly clarify whether it would be hdo,6 or hdo,5. I tried by entering both one by one and booted. but the error message was the same.)
I opened the grub.conf file and checked the entries. the added command was updated in grub.conf file.
kindly advise
Thanks

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#7 Post by davesurrey »

Just seen your reply. (time delay as I am in the UK. Where are you out of interest?)

Okay, if puppy is in sda6 then the correct grub format is (hd0,6). You must use the brackets and it's a zero not a small letter oh.
This is a different syntax in grub2 from what it would be in the legacy grub that puppy uses.

I am concerned you say you can't use gedit in Ubuntu.
If you do exactly what I say above it should work. I assume you know your user password? Puppy doesn't need one but ubuntu does.

Can you tell me where the puppy files are and show me a copy of your 40_custom file. Did you put puppy in a sub-directory or just in /.

I am sure we can get this working.
Dave

p-s you seem to have deleted your original second post which had some important info in it and replaced it with a copy of your newest post. Any reason why or just in error?

jahmbahwahnn
Posts: 17
Joined: Mon 02 Nov 2009, 05:22

#8 Post by jahmbahwahnn »

Hi Dave,
I correct my ignorance w.r.t. hd0. And of course, I tried booting by editing as (hd0,5) and as well as (hd0,6). both gave the error display.
secondly w.r.t. to puppy files. I was having frugal installation of browser puppy 0909, 353,354,355,412,421,431,puparcade all in sda6 is attached as sda6.png. All the puppy files are in / (sda6).
the copy of my 40_custom file is:

#!/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 431 frugal on sda6" {
set root=(hd0,6)
linux /pl431/vmlinuz psubdir=pl431
initrd /pl431/initrd.gz
}
EOF

Thanks.
NB:
(where are you out of interest? - I didn't get it. is it about my other interests?)
Attachments
sda6.png
screen shot of my sda6 partition
(87.2 KiB) Downloaded 686 times

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#9 Post by davesurrey »

Okay the png file shows you have installed puppy 431 to a sub directory pl431, not directly to sda6 as you say, but this is no problem and your 40_custom file takes that into account . So all looks good there.

Two things I am concerned about now.

1. you said before that sda5 is 8gb (sic)
sda6 is 7gb (sic) but your pic of sda6 shows it to be nearly 8GB.

2. can you tell me what files are inside /sda6/pl431.

Could you also kindly let me know more about why you can't use gedit in Ubuntu. That definitely is a problem.

As regards my where are you query, it was simply to see what time zone difference we have. Nothing more, except perhaps I have traveled widely in my life and take an interest in different cultures. The way they write and speak etc. Just curious. Not being nosey.

Cheers
Dave

jahmbahwahnn
Posts: 17
Joined: Mon 02 Nov 2009, 05:22

#10 Post by jahmbahwahnn »

Hi Dave,
Firstly - Trivandrum, India.
Secondly - Nice way to break the communication barriers and open up
Thirdly - 15 gb space split into two with 8 and 7 rounded off to cylinders by gparted automatically.
There seems to be a little difference with gparted of puppy431 which says sda5 as 8gb and sda6 as 7.32gb. In ubuntu its different slightly..

The files inside /sda6/pl431 are:
ATAHD, initrd.gz, pup-431.sfs pupsave-aravindpl431.2fs and vmlinuz

w.r.t. gedit in ubuntu I am just sitting and blinking as i am not able to create folders, edit files or copy files in root. I used only one login name and password while install and i logged in using it while startup. I am also digging it to figure out and communicate it to you.

I am also presently going through the grub basics in ubuntu site. http://ubuntuforums.org/showthread.php?t=1195275

Thanks

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#11 Post by davesurrey »

Well to be honest I did think India as your English is extremely good and you write very politely. Welcome to Puppy.

I am a bit stumped. You seem to have the correct files in /pl431.
The only thing I would do is check the following. (Not trying to talk down to you as you seem to be doing all the sensible and right things...but just trying to throw in some ideas.)

Just thought of something. Did you make your sda6 partition using gparted in Ubuntu and not Puppy? There is an inode issue with Ubuntu/Puppy in that new Ubuntus and others use 256 bit inodes whereas most puppies require 128 bit inodes. In which case you need to make the sda6 partition using a puppy live CD and gparted. I thought that puppy 431 wouldn't suffer this issue but may be wrong. Unfortunately this would delete all your other puppies so you may wish to wait and do the things below if you are not sure what was used to make the sda6 partition.

1. check the puppy 431 files are not corrupted..re-install them.
2. see if you can get another puppy to boot. I suggest pl412 or pl420.
I assume sda6 is ext 2 or ext3 (not ext4)
3. I assume that sudo does work for some things in Ubuntu as you would have needed it to do update-grub. Have you tried

Code: Select all

gksudo gedit 
instead of sudo gedit?
You might need to go onto a Ubuntu forum to ask for help there as it seems strange.
4. Does ubuntu boot up okay from the grub menu?

Dave

jahmbahwahnn
Posts: 17
Joined: Mon 02 Nov 2009, 05:22

#12 Post by jahmbahwahnn »

Thanks for the warm redcarpet welcome Dave.
Taking the lead of your present assumptions I will communicate to you after I perform the following:

1. Try to boot pl 412 or 421 or may be give both menuentries in the 40_custom and update grub.
2. Check the format type of sda6. (It was formatted using gpart as I earlier had all those files in the present sda6 in sda2). and of course reformatting wont be a problem, because only browser linux0909 and pl 431 only have pupsave files. rest all are unsaved sessions. I just need to transfer them into another place and reformat sda6 to ext2 using puppy live cd.
3. "w.r.t. gksudo you hit bullseye". I could edit 40_custom as given under and save it.

#!/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 431 frugal on sda6" {
set root=(hd0,6)
linux /pl431/vmlinuz psubdir=pl431
initrd /pl431/initrd.gz
}

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

menuentry "Puppy 421 frugal on sda6" {
set root=(hd0,6)
linux /pl421/vmlinuz psubdir=pl421
initrd /pl421/initrd.gz
}
EOF
One more thing. In earlier cases of giving command for update I opened the terminal and gave update command. terminal came back prompting for sudo password.
now when I opened gedit using gksudo command and edited 40_custom and saved it and subsequently gave update command - it went straight away and updated without prompting for sudo password.
I will reboot the system and communicate the developments.
Thanks Dave (Mr.,Miss,Mrs - ? I am not that quite used to addressing people without salutation, sorry about that).

jahmbahwahnn
Posts: 17
Joined: Mon 02 Nov 2009, 05:22

#13 Post by jahmbahwahnn »

May I say "Eurekaaaaaaaa"

Thats it Dave. The gksudo worked and I could boot pl431,pl421,pl412. The 412 and 412 were unsaved sessions. However 431 had a pupsave file. The session also was saved when I rebooted. My heartfelt thanks Dave.
Summary for users:
Booted ubuntu 9.10
1. Opened terminal and typed "gksudo gedit"
2. In gedit : Opened places/computer/filesystem/etc/grub.d/40_custom
3. Gave the following entries
menuentry "Puppy 431 frugal on sda6" {
set root=(hd0,6)
linux /pl431/vmlinuz psubdir=pl431
initrd /pl431/initrd.gz
}
menuentry "Puppy 412 frugal on sda6" {
set root=(hd0,6)
linux /pl412/vmlinuz psubdir=pl412
initrd /pl412/initrd.gz
}
menuentry "Puppy 421 frugal on sda6" {
set root=(hd0,6)
linux /pl421/vmlinuz psubdir=pl421
initrd /pl421/initrd.gz
}
EOF
4. Saved 40_custom
5. Closed gedit
6. In the terminal which was yet open gave command "sudo update-grub"
7. exit and rebooted the system.

Subsequently i could boot ubuntu, then puppy releases with no problem.
Thanks a million Dave
May God bless you not with what you desire but what you deserve. ('cause you may desire less but you deserve a lot!

davesurrey
Posts: 1198
Joined: Tue 05 Aug 2008, 18:12
Location: UK

#14 Post by davesurrey »

Lots of things to say here. By the way your excellent and clear feedback is making this much easier to try to help with. Here goes:

gksudo is really the correct way of using root priviledges for a graphical application eg gedit. However for most cases sudo usually works with no problems. Not sure why in your case it didn't. sudo is correct for non-graphical apps.

When you are given root privileges (eg you do a sudo) those privileges can remain for a while. Depends how it is set-up. There are pros and cons to this.

I am still unsure how sda6 was partitioned/formatted. If you used Gparted in Ubuntu then I suggest you need to go back and re partition sda6 using Gparted in a Puppy live-CD (the inode problem.) May not affect pup 431 but it will the others.

....... ah, just seen you have fixed it so I'll not carry on.

Glad you got it to work. Well done. Have fun.
Also thanks for confirming your fix. It'll help others.

Dave

ps I'm a male so it's not Mrs or Miss, but just Dave is enough. It's a friendly and informal group here.

noabody
Posts: 14
Joined: Mon 08 Jun 2009, 16:38

#15 Post by noabody »

I edited the 20_memtest86+ in /etc/grub.d/, made appropriate changes, saved as 20_pup431, then chmod +x to make it executable. I created a puppy431 directory at the root of the ext3 filesystem where Ubuntu 9.10 is installed. I edited /boot/grub/grub.cfg to see what my set root=(HDx,y) line would be since it matches what Ubuntu is.

Maybe this is a good alternative to 40_custom. I like the fact that menu entry positions can be altered by changing the filename and running update-grub in Ubuntu. As such 00_pup431 would be the first entry instead of the last. Anyway this is what 20_pup431 looks like:

#!/bin/sh
set -e

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib

# older versions of grub2 do not have this yet (LP: #459080)
if [ ! -e ${libdir}/grub/grub-mkconfig_lib ]; then
echo "no grub-mkconfig_lib, exiting"
exit 0
fi

. ${libdir}/grub/grub-mkconfig_lib

# We can't cope with loop-mounted devices here.
case ${GRUB_DEVICE_BOOT} in
/dev/loop/*|/dev/loop[0-9])
exit 0
;;
esac

if test -e /puppy431/pup-431.sfs ; then
PUP431PATH=$( make_system_path_relative_to_its_root "/puppy431/pup-431.sfs" )
echo "Found Puppy Linux 4.31 frugal image: $PUP431PATH" >&2
cat << EOF
menuentry "Puppy Linux 4.31 frugal" {
set root=(hd0,5)
linux /puppy431/vmlinuz pmedia=atahd psubdir=puppy431
initrd /puppy431/initrd.gz
}
EOF
fi

RHartman10
Posts: 12
Joined: Sun 12 Apr 2009, 20:10

Reopening topic

#16 Post by RHartman10 »

I have installed both Puppy and Ubuntu 9.04 (Jaunty Jackalope) on a USB drive. I allowed Ubuntu to put grub on the USB drive.
Ubuntu is on /dev/sdb5 (hd1,4)
Puppy is on /dev/sdb1 (hd1,0)

note: while Puppy has the lower partition number, I actually installed Ubuntu first.

I used grub in interactive mode to confirm the (hd1,0) and (hd1,4) locations of the Puppy and Ubuntu partitions respectively by using the file completation method described in "Grub from the ground up" at http://www.troubleshooters.com/linux/grub/grub.htm


Under Ubuntu I can edit /boot/grub/menu.lst

I have tried:
title Puppy 4.3.1
root (hd1,0)
kernel /vmlinuz initrd=/initrd.gz pmedia=usbflash pfix=copy nosmp i8042.reset


and I have tried:
title Puppy 4.3.1
root (hd1,0)
kernel /vmlinuz pmedia=usbflash pfix=copy nosmp i8042.reset
initrd /initrd.gz


Most of this had been copied from the line in extlinux.conf that puppy had placed in it's partition (/dev/sdb1). The original was:
default vmlinuz initrd=initrd.gz pmedia=usbflash pfix=copy i8042.reset

I added the "/" to the paths, they should (from what I understand) refer to the root of (hd1,0) after the "root" line in the grub entry.

I changed "default" to "kernel" as seemed to be appropriate from my limited understanding of grub configuration.

the "i8042.reset" kernel option is required by both Ubuntu and Puppy inorder to make the keyboard of a Dell Vostro 1310 work. When booting from the live CD I have to add this to the kernal options otherwise the keyboard does not work.

When I select the "Puppy 4.3.1" option from the grub menu during boot, all I get is:
Error 15: File not found
Press any key to continue...


How do I get grub to boot puppy?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#17 Post by rcrsn51 »

Here's the problem. GRUB gets its device information from the BIOS. So if you boot off a USB device, GRUB sees it as the first available drive and now denotes it as (hd0,0) instead of (hd1,0).

GRUB's (hd1,0) is now your main hard drive and it can't find the core Puppy files there. Hence the error message.

RHartman10
Posts: 12
Joined: Sun 12 Apr 2009, 20:10

#18 Post by RHartman10 »

rcrsn51 wrote:Here's the problem. GRUB gets its device information from the BIOS. So if you boot off a USB device, GRUB sees it as the first available drive and now denotes it as (hd0,0) instead of (hd1,0).

GRUB's (hd1,0) is now your main hard drive and it can't find the core Puppy files there. Hence the error message.

So ... even though grub sees it as hd(1,x) when I'm in ubuntu, when I'm booting it should be hd(0,x) ?

RHartman10
Posts: 12
Joined: Sun 12 Apr 2009, 20:10

#19 Post by RHartman10 »

RHartman10 wrote:
rcrsn51 wrote:Here's the problem. GRUB gets its device information from the BIOS. So if you boot off a USB device, GRUB sees it as the first available drive and now denotes it as (hd0,0) instead of (hd1,0).

GRUB's (hd1,0) is now your main hard drive and it can't find the core Puppy files there. Hence the error message.

So ... even though grub sees it as hd(1,x) when I'm in ubuntu, when I'm booting it should be hd(0,x) ?
Yep. That worked. On to the next problem . . .

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#20 Post by DaveS »

I am interested in the 'update grub' command here. Does this have to be done from within Ubuntu? It seems that once the various installations are complete, booting from a live CD or USB with Puppy would allow simple editing og the configuration file, but would I then have to boot in to Ubuntu and use the 'update grub' command, or could this somehow be done from within the Puppy live session?
Spup Frugal HD and USB
Root forever!

Post Reply