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 Sat 23 Sep 2017, 03:52
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Need a quick 'refresher' course on swapping kernels...
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Author Message
Mike Walsh


Joined: 28 Jun 2014
Posts: 2928
Location: King's Lynn, UK.

PostPosted: Mon 31 Jul 2017, 21:47    Post subject:  Need a quick 'refresher' course on swapping kernels...
Subject description: Specifically, Xenialpup's k4.9.13.....which has finally detected my webcam!
 

Morning, kiddiwinks.

Here's a quick one for our 'experts' before I turn in for the night.

I've been using an HP2300 HD webcam for quite a while now. It's UVC compliant, which means it's supported OOTB by Linux.

I bought a rather smart webcam by Trust, B.V, around a year ago. In all my Pups, it's never even been recognised.....and

Code:
lsusb


...has never returned anything for it. Until tonight..! It shows up as

Code:
Bus 001 Device 005: ID 0c45:6340 Microdia Camera


Obviously using a generic chip-set from somewhere in the Far East, and showing simply as a USB 2.0 camera. However.....

I installed Xenialpup 7081 recently. This Trust webcam has been gathering dust in a cupboard for months; this evening, I suddenly remembered it. Thought just for the hell of it, I'd see what Xenialpup's 4.9.13 kernel made of it. So I plugged it in, and fired up guvcview.....and damned if it wasn't there in the drop-down, and working!

-----------------------------------------------------------------------

Which leads rather neatly on to my question. I know a lot of our newbies post queries about updating the kernel, and, by and large, our stock answer is that if stuff works, then you don't need to, yes?

On this occasion, there's actually now a solid reason for upgrading my kernels; to enable support for something I've been trying to get working for ages. And k4.9.13 appears to do just that. (*Hurray!!*)

So, what I would like to know is this; can any of you good folks refresh my memory as to how we 'swap' kernels in Puppy? I know I've done it in a couple of Pups; Tahrpup being one of them, but for that one I followed instructions in the wizard Phil had built-in for that purpose. And Tahr64 was the other; again, I used the wizard.

I need to refresh my memory on the 'manual' method for doing this, please. I seem to vaguely recall (from the murky depths of the pint of grey sludge that laughingly passes for my brain..!! Rolling Eyes ), that it's something to do with replacing & renaming vmlinuz and the z_drv... Is that correct? Because I'd like to replace as many of my Pup's kernels as I can with k4.9.13.....since it appears to work flawlessly with every piece of hardware I've got. Everything's supported, seemingly.

As always, any and all advice will be very much appreciated. TIA, folks.


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Marv


Joined: 04 May 2005
Posts: 864
Location: SW Wisconsin

PostPosted: Mon 31 Jul 2017, 22:51    Post subject:  

Hi Mike,

Expert no, inveterate swapper and 4.9.13 believer yes.

When I do it manually I do the following (assuming frugal install?).
Make a couple of dirs in that pup folder, one named stock and one 4913 for example. I do that to make it superfast to switch back & forth and just keep track of where I am. Move the existing vmlinux and zdrv (zdrv_LxPupSc_17.07.25.sfs for example) to the stock directory. Put the vmlinux and the kernel-modules.sfs for, say, 4.9.13 in its directory and rename the kernel-modules.sfs to zdrv_xxx_xxx.sfs to match the pup you are doing. Copy that vmlinux and zdrv to the pup folder. reboot.

When I do this I also usually copy/paste to make a new savefile with a kernel id added to the name and delete the following files/folders from it before booting to it to force a clean boot:
/etc/modules
/lib/modules
/etc/X11/xorg.conf
/root/.etc/udev/rules.d/70-persistent-net.rules
/etc/asound.state
/var/local/xorg_udev

Seems like a lot but it's far quicker in the doing than the telling and I have a script to do the cleaning. Really everything but the substituted vmlinux and zdrv is optional but I like a clean savefile and hate having ports renamed on me. Matters more when moving an install between differing hardware.

_________________
Pups currently in kennel Very Happy X-slacko 4.3 and X-tahr 2.0 for my users; LxPupSc and LxPupXenial for me. All good pups indeed, and all running browsers, office etc. solely from SFS.
Back to top
View user's profile Send private message 
Limbomusic


Joined: 15 Apr 2016
Posts: 172
Location: Norway

PostPosted: Tue 01 Aug 2017, 02:01    Post subject: marv
Subject description: is spot on
 

Hey Mike
Marv is spot on. I'm just adding another way of explaining it:

Find a kernel, f example
http://distro.ibiblio.org/puppylinux/huge_kernels/huge-4.9.30-s64-700.tar.bz2

Download and extract it - You will find 2 files in the extracted folder.
Now - on your usb-drive - OR frugal install folder - find the files: vmlinuz and zdrv_slacko/tahr--something. The 2 new files need to be named the same as the originals.
OK - from the extracted folder - the vmlinuz-something - rename that to just vmlinuz. And then the other one - to the same name as the original (zdrv_whatever.sfs) - then after renaming the 2 files - copy and replace the original ones - to the usb/or frugal install folder and reboot.
Back to top
View user's profile Send private message Visit poster's website 
nic007


Joined: 13 Nov 2011
Posts: 2176
Location: Cradle of Humankind

PostPosted: Tue 01 Aug 2017, 03:52    Post subject:  

It's heartbreaking to see how our cute little puppys of old are growing into huge data devouring dogs as time goes on. From chihuahuas to great danes. Crying or Very sad
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 2928
Location: King's Lynn, UK.

PostPosted: Tue 01 Aug 2017, 05:52    Post subject:  

Morning, morning, one & all.

@Nic:- Yeah, tell me about it. I know just what you mean, mate. And it's one of the reasons I came to Pup in the first place; everything else was just getting too 'heavy'...

---------------------------------------------------------------------

@Marv, Limbomusic:-

Well, thanks for the 'refresher course', guys! That is more or less what I thought.

One question, if I may? I understand how you can do this when you're 'upgrading' another Pup that already has a z_drv; it's simply a case of a straight swap & rename. BUT: how would you do this with a Pup that never had a z_drv to start with? Specifically, Micko's 'classic' 570.

I want to get this thing running in all three Pups on ye old Dell lappie. I'm currently (and I don't see this changing in the forseeable future; when I find Pups that just 'work' with given hardware, i stick with 'em) running Slacko 570, Xenialpup 7081, and rg66's X-Slacko 232. (Yeah, I know it's an early version.....but for my use case, it just works; brilliantly.)

Now; Xenial and X-Slacko both have an existing z_drv, so, it should be straight-forward. My query here is really to do with 570. How could I do this? If I created the (hopefully, correctly-named!) z_drv for 570, would the upgraded vmlinuz 'pick it up'?

I'm open to enlightenment here, boys & girls.. Laughing

This here's the beastie in question:-

http://www.trust.com/en/product/18679-trino-hd-video-webcam

Has kind of a high-end Logitech 'look' to it, don'tcha think?


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Marv


Joined: 04 May 2005
Posts: 864
Location: SW Wisconsin

PostPosted: Tue 01 Aug 2017, 09:06    Post subject:  

I have done swaps into non-zdrive pups but I always have unsquashed the main puppy sfs and copied in the relevant files from the new kernel zdrive, overwriting the old. Never tried just tossing the zdrive at it but IIRC -someone correct me if I am wrong- the zdrive priority is below the main pup SFS so that wouldn't work. It wasn't a high priority pup for me and I just decided it was more work than it was worth.
_________________
Pups currently in kennel Very Happy X-slacko 4.3 and X-tahr 2.0 for my users; LxPupSc and LxPupXenial for me. All good pups indeed, and all running browsers, office etc. solely from SFS.
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 1905
Location: 500 seconds from Sol

PostPosted: Tue 01 Aug 2017, 11:36    Post subject:  

Hi nic007,

In nature pups start out small, and cute, and blind and helpless and mamma keeps them in whatever happens to serve as the domesticated equivalent of a wolf's den. But they grow up and have to live in a big scary world.

Compared with what it was a couple years ago, the internet today is a big scary world. But so are the dog houses (hard-drives, USB-sticks) our Puppies call home much bigger than they were. The opposite of living in a big scary world is retirement, which for a non-sentient being such as an operating system equates to death.

Some of us have become emotionally attached to an operating system which has served us well and remains capable of performing many taaks. Slacko 5.7 is such a system. So we look for ways to extend its life.The trick is to figure out how without turning it into another mastiff. Security updates and web-browsers with builtin glibs necessary to meet current web-site demands result in a Puppy still smaller and sleeker than the Puppies currently being born. But what if you could also give it a heart transplant?

I also was wondering about that. (Maybe it's a Mike thing. Laughing). Yesterday, after updating the kernels in XenialPup64 and Tahrpup64, I took a look at Slacko 5.7 and realized it didn't use a zdrv. I might have decided updating its kernel was a dead-end if Mike Walsh hadn't identified the same issue and asked. Although my mind is visually oriented so my solutions tend toward 'move this from here to there' Marv's solution did appear to involve more work than I'd care to undertake. But my curiosity having been again aroused, I figured a couple minutes googling might supply another method. Perhaps it did.

Scottman suggested one back in 2011. http://www.murga-linux.com/puppy/viewtopic.php?p=530362#530362. Woofy. [But see Edit below] I haven't tried it. But i thought I'd bring it to Mike Walsh's attention so that he could do the hard work and tell us how he made out. Laughing

Question: At http://distro.ibiblio.org/puppylinux/huge_kernels/ I only see a 4.9 32-bit kernel for Xenialpup. Is it serviceable for Slacko 5.7? What alternatives? and from where?

mikesLr

Edit: Just thought to examine the Woofy thread, which revealed the problem peebee ran into with Slacko 5.6, http://murga-linux.com/puppy/viewtopic.php?p=729751#729751 and his solution reported in this follow-up post: Edit-Initrdgz-1.4.pet. So, woofy won't be a panacea. Still, the woofy + Edit-initrdgz may be easier than remastering by hand.
Back to top
View user's profile Send private message 
Marv


Joined: 04 May 2005
Posts: 864
Location: SW Wisconsin

PostPosted: Tue 01 Aug 2017, 12:34    Post subject:  

@all,
Does the slacko in question support a ydrive? My guess is the ydrive support in init postdates it but if perchance it doesn't just renaming the zdrv to ydrv would give it priority over the main SFS and probably work. Another WAG..
cheers,

_________________
Pups currently in kennel Very Happy X-slacko 4.3 and X-tahr 2.0 for my users; LxPupSc and LxPupXenial for me. All good pups indeed, and all running browsers, office etc. solely from SFS.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 2928
Location: King's Lynn, UK.

PostPosted: Tue 01 Aug 2017, 12:43    Post subject:  

You're losing me, Marv! I've just about got my head around the z_drv concept.....but you start on about a-drv's and y_drv's, I'm stumbling about in the fog, mate.

How would you find out which of these 'drv's' Slacko 570 supports.....and more to the point, what's the difference between the various types? How do they fit into the whole thing?


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
mikeslr


Joined: 16 Jun 2008
Posts: 1905
Location: 500 seconds from Sol

PostPosted: Tue 01 Aug 2017, 18:01    Post subject:  

Hi Mike,

I think Marv's mention of adrv may lead us into an unnecessary by-way. No offense, Marv. You, yourself, had reservations. And we're just "brain-storming", so any idea at this point may prove fruitful.

What it made me do is recall that adrv was one of the innovations jemimah introduced which ultimately induced the Devs to create more modular Puppies. I think the ability to make use of an adrv has to be built into initrd. So, unless Slacko 5.7's initrd already has it, editing its initrd to include it would entail an unnecessary complication. Slacko 5.7 can already make use of a zdrv.

At any rate, the above jogged my memory about "How to switch kernels between Puppy versions" a thread which jrb started before modularization took root. http://www.murga-linux.com/puppy/viewtopic.php?p=453164#453164.

After only scanning the above -- a detailed read being necessary before proceeding-- and recalling that the problem with woofy was that it didn't automatically generate a functional initrd, here's what I think may be possible, [But remember, I too am only 'brainstrorming']:

The objective is to use the new kernel and the new zdrv but Slacko 5.7's applications. So,

1. Use Woofy to create a new puppy_slacko_xxx.sfs and an zdrv_slacko_xxx.sfs.
2. Discard the zdrv_Slacko_xxx.sff and the initrd, indeed, everything except puppy_slacko_xxx.sfs.
3. Use Slacko 6.x, discard its puppy_slacko_xxx.sfs, substituting the puppy_slacko_xxx.sfs from Step 2, but renamed as the puppy_slacko_xxx.sfs being discarded.
4. The resulting slacko will be a 'franken-slacko' with the new Slacko's capabilities but the old Slacko's applications.
5. Figure out what I said in the cited post about such frankenstein pointing to the wrong repos and its work-around. Somewhere around here or later: http://www.murga-linux.com/puppy/viewtopic.php?p=852129#852129. Right now the wife is calling me to dinner and my ability to visualize how the above looks when finished is foggy.

mikesLr
Back to top
View user's profile Send private message 
Marv


Joined: 04 May 2005
Posts: 864
Location: SW Wisconsin

PostPosted: Tue 01 Aug 2017, 19:13    Post subject:  

Mike Walsh wrote:
You're losing me, Marv! I've just about got my head around the z_drv concept.....but you start on about a-drv's and y_drv's, I'm stumbling about in the fog, mate.

How would you find out which of these 'drv's' Slacko 570 supports.....and more to the point, what's the difference between the various types? How do they fit into the whole thing?


Mike. Wink
I'll try and find and download that slacko and have a look. The support is in the init script which is in initrd.gz. Drives: The key difference in the drives is where they are loaded into the layered file-system stack that is puppy. In the beginning everything resided in one file, the main puppy sfs. Then to make maintenance simpler, kernel related stuff and firmware for wireless and ethernet cards was put into a separate zdrive. Some pups break it down a bit further and put the firmware in a separate fdrive. The adrive first appeared in Saluki and is used to hold programs such as browsers, word processing, etc. The adrv prefix tells it to load automatically on boot, unlike other program SFS that have to be loaded with the SFS-Load-on-the-fly program initially. None of these drives as I recall will replace what is in the main pup, only add to it. The ydrive is a relatively recent addition which will sit on top of and thus replace everything else. Peebee uses it occasionally in the LxPup series as it is a quick way to try out fixes. Hence if the kernel related material were in it I believe it would replace that in the main pup sfs in the final file-system. It IS wooly and this is certainly a way over-generalized top of the head explanation. The amazing thing is how well it works.

@mikeslr, Tis the ydrv I was pondering and indeed it may be a red herring.

Edit: I found and downloaded a copy of slacko 5.7 and looked at the init script inside initrd.gz. It DOES seem to support the ydrv. Assuming there aren't any bugs there, just renaming the zdrv_xxx to ydrv_xxx should give it preference over the kernel stuff in the main puppy sfs. Removed another of my WAGs.

Trying it now. Neither zdrv or ydrv used at first blush. Figuring..

_________________
Pups currently in kennel Very Happy X-slacko 4.3 and X-tahr 2.0 for my users; LxPupSc and LxPupXenial for me. All good pups indeed, and all running browsers, office etc. solely from SFS.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 2928
Location: King's Lynn, UK.

PostPosted: Tue 01 Aug 2017, 20:19    Post subject:  

Hi, Marv.

Mm. Okay. I extracted initrd.gz, then extracted the initrd itself. I see there's a directory for 'pup_a', one for 'pup_y', and a third one for 'pup_z'. I'm a bit fuzzy on all this, since we're getting into new territory here for me.....but do I take it (since this is the initrd....the 'initial ramdisk'?) that these are available mount points for an a_drv, a y_drv & a z_drv?

Question; what gives a 'y_drv' priority over everything else.....including the 'a' and 'z' drives?

One further point, BTW. There's two versions of this out there (I'm not talking about PAE/noPAE). There's Micko's 5.7.0, the original. There's also a 'Slacko 5.7' floating around out there. I've got this one, too, but I don't know where the hell I got it from now. This uses a much later kernel than 570's 3.10.32, plus a lot of what appears to be Tahrpup-related stuff; it's a bit of a hybrid, from appearances.

Which one did you look at? Because I am talking about Micko's original version, here.....though it still appears to have mount points for 'a', 'y' and 'z'drives.....

And, er; I thought 'kernel-related' stuff was all in the 'vmlinuz'?


A somewhat confused Mike. Confused

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Marv


Joined: 04 May 2005
Posts: 864
Location: SW Wisconsin

PostPosted: Tue 01 Aug 2017, 21:21    Post subject:  

Ya, I downloaded the slacko 5.7.0 with that 3.10.32 kernel to work on.

The drive prorities are determined by the load order in the init script in the initrd.gz. The names the system uses for the drives ie. zdrv_slacko_5.7.0 also have to be in the DISTRO_SPECS in both the main pup in /etc and in initrd.gz.
They aren't in 5.7.0.

zdrv's (or main pup sfs in 5.7.0) do have some module configuration and associated libraries and drivers for the kernel. See /etc/modules and /lib/modules.

All in all it's far more work than I'd do. The simple zdrv/ydrv substitutions fail to boot, even adding in the appropriate names in both distro specs and removing the 3.10.32 related info in the main SFS. Surprising to me, even unsquashing the main SFS, substituting the appropriate info from the 4.9.13 zdrv and resquashing it fails to boot. Could chase it but seems to me at this point that it would always be a frankenpup. Sorry.

_________________
Pups currently in kennel Very Happy X-slacko 4.3 and X-tahr 2.0 for my users; LxPupSc and LxPupXenial for me. All good pups indeed, and all running browsers, office etc. solely from SFS.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2176
Location: Cradle of Humankind

PostPosted: Tue 01 Aug 2017, 23:11    Post subject:  

Marv wrote:
Mike Walsh wrote:
You're losing me, Marv! I've just about got my head around the z_drv concept.....but you start on about a-drv's and y_drv's, I'm stumbling about in the fog, mate.

How would you find out which of these 'drv's' Slacko 570 supports.....and more to the point, what's the difference between the various types? How do they fit into the whole thing?


Mike. Wink
I'll try and find and download that slacko and have a look. The support is in the init script which is in initrd.gz. Drives: The key difference in the drives is where they are loaded into the layered file-system stack that is puppy. In the beginning everything resided in one file, the main puppy sfs. Then to make maintenance simpler, kernel related stuff and firmware for wireless and ethernet cards was put into a separate zdrive. Some pups break it down a bit further and put the firmware in a separate fdrive. The adrive first appeared in Saluki and is used to hold programs such as browsers, word processing, etc. The adrv prefix tells it to load automatically on boot, unlike other program SFS that have to be loaded with the SFS-Load-on-the-fly program initially. None of these drives as I recall will replace what is in the main pup, only add to it. The ydrive is a relatively recent addition which will sit on top of and thus replace everything else. Peebee uses it occasionally in the LxPup series as it is a quick way to try out fixes. Hence if the kernel related material were in it I believe it would replace that in the main pup sfs in the final file-system. It IS wooly and this is certainly a way over-generalized top of the head explanation. The amazing thing is how well it works.

@mikeslr, Tis the ydrv I was pondering and indeed it may be a red herring.

Edit: I found and downloaded a copy of slacko 5.7 and looked at the init script inside initrd.gz. It DOES seem to support the ydrv. Assuming there aren't any bugs there, just renaming the zdrv_xxx to ydrv_xxx should give it preference over the kernel stuff in the main puppy sfs. Removed another of my WAGs.

Trying it now. Neither zdrv or ydrv used at first blush. Figuring..


A small correction. The adrv (if you have one) has preference to the ydrv. The older puppys support neither the adrv nor the ydrv but I reckon almost all should support the zdrv. In the latter case, you can rename the base sfs as the zdrv and rename the zdrv to that of the base sfs in order to create a reverse order of preference. Just as a matter of interest....

Last edited by nic007 on Tue 01 Aug 2017, 23:24; edited 1 time in total
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 1905
Location: 500 seconds from Sol

PostPosted: Tue 01 Aug 2017, 23:20    Post subject: Hold up a while  

Hi guys,

Much of the work may already have been done by rg66. The post I cited about Woofy indicated it was used by peebee to create LxPup, I wondered if rg66 may have done something similar to create x-slacko. I don't know if he did, but a post (don't have the site just now) indicated (IIRC) that x-slacko was based on Slacko 5.7. Am downloading it now from ally's site which indicates it was based on 5.6. At any rate, Ally's site also indicated that it already comes with a zdrv and from somewhere I noted it has adrv capabilities.

At any rate, my mind is already shutting down for the day. So I'll play with them tomorrow.

mikesLr
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0923s ][ Queries: 13 (0.0107s) ][ GZIP on ]