Posted: Wed 22 Sep 2010, 22:01 Post subject:
How to switch kernels between Puppy versionsSubject description: Taking the kernel from wary-060 and putting it in lupu-511

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.

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!)

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!

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.

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.

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
PeterLast edited by peebee on Tue 21 Dec 2010, 08:50; edited 1 time in total

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

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.

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 .

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.

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.

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
PeterLast edited by peebee on Wed 05 Jan 2011, 11:16; edited 1 time in total

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._________________An expert is just a beginner with experience.
Shamelessly representing TdeM!

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.

[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...

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum