How I upgraded my kernel - from full Install to live CD

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
maggotspawn
Posts: 355
Joined: Tue 19 Aug 2008, 21:12
Location: Los Angeles, CA.
Contact:

How I upgraded my kernel - from full Install to live CD

#1 Post by maggotspawn »

This is how I upgraded my kernel on a full install and ended up with a Live CD with the new kernel. Apparently you can do this from a frugal install, but I didn't have any luck with that method. Barry K. explains how to upgrade/compile the kernel and modules here.
After you followed Barry's instructions and are able to boot with yoiur new kernel and modules you need a new initrd.gz for your iso. Download Puppy Unleashed for the version of Puppy you're running and extract. No need to download the packages. In the kernels folder you'll see a couple of folders create a new one with the name of your new kernel. Copy your new vmlinuz to this folder. Copy
vmlinuz-RDLZMA from one of the other kernel folders to this new folder. Create 2 folders in your new kernel folder: all-firmware and all-modules. Go to lib/modules and copy the contents of all-firmware to all-firmware in your new kernel folder. Extract all the tarballs, then delete the tarballs. In all-modules in your new kernel folder create a folder lib, in lib create a folder modules. Copy the folder in lib/modules named <your kernel number> into the folder modules you created. If this gets confusing you can look at the other folders in the kernel folder in Puppy Unleashed to see the structure. System.map will be in usr/src with your new kernel, copy it into your new kernel folder. Basically your setting everything up in this folder like the other kernel folders. firmware.dep is in etc/modules, copy it over. Put a copy of your .config in the new folder too. Run ./createpuppy in Unleashed. Don't worry about packages just select O.K. All you want is your initrd.gz There are options, don't select all modules in initrd.gz. When your done it'll be in isolinux-builds. You might need to edit the initrd.gz to use union.fs. MU has a solution to edit the initrd.gz
Copy the initrd.gz to /root/test/
Saved there this script as "editinit":

Code:
#!/bin/bash
gunzip initrd.gz
mkdir puppy-init
cd puppy-init
cat ../initrd | cpio -d -i
leafpad init
find . | cpio -o -H newc | gzip -9 > ../initrd.gz
cd ..
rm -rf puppy-init
rm -f initrd


Made it executable and ran it:
cd /root/test
chmod 755 editinit
./editinit

Now leafpad opens, with "init".
If you close leafpad, the script continues to package initrd.gz again.
So you must NOT close leafpad yet!
You now will find the extracted initrd.gz as
/root/test/puppy-init/

in the topdir of the initrd.gz there is a file called init. at about line 52 you could setup the layered filesystem used. change this to unionfs save and repack your initrd.gz. (From aragon)

Close leafpad, so that the new initrd.gz is created.

You need an iso image of the current Pup you're running. Mount it and copy the sfs someplace. Using edit_sfs go to lib/modules in the sfs.
Replace the 2 folders there with the folders in lib/modules of your current full install. Save, this will take a little bit of time. Go back to your iso and using ISO-Master, (menu,Multimedia) replace the initrd.gz, the vmlinuz, and sfs with your new versions. Burn this iso.
It won't be bootable. You'll need a frugal install with your new stuff. Go ahead and remaster with your unbootable iso. Now your done.
Attachments
edit_sfs-1.1.pet
(5.86 KiB) Downloaded 362 times
[url]http://www.agitprop666.com/PuppyLinux.html[/url]
[url]http://www.agitprop666.com/PuppyLinux2.html[/url]

maggotspawn
Posts: 355
Joined: Tue 19 Aug 2008, 21:12
Location: Los Angeles, CA.
Contact:

#2 Post by maggotspawn »

The above edited to correct a mistake.
[url]http://www.agitprop666.com/PuppyLinux.html[/url]
[url]http://www.agitprop666.com/PuppyLinux2.html[/url]

Post Reply