Has anyone dual booted Puppy + Ubuntu with GRUB2?

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

Has anyone dual booted Puppy + Ubuntu with GRUB2?

#1 Post by Jim1911 »

Ubuntu karmic by default loads Grub 2, While the main grub bootloader file continues to reside in the /boot/grub folder, it is no longer Grub's familiar menu.lst. The main Grub 2 instruction file is now grub.cfg. This file is produced by various scripts run when either the "update-grub" or "update-grub2" command is executed. The files primarily responsible for the content of grub.cfg are /etc/default/grub and individual script files located in /etc/boot.d/grub

Custom entries can be added to the 40_custom file or placed in a new file. Any file created must be executable in order to be included in the grub.cfg file during the "update-grub2" command.

I have added the following code to the 40_custom file and made sure that it is executable. However, I get an error about improper syntax and that linux has to be loaded first. I followed the example found at https://wiki.ubuntu.com/Grub2

Code: Select all

menuentry “Woof upup 476 (on /dev/sda2)
Last edited by Jim1911 on Mon 10 May 2010, 22:30, edited 2 times in total.

User avatar
T_Hobbit
Posts: 400
Joined: Sat 27 May 2006, 10:50
Location: Portugal - Lisbon

#2 Post by T_Hobbit »

Try
[quote]
set root=(hd0,2)
menuentry “Woof upup 476 (on /dev/sda2)
T_Hobbit
:idea: Rebuilding old DOS Machine for Wing Commander Privateer and Puppy :!: Old spare parts to give away - anyone interested :?:

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#3 Post by rjbrewer »

Linux sda2 is Grubs hd0,1

Puppy partition needs to be made with Puppies gparted,
not Ubuntus.

Edit;

This post was not relevant to Grub 2.
Last edited by rjbrewer on Sun 05 Sep 2010, 14:07, edited 1 time in total.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
T_Hobbit
Posts: 400
Joined: Sat 27 May 2006, 10:50
Location: Portugal - Lisbon

#4 Post by T_Hobbit »

So...

[quote]set root=(hd0,1)
menuentry “Woof upup 476 (on /dev/sda2)
T_Hobbit
:idea: Rebuilding old DOS Machine for Wing Commander Privateer and Puppy :!: Old spare parts to give away - anyone interested :?:

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

#5 Post by Jim1911 »

T_Hobbit wrote:By the way: sda2 is (hd0,2) or (hd0,1)?
Sorry, that doesn't help, sda2 is properly identified as (hd0,2). Partition naming conventions was one of the Grub2 changes that makes sense.
NOTE: The new partition naming convention. Devices start counting from 0 as done previously. sda is designated as "hd0", sdb is "hd1", etc. However the first partition is now designated as sda1. Counting partitions does not start with "0". The fifth partition on sda is sda5).

A big problem is with their modular scripts which generate a lot of duplicate entries in the grub.cfg file when update-grub2 is run.

However, I may have solved the problem, where "psubdir=Woof" is indicated, it probably should be "subdir=Woof" according to the samples they provide. Their documentation could be better but this could be the syntax error. Unfortunately, I'll have to reload Grub2 to check it out. I didn't want to do without my frugal puppy installations and reinstalled Grub1 since I couldn't get Grub2 to recognize the frugal installations.

Incidentally, my pups are located on ext3 partitions created by the puppy Gparted.

Thanks,
Jim
Last edited by Jim1911 on Sun 30 Aug 2009, 01:18, edited 2 times in total.

User avatar
T_Hobbit
Posts: 400
Joined: Sat 27 May 2006, 10:50
Location: Portugal - Lisbon

#6 Post by T_Hobbit »

This worked for me, with a little correction:

Code: Select all

menuentry “Boxpup
Last edited by T_Hobbit on Sat 29 Aug 2009, 19:27, edited 2 times in total.
T_Hobbit
:idea: Rebuilding old DOS Machine for Wing Commander Privateer and Puppy :!: Old spare parts to give away - anyone interested :?:

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

#7 Post by Jim1911 »

T_Hobbit,

Thanks, I'll experiment with it by first adding the "(hd0,2)" to the path, although "set root=(hd0,2)" should have been sufficient. Apparently using psubdir instead of subdir makes no difference. It may be several weeks before I can check it out though.

Code: Select all

menuentry “Woof upup 476 (on /dev/sda2)

User avatar
T_Hobbit
Posts: 400
Joined: Sat 27 May 2006, 10:50
Location: Portugal - Lisbon

#8 Post by T_Hobbit »

Yes, frugal install on my XP partition.
16? Don't know. Just use the some syntax Zenwalk (Slack based) used to boot.
T_Hobbit
:idea: Rebuilding old DOS Machine for Wing Commander Privateer and Puppy :!: Old spare parts to give away - anyone interested :?:

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

#9 Post by Jim1911 »

I've given up on Grub2 and gone back to Grub 1 for the present, everything I've tried with Ubuntu Karmic's Grub2 to boot Puppy has failed. Even T_Hobbit's code which he has used successfully with Zenwalk.

Karmic should be coming out this month and it defaults to Grub2, fortunately, there are ways to revert it back to Grub1. However, it would be much simpler, if Grub2 can be adapted to boot Puppy.

If anyone has success booting Puppy with Ubuntu Karmic's Grub2. Please post your solution here.

Thanks,
Jim

User avatar
T_Hobbit
Posts: 400
Joined: Sat 27 May 2006, 10:50
Location: Portugal - Lisbon

#10 Post by T_Hobbit »

Did you tried linux16 and initrd16?
My boxpup is at C:\boxpup. Boxpup see C: as sda1. (Partitions can be made from Puppy, Ubuntu, Zenwalk or whatever)

Assuming you are trying a frugal installation, what's your partition configuration?
For frugal install you don't need a special partition, you can use Ubuntu's one. Just add a directory with Puppy's files.
What's grub2 error?
T_Hobbit
:idea: Rebuilding old DOS Machine for Wing Commander Privateer and Puppy :!: Old spare parts to give away - anyone interested :?:

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

#11 Post by Jim1911 »

T_Hobbit,

Thanks for your help, but apparantly Ubuntu's implementation of Grub2 is different from Zenwalk. Grub2 errors varied depending on what I tried, don't remember specifics. It just refuses to recognize pup installations automatically and I haven't discover a manual code that will allow it to recognize pup either on a full hd or frugal installation.

Grub1 is working fine for me booting both frugal and full hd installations so I'm OK for now.

I boot between Vista, Ubuntu, and Numerous Pups using about 8 partitions with no problems. The majority of time is spent using various Puppy derivatives.

Thanks,
Jim

greenear
Posts: 1
Joined: Sun 25 Oct 2009, 15:37
Location: Germany, Bielefeld

#12 Post by greenear »

@Jim1911
my bootpartition wrote:greenear@greenear:~$ sudo tune2fs -l /dev/sda1 | grep Inode
Inode count: 77120
Inodes per group: 7712
Inode blocks per group: 241
Inode size: 128
My working Grub2 solution under Karmic Koala.
I installed Puppy from CD into my Windows XP Partition.

Code: Select all

blkid
... to get the uuid of the Partition

Code: Select all

sudo nano /etc/grub.d/41_puppy

Code: Select all

#! /bin/sh -e

echo "Puppy Linux 431 frugal" >&2
 cat << EOF

menuentry "Puppy Linux 431 frugal" {
    saved_entry=\${chosen}
    save_env saved_entry
    set quiet=0
    insmod  ntfs
    set root=(hd0,2)
    search --fs-uuid --set 384CB7494CB70124
    linux /puppy431/vmlinuz pmedia=atahd psubdir=puppy431 nosmp
    initrd /puppy431/initrd.gz 
}

EOF
... close it with ctrl+x

Code: Select all

sudo chmod +x /etc/grub.d/41_puppy
... make it executable

Code: Select all

sudo grub-mkconfig 

Code: Select all

sudo update-grub 
I don't now what i have done exactly in the script, but it works fine for me. :D

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

#13 Post by Jim1911 »

greenear,

Thanks, I'll give this a try when I upgrade to Karmic Koala. There is definitely going to be a learning curve to move to Grub2>

Thanks,
Jim

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

#14 Post by davesurrey »

Just spent an "interesting" 2 hours wrestling with Grub2 after I downloaded the final release of Ubuntu 9.10 today.

I prefer to use Ubuntu's grub to boot all my distros and previously used the /boot/grub/menu.lst in Ubuntu. I did the same this time installing Ubuntu's grub into the MBR.

It picked up Windows xp, Windows 7, Ubuntu 9.10 and Ubuntu 9.04, Fedora 11 and Debian 5.

It failed to recognise any of my 5 Puppy frugal installs or Tiny Core Linux. But there again grub 0.97 also failed in that way.

Eventually got it to boot the Puppies so in case others want to do this, here goes (some of this is a repeat of what's above).....

1. As mentioned don't do anything to the /boot/grub/grub.cfg file !!!

2. Copy the file
/etc/grub.d/40_custom
somewhere.

3. rename it something like
41_puppy431
4. after the 5 lines of existing text add whatever you need to boot puppy ...see below.

5. move the file back to /etc/grub.d/

6.

Code: Select all

 sudo chmod +x /etc/grub.d/41_puppy
to make the file executable.

7.

Code: Select all

 sudo grub-makeconfig 
then

Code: Select all

 sudo update-grub
Without this the /boot/grub/grub.cfg file doesn't get updated.

8. Now the grub boot code that seemed to work for me was

Code: Select all

menuentry "Whatever you call puppy" {
set root=(hd1,5)
linux  /puppy431/vmlinuz  psubdir=puppy431
initrd  /puppy431/initrd.gz
}
EOF
Nice and simple. Obviously change depending on your installation. This was for Puppy431 residing as a frugal on sdb5 in a subdirectory called /puppy431. Note the numbering.

9. The way of describing a partition has changed!!!
I have my Puppies on sdb5 . This used to be described in grub as (hd1,4). Now it's (hd1,5). :-(

10. Note that adding
insmod ext3
just after the menuentry line seemed to stop it booting.

Also adding a line
search --fs-uuid --set ehdn78sh-3738-6dg8-bba3-ehd76sgs6sgs
to identify the UUID of the partition that puppy is on didn't seem to be necessary.

This worked for puppy 412, 421, 431.1 and 431.

I am still struggling to get puppy214X working. It does work using the psubdir method above but you're back to having to tell it which pup_save file to use.

Make similar files for other puppies and note that grub will list them in numerical order so, for example, 42_puppy412 will come before 43_puppy214.

HTH
Dave

mawebb88
Posts: 246
Joined: Sun 13 Jul 2008, 09:54
Location: France nr Lyon

Booting Puppy 412 using Ubuntu's GRUB2

#15 Post by mawebb88 »

@davesurrey

Tried your solution(including the update_grub bit) but its keeps telling me that:

Code: Select all

"error: You need to load the kernel first."
My /etc/grub.d/40_custom (I did not bother making a separate custom template like you) has:

Code: Select all

menuentry "Puppy-412" {
set root=(hd1,0)
linux  /puppy412/vmlinuz  psubdir=puppy412
initrd  /puppy412/initrd.gz
} 
In GRUB1 instead of the "linux" command it was of course "kernel" but tried this and it does not recognise this. Any other thoughts?

Rgds Mike

EeePC901 with Unbuntu Netbook Remix 9.10 on the first SSD and various frugal pups on the bigger second SSD

Woops! Just got it to work immediately after posting!. Changed "set root=(hd1,0)" as used in GRUB1 to "set root=(hd1,1)". So its as you said in your point 9 the numbering has changed!

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

#16 Post by davesurrey »

Hi Mike,
Just seen your post so sorry I didn't get to respond before.

Anyway glad you got it working.

These "subtle" changes like the disk numbering not changing but the partition numbering changing, plus "set root" rather than "root" and "linux"rather than "kernel" are not at all difficult to do but why oh why did the developers make it just that little bit more troublesome.

Anyway I hope grub2 will eventually deliver all that it promises.

Cheers
Dave

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

#17 Post by Jim1911 »

Hi Dave,

Thank you for sharing your experience with Grub2. Looking back over mine, the puppy code seems the same, although I put all my pups in one file in the same location that you used instead of separate files. Looking at the grub.cfg after running sudo update-grub showed my pup code, but grub kept giving errors.

Maybe they've made some changes from the alpha's that I was trying to use. Your success encourages me to try again. I do think that Grub2 is the wave of the future, especially with puppy which stays ahead of the major distributions in many ways.

Thanks,
Jim

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

#18 Post by davesurrey »

Jim1911.

Jim, remember that I am a grub2 "expert" of only a few hours :-) but if you want to give your code that's in your /etc/grub.d/41_puppy file (or whatever it's called) and the relevant bit of grub.cfg I'll be happy to compare with mine. Might be worth a try?

My grub2 came with the final version of Ubuntu 9.10 released Thursday. Where did yours come from?

Also not too sure I understand this?
although I put all my pups in one file in the same location that you used instead of separate files
My Puppys are all in the same partition but each one in a separate directory including the pup_save files. You might want to try that configuration if all else fails.

Cheers
Dave

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#19 Post by mikeb »

So what exactly does grub 2 deliver to justify the changes with respect to puppy?

mike

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

#20 Post by Jim1911 »

davesurrey wrote:Jim1911.
My grub2 came with the final version of Ubuntu 9.10 released Thursday. Where did yours come from?
Also not too sure I understand this?
although I put all my pups in one file in the same location that you used instead of separate files
My Puppys are all in the same partition but each one in a separate directory including the pup_save files.
I was using one of the alpha versions of Ubuntu 9.10 back in August.

The code (sample below) I used in the 40_puppy file is very similar to yours except I included about 6 pups each in their own psubdir and some were on different partitions. I used the same directory location and commands that you used to make the file executable and update the grub. However, kept getting errors. Hopefully the final release of Grub2 has improved. For now, I am sticking with ubuntu 9.04 for awhile longer. Also boot Kubuntu 9.10 and Windows Vista using Grub 0.97. Of course Grub2 recognized those fine.

Code: Select all

menuentry “Woof upup 476 (on /dev/sda2)

Post Reply