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 Wed 10 Feb 2016, 18:28
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 [3 Posts]  
Author Message
jlst

Joined: 23 Nov 2012
Posts: 144

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: 3239
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: 5960
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 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 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.0420s ][ Queries: 11 (0.0048s) ][ GZIP on ]