I'm amazed at how easy downgrading and upgrading kernels in Arch Linux is.
I'm used to create Puppy+ManyOtherThings multiboot cds, usbs, Puppy is just the greatest live distro there is.
Now I have never looked at the code that loads the kernel, so basically I'm blind. But I can see some things.
This is how it works in Arch Linux: there are the 'linux' and 'linux-lts' packages (and other linux-* packages). Both packages can be upgraded or downgraded and both can coexist peacefully, there is no conflict.
Basically the grub2 menu is updated to reflect any changes. Well, that's great.
============================================
In Puppy, I see the kernel is now in a separate SFS and this SFS must conform to: DISTRO_SPECS
That file is located in initrd.gz -> /DISTRO_SPECS
Another copy is found in puppy_zzzz_X.Y.Z.sfs -> /etc/DISTRO_SPECS
I wonder if initrd.gz -> /DISTRO_SPECS is copied to puppy_zzzz_X.Y.Z.sfs -> /etc/DISTRO_SPECS on bootup?
It should overwrite the one in puppy_zzzz_X.Y.Z.sfs
These are they key variables stored in DISTRO_SPECS
Code: Select all
DISTRO_ZDRVSFS='zdrv_slacko_6.3.0.sfs'
DISTRO_ADRVSFS='adrv_slacko_6.3.0.sfs'
DISTRO_YDRVSFS='ydrv_slacko_6.3.0.sfs'
Let's say we have these files in a USB stick
Code: Select all
/IMG/PUPPY/SLACKO/devx_slacko_6.3.0.sfs
/IMG/PUPPY/SLACKO/initrd.gz
/IMG/PUPPY/SLACKO/puppy_slacko_6.3.0.sfs
/IMG/PUPPY/SLACKO/vmlinuz
/IMG/PUPPY/SLACKO/zdrv_slacko_6.3.0.sfs
Code: Select all
title Puppy Linux - slacko
kernel /IMG/PUPPY/SLACKO/vmlinuz psubdir=IMG/PUPPY/SLACKO pmedia=usbhd pfix=fsck,nocopy
initrd /IMG/PUPPY/SLACKO/initrd.gz
============================================
============================================
Now, taking that information into account, it's time to device an evil plan.
- We'll ship 3 kernels
1) Kernel 3.14.55 (not that old, not that new)
2) Kernel-new 4.2.5 (the most recent stable kernel)
3) Kernel-retro 3.4.108 (for a machine like mine)
1) Kernel 3.14.55
Code: Select all
/IMG/PUPPY/SLACKO/initrd.gz
/IMG/PUPPY/SLACKO/vmlinuz
/IMG/PUPPY/SLACKO/zdrv_slacko_6.3.0.sfs
Code: Select all
/IMG/PUPPY/SLACKO/initrd-new.gz
/IMG/PUPPY/SLACKO/vmlinuz-new
/IMG/PUPPY/SLACKO/zdrv_slacko_6.3.0-new.sfs
The key variables should like this
Code: Select all
DISTRO_ZDRVSFS='zdrv_slacko_6.3.0-new.sfs'
DISTRO_ADRVSFS='adrv_slacko_6.3.0-new.sfs'
DISTRO_YDRVSFS='ydrv_slacko_6.3.0-new.sfs'
Code: Select all
/IMG/PUPPY/SLACKO/initrd-retro.gz
/IMG/PUPPY/SLACKO/vmlinuz-retro
/IMG/PUPPY/SLACKO/zdrv_slacko_6.3.0-retro.sfs
The key variables should like this
Code: Select all
DISTRO_ZDRVSFS='zdrv_slacko_6.3.0-retro.sfs'
DISTRO_ADRVSFS='adrv_slacko_6.3.0-retro.sfs'
DISTRO_YDRVSFS='ydrv_slacko_6.3.0-retro.sfs'
Now the grub4dos menu should look like this
Code: Select all
title Puppy Linux - Slacko
kernel /IMG/PUPPY/SLACKO/vmlinuz psubdir=IMG/PUPPY/SLACKO pmedia=usbhd pfix=fsck,nocopy
initrd /IMG/PUPPY/SLACKO/initrd.gz
title Puppy Linux - Slacko (most recent kernel)
kernel /IMG/PUPPY/SLACKO/vmlinuz-new psubdir=IMG/PUPPY/SLACKO pmedia=usbhd pfix=fsck,nocopy
initrd /IMG/PUPPY/SLACKO/initrd-new.gz
title Puppy Linux - Slacko (retro kernel)
kernel /IMG/PUPPY/SLACKO/vmlinuz-retro psubdir=IMG/PUPPY/SLACKO pmedia=usbhd pfix=fsck,nocopy
initrd /IMG/PUPPY/SLACKO/initrd-retro.gz