Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 03 May 2016, 10:41
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Ability to choose a kernel at bootup? (bootloader menu)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
jlst

Joined: 23 Nov 2012
Posts: 205

PostPosted: Mon 23 Nov 2015, 14:22    Post subject:  Ability to choose a kernel at bootup? (bootloader menu)
Subject description: and their possible solutions
 

I've been thinkng about this for a couple of days. These are just ideas... nothing concrete at the moment

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:
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:
/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


And this is a grub4dos menu entry to boot slacko from a subdirecty

Code:

title Puppy Linux - slacko
  kernel /IMG/PUPPY/SLACKO/vmlinuz   psubdir=IMG/PUPPY/SLACKO pmedia=usbhd pfix=fsck,nocopy
  initrd /IMG/PUPPY/SLACKO/initrd.gz

We can see the only important files for the bootloader are vmlinuz and 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:
/IMG/PUPPY/SLACKO/initrd.gz
/IMG/PUPPY/SLACKO/vmlinuz
/IMG/PUPPY/SLACKO/zdrv_slacko_6.3.0.sfs


2) Kernel-new 4.2.5
Code:
/IMG/PUPPY/SLACKO/initrd-new.gz
/IMG/PUPPY/SLACKO/vmlinuz-new
/IMG/PUPPY/SLACKO/zdrv_slacko_6.3.0-new.sfs

Now we need to modify initrd-new.gz -> /DISTRO_SPECS
The key variables should like this
Code:
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'


3) Kernel-retro 3.4.108
Code:
/IMG/PUPPY/SLACKO/initrd-retro.gz
/IMG/PUPPY/SLACKO/vmlinuz-retro
/IMG/PUPPY/SLACKO/zdrv_slacko_6.3.0-retro.sfs

Now we need to modify initrd-retro -> /DISTRO_SPECS
The key variables should like this
Code:
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:

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


Something like that would allow puppy to be even more awesome
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3349
Location: www.eussenheim.de/

PostPosted: Mon 23 Nov 2015, 14:52    Post subject: Re: Ability to choose a kernel at bootup? (bootloader menu)
Subject description: and their possible solutions
 

jlst wrote:
Something like that would allow puppy to be even more awesome

You had to include firmware and kernel modules for 3 kernels.
Thus this would no more be a puppy but a pregnant monster bitch I fear. Rolling Eyes
Back to top
View user's profile Send private message 
gcmartin


Joined: 14 Oct 2005
Posts: 6236
Location: Earth

PostPosted: Mon 23 Nov 2015, 17:48    Post subject: Boot different versions of a distr using @StemSee's approach  

This "may" meet the need: @Stemsee has for over a year shown the community a distro that when booted, at Boot Menu the user selects whether he would choose the 64bit version or the32bit version of the same distro. Thus, a single ISO provides the user selectable boot options of the same distro.

Pull and view his distro from this thread.

Would his technique address this need?

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 205

PostPosted: Tue 08 Mar 2016, 14:16    Post subject:  

I was right.

My precise install has 4 kernels. I just have to choose one when booting

This is how my grub4dos menu looks like:

Quote:
title Puppy Linux - PRECISE k3.4.103
kernel /PUPPYBOOT/precise/vmlinuz-3.4.103-tahr_noPae psubdir=PUPPYBOOT/precise pmedia=atahd
initrd /PUPPYBOOT/precise/initrd-3.4.103-tahr_noPae.gz

title Puppy Linux - PRECISE k3.14.55
kernel /PUPPYBOOT/precise/vmlinuz-3.14.55-slacko psubdir=PUPPYBOOT/precise pmedia=atahd
initrd /PUPPYBOOT/precise/initrd-3.14.55-slacko.gz

title Puppy Linux - PRECISE k3.14.56
kernel /PUPPYBOOT/precise/vmlinuz-3.14.56-tahr_noPae psubdir=PUPPYBOOT/precise pmedia=atahd
initrd /PUPPYBOOT/precise/initrd-3.14.56-tahr_noPae.gz

title Puppy Linux - PRECISE k4.4.1
kernel /PUPPYBOOT/precise/vmlinuz-4.4.1-i486-nopae psubdir=PUPPYBOOT/precise pmedia=atahd
initrd /PUPPYBOOT/precise/initrd-4.4.1-i486-nopae.gz


Now I see that:

/etc/networkmodules must be /etc/networkmodules-$(uname -r)
/boot/System.map must be /boot/System.map-$(uname -r)
/etc/default/aufs must be /etc/default/aufs-$(uname -r)
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 205

PostPosted: Tue 08 Mar 2016, 14:29    Post subject:  

What I'll do next is this:

1) Make a huge and unique firmware package ... already done (80mb gz compressed)
2) Create a single sfs containing all the kernels and firmware
3) Test and modify code to suit this new approach...
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 7428
Location: Gatineau (Qc), Canada

PostPosted: Tue 08 Mar 2016, 22:38    Post subject:  

Hello jlst

I need more time to absorb your complete idea, but about your sentence :

> I wonder if initrd.gz -> /DISTRO_SPECS is copied to puppy_zzzz_X.Y.Z.sfs -> /etc/DISTRO_SPECS on bootup?

I can tell you right now that during the boot process, there is an equivalence check between
the two: if the one at /etc/ is not identical -- except for a couple of lines at the bottom -- with
the one iin the initrd: no go, the boot process stops with an error.

BFN.

_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 7428
Location: Gatineau (Qc), Canada

PostPosted: Tue 08 Mar 2016, 22:50    Post subject:  

Hello again, jlst.

Sorry for coming late to your thread. I hadn't noticed it before.
~~~~~~~~~~

Ahem. Smile The most recent stable kernel as of this writing is version 4.4.4!
I checked this morning.

Why not go for the most recent LTS kernel? Stable kernels are like migrating birds -- no,
wait, they're worse: rather like holiday lovers. They may be stable technically, but they're
very soon replaced.

BFN.

_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

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


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0410s ][ Queries: 11 (0.0030s) ][ GZIP on ]