How to switch kernels between Puppy versions

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

How to switch kernels between Puppy versions

#1 Post by jrb »

Recently I was asked to explain how to switch kernels in lupu-511 by Puppy user peebee. He wants kernel 2.6.32.16 as used in wary-060 since it is the only one he has found that will recognize his modem.

There are two similar ways to do this, the short way (frugal install) and the long way, although one can lead to the other. Here's what's common to both:
You must use the initrd.gz, vmlinuz, /etc/modules/, /lib/firmware/, and /lib/modules/ from wary-060. You must strip out the /etc/modules/, /lib/firmware/, and /lib/modules/ from lupu-511.sfs.

Here's how:
Install pizzagood's edit_sfs-2.1.pet.

Open Edit-SFS from the Utility menu.

Extract lupu-511.sfs from lupu-511.iso. Click on the .iso and when it opens in rox drag lupu-511.sfs to the edit-sfs window.

When the edit window opens up delete /etc/modules/, /lib/modules/ and /lib/firmware/.

Click on wary-060.iso. Click on wary-060.sfs to mount it. Drag /etc/modules/, /lib/modules/ and /lib/firmware/ from wary-060.sfs into the edit window and copy them in. (Make sure they end up in the right place!) :wink:

Build the new lupu-511.sfs.

For the short way (frugal install):
Copy boot.cat, boot.msg, help.msg, initrd.gz, isolinux.bin, isolinux.cfg, logo.16, and vmlinuz from wary-060 into a frugal install folder on your harddrive.

Rename the new lupu-511.sfs to wary-060.sfs and place it in the frugal install folder.

Thats it! You can now boot up what Puppy thinks is wary-060 but is actually lupu-511 with the new kernel.

Here's the longer way:
Do everything as above but don't rename lupu-511.sfs.

Download 0_pupbuild_tools_2.tar.gz. Extract them to a linux partition. Could be your /root directory if you have a reasonable size pupsave or format a usb drive to ext2 or ext3.

Place the initrd.gz from wary-060 into the /initrd-tree folder of the pupbuild tools. Click on the Open_initrd.sh script file in the tools. The original initrd.gz will be copied to initrd.gz1 in the main tool folder. Open the initrd-tree folder and you will see the contents of initrd.gz.

Replace the DISTRO_SPECS in the initrd-tree folder with /etc/DISTRO_SPECS from lupu-511.sfs. Click on the Rebuild_initrd.sh and the new initrd.gz will appear in the tools folder.

Place this initrd.gz, the boot.cat, boot.msg, help.msg, isolinux.bin, isolinux.cfg,, and vmlinuz from wary-060, the logo.16 from lupu-511 and the new lupu-511.sfs into the iso_files folder. Click the make_boot_iso script file and myiso.iso will appear in the tools folder. Rename it lupu-511-k2.6.32.16.iso and burn it to disk. Done Deal! :D

Here's a picture of lupu-511 with the 2.6.32.16 kernel:
Attachments
lupu-511-k2.6.32.16_new.jpg
lupu-511 running kernel 2.6.32.16
(32.69 KiB) Downloaded 12756 times

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

WONDERFUL

#2 Post by peebee »

Many thanks to jrb

I now have a schizophrenic frugal puppy that thinks it is wary060 but behaves just like lupu511 EXCEPT that it now talks successfully to my Agere HDA modem.

The only wrinkle to jrb's excellent how-to is that any lupusave file has to be renamed to warysave - but I guess that's not too hard to fathom.

I'm delighted!!
Thanks jrb

screenshot attached:
Attachments
screen230910.jpg
(69.05 KiB) Downloaded 12680 times

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

Re: WONDERFUL

#3 Post by jrb »

peebee wrote:The only wrinkle to jrb's excellent how-to is that any lupusave file has to be renamed to warysave
Thanks for the feedback peebee.

You can eliminate that problem by replacing the /etc/DISTRO_SPECS in lupu-511.sfs with the one from wary-060 using edit_sfs. Then it will really think its wary-060! It will create its own warysaves.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Another small wrinkle

#4 Post by peebee »

I tried to do the same trick with Puppy Zen 001 as Iguelder is basing that on 2.6.32 as well.

The wrinkle I discovered is that you do need to edit /etc/DISTRO_SPECS to ensure that DISTRO_VERSION is set to a number greater than the version being incorporated otherwise you will get a system update every time you boot. (in my case >60)

Whilst editing also change DISTRO_FILE_PREFIX to the version being incorporated. (in my case wary)

With these changes I have another schizophrenic Zen / Wary Puppy which talks to my modem.

Cheers
Peter

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#5 Post by Iguleder »

peebee, if you want a special build of Squeeze with a certain kernel, just reply on the Squeeze thread. At the moment the plan is two editions for 010, one main edition with 2.6.32.x and a bleedin' edge one with 2.6.35.x.

If you want a third flavor with some older kernel, please let me know, I'll do my best. :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Update for lupu515 with spup052 and wary102

#6 Post by peebee »

I have successfully made the following hybrids:

lupu515 using the kernel from spup052

lupu515 using the kernel from wary102

In both cases I found that an additional change to the .sfs was needed as well as those described above:

copy the /lib/network folder from the kernel .sfs as lupu515 does not have this directory which is needed to create wifi connections

so the steps are now:
delete the /lib/firmware and /lib/modules directories from .sfs being edited
copy the /lib/firmware and /lib/modules and /lib/network directories from the kernel .sfs
overwrite the /etc/DISTRO_SPECS with the kernel .sfs version
build the edited .sfs
rename the rebuilt .sfs to match the kernel .sfs

The lupu515/spup052 hybrid runs on my Thinkpad 600E with just 196MB memory and allows me to use my Netgear pcmcia wifi card - lupu515 on its own (and most other recent puppies) either ignores all pcmcia cards or crashes with this wifi card inserted.

The lupu515/wary102 hybrid gives me access to my AgereHDA modem on my HP550 laptop so that I can use this when away from home. It also has the added bonus that the B43 wifi in the HP550 maintains its Access Point without the bodge needed in lupu515 on its own.

[edit] now fixed [/edit]Now all I need to do is get the sound working again on my Thinkpad 600E.....

Cheers
Peter
Last edited by peebee on Tue 21 Dec 2010, 12:50, edited 1 time in total.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#7 Post by sc0ttman »

So.... Is this right...??

assuming:
host puppy = what I want to boot and use (lupu)
target kernel puppy = the puppy with the kernel I want (wary)

How-to, a summary:

1. make temp dir, open up sfs of host puppy and the sfs of target kernel puppy
2. replace the kernel modules and DISTRO_SPECS in your host puppy with those from target kernel puppy
3. rebuild the sfs, place in your temp dir
4. place the iso files from target kernel puppy into temp dir (except the main sfs)
5. rename your new sfs to match the name of the target kernel puppy sfs file

(optional steps, 6-10): if you want to keep the host puppy sfs name and save file naming:

6. restore original host puppy sfs name, then edit it, to restore its DISTRO_SPECS back to the original
7. unpack initrd.gz of the target kernel puppy
8. replace the target kernel puppy DISTRO_SPECS found in initrd.gz with DISTRO_SPECS from host puppy
9. rebuild initrd.gz
10. replace the initrd.gz in your temp folder with the new one

11. make iso using files in temp folder
12. DONE...

I want to make sure I've understood this correctly.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Updated sequence from post #1

#8 Post by peebee »

I only do frugal installs.....

Updated for lupu515 + wary102 (with full recognition to jrb):

Install pizzagood's edit_sfs-2.1.pet
http://www.browserloadofcoolness.com/so ... fs-2.1.pet

Open Edit-SFS from the Utility menu.

Extract lupu_515.sfs from lupu-515.iso. Click on the .iso and when it opens in rox drag lupu_515.sfs to the edit-sfs window.

When the edit window opens up delete /etc/modules/, /lib/modules/ and /lib/firmware/.

Click on wary-102.iso. Click on wary_102.sfs to mount it.
Drag /etc/DISTRO_SPECS and /etc/modules/ and /lib/modules/ and /lib/firmware/ and /lib/network from wary_102.sfs into the edit window and copy them in. (Make sure they end up in the right place!)

Build the new lupu_515.sfs and move it into a new frugal install folder BEFORE clicking Finish.

Copy initrd.gz, and vmlinuz from wary-102.iso into the new frugal install folder on your harddrive.

Rename the new lupu_515.sfs to wary_102.sfs and place it in the frugal install folder.

Thats it! You can now boot up what Puppy thinks is wary120 but is actually lupu515 with the wary120 kernel.

Cheers
Peter

taca0
Posts: 123
Joined: Thu 07 May 2009, 00:57

#9 Post by taca0 »

I do the switch with Remaster Puppy Live CD like this:

First I boot frugal the puppy version or derivative that I want .

Second use the edit-sfs to open the sfs with the kernel I want and make the change like the /lib/firm... and /lib/modu.. and /etc/modu.. the same as JRB .

Now come the difference when all it in place , mount the same iso of the kernel you made the copy/paste . Then begins the Remaster puppy live cd from Setup menu and accepts the options as normal and it will give you the change including the inintrd.. DISTRO.. and vmlinuz.... All its ready for use .

For me works .

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Some questions...

#10 Post by peebee »

taca0 wrote:Now come the difference when all it in place , mount the same iso of the kernel you made the copy/paste . Then begins the Remaster puppy live cd from Setup menu and accepts the options as normal and it will give you the change including the inintrd.. DISTRO.. and vmlinuz.... All its ready for use.
Hi taca0 - this sounds interesting - can you describe the sequence using the names of the various components please? I'm not clear:

a. what happens to the output of edit-sfs - is the new .sfs mounted?

b. what is mounted where when you run Remaster live CD?

I had understood that Remaster takes a snapshot of your complete system - so am unclear as to what the system contains when you do your snapshot.

Many thanks
Peter

taca0
Posts: 123
Joined: Thu 07 May 2009, 00:57

#11 Post by taca0 »

ok:

Example: I want to make a the recent spup052 with the kernel of Lucid 5.1 .

1. I boot spup052 (I do it frugal) .
2. When its ready I install edit-sfs...pet .
3. I mount the iso of lucid 5.1 and inside looks for the sfs (that have the kernel) and drag and drop to edit-sfs and when its open.
4. First deletes the /lib/modules , /lib/firmware /etc/modules from the spup052 .
5. From the open sfs of lucid make the move (no have to be copy) of the same folders .
6. The rest of the remaining lucid sfs open just delete the other folders and click build .
7. Now with the Lucid 5.1 its already mounted .
8. Begins the Remaster puppy live cd from setup area.
9. The rest its follow the options .

I am not so good making instruction but check it if work for you.

Remaster have an option for make customize version or for any other computer. The options are well explained.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Method 2 using Remaster Live-CD

#12 Post by peebee »

Hi taca0

Thanks for the instructions - I've tried them and all goes well. I don't think there is any need to use edit-sfs by the way - you can just copy direct from the kernel .sfs

It's a bit more complicated in terms of the number of steps to go through than the original way above, but the advantage is that you end up with a Puppy with the correct identity and pointing at the correct repository.

The steps I used were:

1. Boot a RAM only target system (in my case lupu515) with the minimum of setup options

2. Mount the kernel ISO (in my case wary104) and then mount the kernel SFS from within it

3. Delete the directories /etc/modules/, /lib/modules/, /lib/firmware/ from the running target system

4. COPY the directories /etc/modules/, /lib/modules/, /lib/firmware/ and /lib/network/ from the kernel SFS into the running target system

5. Unmount the kernel SFS but leave the kernel ISO mounted

6. Run the Remaster Live-CD utility from the Setup menu using the mounted kernel ISO and the default answers (unless you want to make other changes at the same time) to give either a CD image directory or an ISO file or a burnt CD as you require

7. You may need to rename the resulting .sfs to change _ to - or vice versa if the 2 systems use differing naming conventions. You may also need to update the version of the .sfs file using SFSConvert from Utilities - General Utilities menu.

N.B. it may look like the kernel ISO has been destroyed in this process however it hasn't and will reappear after a reboot.

Boot your new hybrid system.

Cheers
Peter
Last edited by peebee on Wed 05 Jan 2011, 15:16, edited 1 time in total.

106498
Posts: 250
Joined: Mon 19 Nov 2007, 02:07
Location: NZ
Contact:

#13 Post by 106498 »

Thank you for posting this, it came just at the right time! I plonked the kernel from fluppy009 into a puppy431 retro install. It now supported most of my devices.

One warning. I first got a kernel panic when I booted. This was fixed by converting the sfs from version 3 to 4 using a program in the menu. This needs to be done when changing from an old (2.6.25 ish?) to a recent kernel.
[color=green]An expert is just a beginner with experience.[/color]
Shamelessly representing [url=http://www.tdem.co.nz]TdeM[/url]!

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#14 Post by peebee »

106498 wrote:Thank you for posting this, it came just at the right time! I plonked the kernel from fluppy009 into a puppy431 retro install. It now supported most of my devices.

One warning. I first got a kernel panic when I booted. This was fixed by converting the sfs from version 3 to 4 using a program in the menu. This needs to be done when changing from an old (2.6.25 ish?) to a recent kernel.
Glad to be of help.

Perhaps we should start a list of "combinations" known to work - this would ideally go into the 1st post however jrb started this topic so only he has edit ability. Perhaps a wiki is needed....I'll investigate.

Cheers
Peter

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#15 Post by sc0ttman »

peebee wrote:[Perhaps we should start a list of "combinations" known to work - this would ideally go into the 1st post however jrb started this topic so only he has edit ability. Perhaps a wiki is needed....I'll investigate.

Cheers
Peter
I have added the wary kernel to Puplite (puppy 4.2), and it boots, using the remasterpup2 method...

It boots,.. but should I switch around the symlinks to mksquashfs3 and mksquashfs4?
(So that the default mksquashfs will be mksquashfs4...)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#16 Post by peebee »

sc0ttman wrote:It boots,.. but should I switch around the symlinks to mksquashfs3 and mksquashfs4?
(So that the default mksquashfs will be mksquashfs4...)
Gosh - no idea - needs an "expert" to answer that.....

I've been making hybrids between recent woof based puppies so haven't run into those sort of issues.....

vanchutr
Posts: 438
Joined: Sat 05 Aug 2006, 12:04

#17 Post by vanchutr »

1. Aim: Bump kernel 2.6.31.14 in (of) Wary 500 to Puppy 432 (kernel 2.6.30.5)
2. Progress steps
(a). Run (boot) Puppy 432
(b). Copy pup-432.sfs to pup-0432.sfs and open pup-0432.sfs
(c). Copy all in opened pup-0432.sfs in any place (e.g /tmp/sq) (in an ext2 partition)
(d). umount pup-0432.sfs (and you can delete pup-0432.sfs)
(e). Open /tmp/sq and delete these directories: /etc/modules, lib/firware, lib/modules
(f). Open wary_500.sfs and copy these directories: /etc/modules, lib/firware, lib/modules (from wary_500.sfs to /tmp/sq)
(g). Unmount wary_500.sfs
(h). Open terminal (console) at /tmp
(i). Run: mksquashfs sq wary_500.sfs. You will get a "new wary_500.sfs"
(j). Test boot "new wary_500.sfs" with initrd.gz and vmlinuz of wary 500.
*** Some apps will be updated after boot the new wary_500.sfs

Any comments?
Thanks

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Method #3?

#18 Post by peebee »

vanchutr wrote:Any comments?
Thanks
Hi vanchutr

Looks like this is a "3rd way" or method #3??

Did it work? Did you get a working pup432 with a wary500 kernel?

Are there any advantages over the other 2 methods as you see it?

If I understand correctly you are putting the wary500 kernel into pup432 - but you get a new wary500 so its like method #1? I guess I like method #2 best so far as it maintains the correct puppy identity and it uses built in utilities from the menu - so no install of .pets and no typing into terminals.

Thanks
Peter

User avatar
James C
Posts: 6618
Joined: Thu 26 Mar 2009, 05:12
Location: Kentucky

#19 Post by James C »

I just followed the steps in the first post and made a retro Lucid 520 with the 2.6.30.5 kernel. No problems at all....posting from it now.
Really interesting thread....
Attachments
Lucid-520 2.6.30.5.png
(67.53 KiB) Downloaded 3276 times

vanchutr
Posts: 438
Joined: Sat 05 Aug 2006, 12:04

#20 Post by vanchutr »

Thanks to your comments, Peebee (Peter)
Looks like this is a "3rd way" or method #3??
It is'nt a third way (it's a trick). I don't care about edit_init..
Did it work? Did you get a working pup432 with a wary500 kernel?
I works with all apps installed in old Pupy 432 but with new kernel from Wary 500.
Are there any advantages over the other 2 methods as you see it?
No too much. I don't use other apps (scripts). No need to install anything. You can compare with other "methods" with my trick.
If I understand correctly you are putting the wary500 kernel into pup432 - but you get a new wary500 so its like method #1? I guess I like method #2 best so far as it maintains the correct puppy identity and it uses built in utilities from the menu - so no install of .pets and no typing into terminals.
Same effects if you test my trick. I test this trick in order: "Don't spare to much time to compile, update a new kernel while you can use a good kernel from your Puppy friends"

Thanks,
Nice days to you

Post Reply