How to update / upgrade kernel for Puppy Linux / Dpup

Posted: December 25, 2009 in Linux
Tags: , , , , , , , ,

Following (unofficial) steps (latest tested with Puppy 5.1.1) were used to create the puppies with updated kernels found at http://pateo.wordpress.com/

N.B. Rename any existing save .sfs/.2fs files on your existing HD if exists using any linux rescue disc otherwise interferes with new .iso

boot puppy
reboot create save file
add dev sfs to boot
reboot
untar source to any existing {HD} (preferably linux FS – may work with NTFS)
Refer to the kernel version notes provided by Barry at http://puppylinux.com/sources (id=puppy pw=linux) and patch source per instructions
Perform any other personal patches as required
In {HD} partition where source extracted, mkdir remasterinit remasteriso remastersfs folders
Mount the base puppy iso by clicking on it then copy all files to remasteriso
Mount the sfs by clicking on it then copy all files to remastersfs
cd remasterinit
zcat remasteriso/initrd.gz | cpio -i -d
rm -r remastersfs/lib/firmware
mkdir remastersfs/lib/firmware
mv /lib/modules /lib/modules.old
mv /lib/firmware /lib/firmware.old
cd /lib
ln -s remastersfs/lib/modules/ modules
ln -s remastersfs/lib/firmware/ firmware
cd {HD} source
make clean
make mrproper
copy DOTConfig file provided by Barry at Puppylinux.com to source folder and rename to .config
make menuconfig (kernel hacking – timers stats, usb sleep, sound generic ac97)
make bzImage
make modules
make modules_install
cp -r -p {source}/arch/x86/boot/bzImage /remasteriso/vmlinuz
copy remastersfs/lib/modules/{new kernel} remasterinit/lib/modules/{new kernel}
===================================
[for puppy]
rm remastersfs/lib/modules/{new kernel}/modules.*
cp -r -p remasterinit/lib/modules/{old kernel}/modules.* remasterinit/lib/modules/{new kernel}/ [overwrite existing files]
edit remasterinit/lib/modules/modules.dep and replace old kernel path with new kernel path
[for dpup - last tested 484 beta 4]
cp -r -p remasterinit/lib/modules/{old kernel}/modules.* remasterinit/lib/modules/{new kernel}/ [overwrite existing files]
cp -r -p remastersfs/lib/modules/{old kernel}/modules.* remastersfs/lib/modules/{new kernel}/ [overwrite existing files]
edit remasterinit/lib/modules/modules.dep and replace old kernel path with new kernel path
===================================
cd remasterinit/lib/modules/{new kernel}
replicate folders/files per {old kernel} and gzip .ko files
rm -r remasterinit/lib/modules/{old kernel}
cd remasterinit
find . | cpio -o -H newc | gzip -9 > {HD}/initrd.gz
cp -r -p {HD}/initrd.gz remasteriso/
cd remastersfs
rm -r remastersfs/lib/modules/{old kernel}
mksquashfs . hd/{new sfs name}.sfs
cp {HD}/{new sfs name}.sfs /remasteriso
cd /remasteriso
mkisofs -D -R -o {HD}/{yourpuppyname.iso} -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .

Comments
  1. 3 speedbike says:

    depmod -b /path/to/intrid/root different kernels different dependency’s.
    old squashfs3 and squashfs4 . Thank you for your guide.
    that would work great on the same kernel to rebuild. but look at the new tree in the newer kernel and the patches. plus udev
    why Gzip the modules.
    to make it smaller.

    • pateo says:

      @3 speedbike:
      Still very new to Puppy Linux so please forgive any mistakes. From observation, make modules_install runs depmod and creates a modules.dep file. However (from memory), Puppy doesn’t seem to make use of this file like other distros. It uses a very small subset of modules.dep in the initrd.gz to load up the most essential modules during boot. The rest of the modules seem to be loaded by some sort of introspection method … I haven’t the experience to modify the packages which make up Puppy so haven’t touched squashfs. I Gzipped the modules in the initrd.gz to emulate the structure of the original initrd.gz from the official 431 Puppy ISO.

  2. hetero says:

    This is my first visit here, but I will be back soon, because I really like the way you are writing, it is so simple and honest

  3. Most of the times i visit a blog i get disappointed. On the contrary,I could honestly say that you writting is decent and your website solid.

  4. Buy Propecia says:

    There may be noticeably a bundle to find out about this. I assume you made certain good points in features also.

  5. Valium says:

    I was very pleased to find this internet-site.I wished to thanks on your time for this glorious learn!! I undoubtedly having fun with each little bit of it and I’ve you bookmarked to check out new stuff you weblog post.

  6. Hey there! This is my first comment here so I just wanted to give a quick shout out and say I genuinely enjoy reading through your posts. Can you recommend any other blogs/websites/forums that deal with the same topics? Thanks for your time!

  7. Awesome post! I will keep an on eye on your blog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s