[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] Embedding real time linux





On Mon, 4 May 1998, Joshua Lamorie wrote:

> On Mon, 4 May 1998, Ken Teh wrote:
> > before compressing it onto the medium.  Btw, 29072 is 0x7190.  The '7'
> > indicates a ramdisk, while '190' indicates an offset of 400kB.
> 
> The Bootdisk HOWTO is invaluable for telling you how to do this.  I
> succesfully made a boot/root combination on one disk, however I was never
> able to get it to boot without wanting to fsck something.
> 
> Has anyone had experience with this? Is there something that I have to
> change in the /etc/fstab?  The example in the HOWTO didn't work (he says
> after proclaiming its virtues ;-> )
> 
> Joshua
> 
> ---------------------------------------------------------------------------
> Joshua Lamorie		   | Aerospace Engineering, Carleton University
> jlamorie@engsoc.carleton.ca| "TANSTAAFL - There ain't no such thing as
> 				a free lunch" - Robert Heinlein
> 				[from 'The Moon is a Harsh Mistress'] 
>   		
> 


You are confusing booting with init'ing.  fsck is run by init.  Actually,
init runs rc.S (at least on my Slackware system) which calls fsck.  If you
take out fsck from rc.S, then fsck won't run.  Obviously, if your
filesystem is corrupted, then you're dead.  The trick is to have a root
filesystem that is transient such as one that is constructed in ramdisk. 
This way your running root filesystem may get corrupted, but the image
that is loaded stays clean and you can always boot (or rather init). 

'init' is actually started by the kernel.  When init runs, it consults
/etc/inittab to decide how to proceed.  A standard Linux system usually
has a complex inittab, but there is nothing to stop you from simplifying
your inittab and reducing all your rc files down to one shell script.
Indeed, if you plan to run an embedded application, then you could in
principle launch your application from your inittab.

If memory serves me right, in earlier versions of Linux, the kernel fell
back to /bin/sh if there was no init. 

You should study the inittab and the rc files closely and you will find it
is quite straightforward.

Good luck!!!  Ken


--- [rtl] ---
For more information on Real-Time Linux see:
http://rtlinux.cs.nmt.edu/