Hello,
If I understand your post, then you are missing a vital step. You need to
create an initrd file which contains, among other things, at least a
primordial /dev (containing, for example, the console device, as well as
whatever other devices you want). Make sure you include special device
initctl also. Its probably easiest to just put the complete /dev
there, instead of adding later in boot process. Using the initrd line for
(example) lilo, this file image is gunzipped and loaded in initial ramdisk.
 Once you are done with any scripting there, the kernel needs to enter the real root. 
Under the
2.2.x kernels (?maybe others??) that ramdisk is left mounted if /initrd
exists on "real" root. The other option is to use pivot_root and define a
desired mount point for the ramdisk. The (real root) /dev should be a
symlink to (for instance) /initrd/dev (if /initrd is the mount point for
the initial ramdisk). That gives you the read-write capability for /dev as
it is ram-disk-based.  As an FYI, make sure that you also sym-link things
like /etc/mtab and other files that may be written to, to appropriate
files in the ramdisk.
Reference on initrd: /usr/src/linux/Documentation/initrd.txt
Good luck.
George
 

On Thu, 26 Apr 2001, Dr Jaime V. Miro wrote:

> Date: Thu, 26 Apr 2001 13:26:22 +0100
> From: Dr Jaime V. Miro <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: read-only root partition help
> 
> Hi there,
> 
> I am trying to follow http://linux-embedded.com/faq.php3 
> (Section "Mounting root file system read-only") to create
> an embedded port of linux on a read-only partition, but I must be
> doing something wrong 'cause it hangs with the usual "can't find an 
> initial console" 
> 
> For this example everything is rw, as the first stage of testing.
> 
> I started of a small working (rw) linux systemm in a partition of the 
> HD. I then created a ramdisk which holds the file structure of /var, 
> which is then mounted on start up by /rc.init - this is the file 
> called upon start up by init, since inittab  has
> 
> si::sysinit:/rc.init
> 
> *** rc.init <snip>
> mount -n -o remount,rw /  ### as I said, everything rw for simplicity
> mount -o loop /var_ramfile /var
> ***
> 
> That's all ok, it boots and works. 
> Next state: include /dev. I created /var/dev in ramdisk, copied everything 
> from /dev into it, "cp -a /dev/* var_ramfile_mount_point/dev"
> and then "ln -s /dev /var/dev" as suggested in the faq - os should I say, 
> as I understood it. 'cause the problem is when / is mounted, /dev is linked
> to /var/dev, which has not been mounted yet, and I guess init needs /dev/console
> as the controlling terminal, and can't find it, rightly.
> 
> I believe this is the problem, but can't see the solution :-(
> 
> A helping hand would be most welcome. I'll be glas to supply +info on setup
> if needed. TIA
> 
> Jaime
> 
> 
> --
> To unsubscribe from this list, send a message to [EMAIL PROTECTED]
> with the command "unsubscribe linux-embedded" in the message body.
> For more information, see <http://waste.org/mail/linux-embedded>.
> 

-- 
George Fouse, President  <[EMAIL PROTECTED]>
Quantum Technology Associates
www.quantumtek.net

--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

Reply via email to