LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-29-2010, 11:34 AM   #1
Couling
Member
 
Registered: Oct 2007
Posts: 30

Rep: Reputation: 15
Can a kernel be tested without installing it.


Hi All

I realise this question is a little off the wall but I'm looking for a way to test a kernel without actually installing it.

The reason for this is that I want to make a modification to the existing kernal on my (debian) NAS. The bootloader and kernel are both stored in flash memory on the board but there is no way to write to this except through the opperating system itself (via SSH). The bootloader doesn't have hard disk support. So if I change the kernal and find that it no-longer boots then I'll have bricked my NAS.

I was hoping that there may be a way to get a linux install to act like an oversized bootloader and kick off a seperate kernal.

I realised this a rather odd requirement so any suggestions welcome.

Thanks
 
Old 07-29-2010, 11:41 AM   #2
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
This is what the "kexec()" syscall is for -- there's userland support for this called "kexec-tools". But I never tried it myself. Good luck
 
Old 07-29-2010, 11:43 AM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Exact same thing I was thinking, but I too have never even thought of using it, let alone tried it. Here's a good writeup on it:
http://www.ibm.com/developerworks/li...y/l-kexec.html
 
Old 07-29-2010, 11:49 AM   #4
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Oh wow. The kexec sounds really cool. I need to check this out and try it out. BUT.

Quote:
Kexec is currently available on the x86 32-bit platform only.




Im assuming it's only a short matter of time before x86_64 will be supported? :fingers crossed:
 
Old 07-29-2010, 11:53 AM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Quote:
Im assuming it's only a short matter of time before x86_64 will be supported? :fingers crossed:
Good question indeed.. I didn't note how old was the article I linked above, but doing a google for "64 bit kexec" turns up a LOT of hits, particularly for "64bit kexec-tools package".
 
Old 07-29-2010, 11:54 AM   #6
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Quote:
Date: 04 May 2004

LOL... I'd say maybe a 64bit version it out by now. I haven't searched nor did I pay attention to the date.
 
Old 07-29-2010, 11:58 AM   #7
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Hmm, if it isn't supported right now, it could be due to hardware limitations. The following are just assumptions (didn't check that):
- Maybe kexec() on x86 switches the processor back to real mode before exec()ing the bootup code of the kernel
- Maybe there's no (easy) way to get back to real (or even protected) mode from long mode in x86_64 ...
edit: But it looks like this isn't really necessary (OR solved) by now

Last edited by zirias; 07-29-2010 at 11:59 AM.
 
Old 07-29-2010, 11:59 AM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Here's a question that may be relevant, but I don't know the answer to: What architecture is the NAS?

I did notice kexec search results that referred to MIPS architecture.. So, what's the NAS running on?
 
Old 07-29-2010, 03:34 PM   #9
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-Kernel and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 07-29-2010, 06:38 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
You have to build the kexec support into the base (running) kernel - check our config. You may be up for more than one build ....
 
Old 07-30-2010, 09:21 AM   #11
Couling
Member
 
Registered: Oct 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Sadly there are two problems with kexec in my case.
1: It's an ARM chip (Marvell Orion)
2: I dont *think* (havn't checked) that this support is in my current kernel. This creates a sort of catch 22.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How thoroughly is slackware stable tested? drokmed Slackware 28 01-22-2009 10:48 PM
Workable linux I tested jody001 General 24 05-08-2005 09:43 AM
the new ati drivers anybody tested ? deepdark SUSE / openSUSE 17 01-26-2005 05:44 PM
Has anyone tested Exeem ??? UsualTuxpect Linux - Software 3 01-22-2005 02:16 AM
Sound plays when tested but not for cdroms tabnaka Linux - Newbie 2 02-10-2004 10:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration