Help - Zoeken - Gebruikers - Kalender
Volledige versie: Changing kernel on live system
MandrivaClub.NL > MCNLive > MCNLive: International
azenz
Is it possible to change the kernel on MCNLive (download a different one and compile it with make menuconfig etc.)? Would it first have to be installed to hdd and then remastered back to a live system?
HighKing
You have to make a remaster after installing the new kernel, and then another one if you wish te delete the old kernel:
http://www.mandrivaclub.nl/wiki/index.php/...ive_on_older_PC
azenz
I compiled the new kernel, put it in /union/lib/modules, and ran mklivecd --kernel 2.6.17.13. Then after remastering the iso on the usb drive the system boots as normal with the old kernel.

How can I remove the old kernel? When I type 'urpme kernel-2.6.17.8mdv-1-1mdv2007.0' I get this message:

removing package basesystem-2007.0-2mdv2007.0.i586 will break your system
Nothing to remove

How can I change the kernel without breaking my system and get the new kernel to be activated?

Another question: mklivecd complained during the iso creation stage that /boot/vmlinuz-2.6.17.13 (2.6.17.13 is the kernel I am installing) is missing. So I looked under /lib/modules/2.6.17.13/arch/i386/boot and found vlinux.bin and copied that to where mklivecd was looking for it (I renamed it to vmlinuz). Was that correct?
HighKing
I don't know why it didn't boot with the new kernel, are you sure you typed the name right?
Why did you compile it yourself btw? The 2.6.17.13mdv kernel is in updates, so you can just install it with urpmi.

You cannot remove the old kernel with urpme, because you didn't install the new one with urpmi, so urpmi doesn't know you have another kernel installed.
That said, you can't also remove a running kernel, so you'll have to get it running with the newer kernel, before you remove the old one.
azenz
It's an rsbac and pax patched kernel. I couldn't get rsbac to work with rsbac_on and the developer thinks the liveCD version might not have it.

When would I not have typed the name right - when I ran mklivecd? I am 100% sure I did. I am just not sure if the vmlinuz question hasn't something to do with it. I didn't know what to do and just copied the vmlinux.bin.
kris
Don't compile a kernel manually. Don't 'put' it in /union/<somewhere> ...

Just 'install' a new pre-compiled kernel using urpmi.
kris
(azenz @ Apr 6 2007, 12:11 PM) [snapback]82445[/snapback]

It's an rsbac and pax patched kernel. I couldn't get rsbac to work with rsbac_on and the developer thinks the liveCD version might not have it.

When would I not have typed the name right - when I ran mklivecd? I am 100% sure I did. I am just not sure if the vmlinuz question hasn't something to do with it. I didn't know what to do and just copied the vmlinux.bin.


rsbac is included in the main mandriva kernel.

Basically you don't know what you are doing. biggrin.gif

I don't know either.
azenz
QUOTE
Basically you don't know what you are doing. biggrin.gif


Exactly smile.gif!

So basically I can't really install a new kernel on the live system if it is self-compiled? Would it be possible from a prior hdd install?

Rsbac is included even on the live system? Then why can't it be activated (see my other post "passing kernel arguments at system boot")?
kris
(azenz @ Apr 6 2007, 01:02 PM) [snapback]82456[/snapback]

Exactly smile.gif!

So basically I can't really install a new kernel on the live system if it is self-compiled? Would it be possible from a prior hdd install?

Rsbac is included even on the live system? Then why can't it be activated (see my other post "passing kernel arguments at system boot")?


Only you know what you want to do with rsbac - whatever this is, I don't know anyone who uses rsbac.
You questions indicates that you don't know what rsbac is, how it works, how to make it work. And is it something you 'want' to use? On a live system? That is made for home desktops?
Why don't you tell us what you really want to achieve?

Reg. the kernel: you can do almost everything on a live system - if you know how. Recompiling and building manually a kernel and afterwards using it, is maybe not an easy task when you just started to use linux. And even experienced Linux user would not bother with recompiling. We are in the 21th century smile.gif

I would suggest that you take back a few steps, start with 'what do you want with this rsbac stuff', and keep things simple.
azenz
Hi Chris,

The point is that rsbac is (supposedly) already on there, so I would like to turn it on and try it out. I tend to be interested in security functionality (e.g. rsbac comes with pax, which prevents buffer overflow exploits - a nice feature), and I enjoy using a live system. Call it crazy, maybe I am a bit idiosynratic. I enjoy new challenges. I thought learning how to compile a kernel might be interesting and a useful skill, as I admire the Linux modularity. Where else can you do that, plug in a new kernel? Why not do something new or something that no one else has done before? Well, I did manage to actually compile a new kernel thanks to some good howto's, just plugging it into the live system hasn't worked. And that's why I asked if a hdd install is necessary.

So...my apologies for bothering you with this, my impression is that you guys enjoy trying out new things, and customise a system to whatever you want it to be. smile.gif Anyway, that's one of the reasons why I personally am going for Linux.
kris
(azenz @ Apr 7 2007, 12:17 PM) [snapback]82514[/snapback]

Hi Chris,

The point is that rsbac is (supposedly) already on there, so I would like to turn it on and try it out. I tend to be interested in security functionality (e.g. rsbac comes with pax, which prevents buffer overflow exploits - a nice feature), and I enjoy using a live system. Call it crazy, maybe I am a bit idiosynratic. I enjoy new challenges. I thought learning how to compile a kernel might be interesting and a useful skill, as I admire the Linux modularity. Where else can you do that, plug in a new kernel? Why not do something new or something that no one else has done before? Well, I did manage to actually compile a new kernel thanks to some good howto's, just plugging it into the live system hasn't worked. And that's why I asked if a hdd install is necessary.

So...my apologies for bothering you with this, my impression is that you guys enjoy trying out new things, and customise a system to whatever you want it to be. smile.gif Anyway, that's one of the reasons why I personally am going for Linux.



Ah ok. Using the live system as a learning experience and trying out things - is of course something else. And I would not call it crazy. biggrin.gif Just the opposite.

Your question: no, a hdd is not necessary to compile and install a second kernel.
But I have no clue what went wrong, and where do you copied what.
Tip: don't use /union/* directories.

Use the real dir's. Union is the overlay filesystem.
The kernel goes to /lib/modules... and to /boot And a mandriva system neeeds an initialramdisk = initrd.xxx.img (in /boot) You need to build it after you compiled a kernel.
azenz
QUOTE
Ah ok. Using the live system as a learning experience and trying out things - is of course something else. And I would not call it crazy. biggrin.gif Just the opposite.


Sounds like we're on the same page smile.gif.

I put the kernel in /union/boot because mklivecd was looking for it there and breaks off with an error message if it can't find a kernel there that has the same numeral ending (e.g. -2.16.17.13) as the kernel you specified. So if you put --kernel 2.16.17.13 then it looks for /union/boot/vmlinuz-2.16.17.13. In the unmodified MCNLive there is a vmlinuz-2.6.17-8mdv file in /union/boot.

So....what can we do? smile.gif
kris
(azenz @ Apr 7 2007, 02:07 PM) [snapback]82521[/snapback]

Sounds like we're on the same page smile.gif.

I put the kernel in /union/boot because mklivecd was looking for it there and breaks off with an error message if it can't find a kernel there that has the same numeral ending (e.g. -2.16.17.13) as the kernel you specified. So if you put --kernel 2.16.17.13 then it looks for /union/boot/vmlinuz-2.16.17.13. In the unmodified MCNLive there is a vmlinuz-2.6.17-8mdv file in /union/boot.

So....what can we do? smile.gif


The kernel you compile needs a custom name, (2.6.17-azenz or something like this) with the modules in a seperate dir: /lib/modules/2.6.17-azenz

You can't orverwrite the 'running' kernel, I guess.

You are installing a second kernel. + a second initrd
Then you would remaster it with a mklivecd switch:

mklivecd --kernel 2.6.17-azenz ...
azenz
Yes, that's what I did, and mklivecd runs for a good while and then stops with the error no vmlinuz-2.16.17.13 (or ...-azenz or whatever new kernel I specified under the --kernel option) found in directory /union/boot. A surprising error message to which I wasn't sure what to do, and so I renamed vmlinux.bin to vmlinuz-2.16.17.13 and copied it into that folder. If I do that then mklivecd runs all the way through. But it's probably not the right thing to do...
Dit is een "Print" versie van onze forums. Om de volledige versie met meer informatie, afbeeldingen en opmaakte bekijken, a.u.b. klik hier.