Boot problems with ram file system

Boot problems with ram file system

Post by Jana Volkme » Sat, 30 Oct 2004 20:51:25



Hello,

we have got an embedded platform which has a compact flash as hdc.
Currently we boot the system via lilo into ramdisk. This (loading the
compressed filesystem of 13mb into ram) lasts about 3 minutes. "Normal"
copying from mounted flash into rootfilsesystem after booting takes just
about 5 seconds. Can anyone to give me a hint, what could cause this long
loading time?

Second question: Would it be possible to get a better booting time by
uncompressing the file system, storing it on flash and just loading the
dynamical parts (f.e. /var) into ram? How would I have to modify my current
system consisting of  the mentioned compressed filesystem, kernel (vmlinuz)?
Actually I'm not very experienced in "playing" with my own OS.

Thank you for your help.

 
 
 

Boot problems with ram file system

Post by Damion de Sot » Tue, 02 Nov 2004 08:59:40



> we have got an embedded platform which has a compact flash as hdc.
> Currently we boot the system via lilo into ramdisk. This (loading the
> compressed filesystem of 13mb into ram) lasts about 3 minutes. "Normal"
> copying from mounted flash into rootfilsesystem after booting takes just
> about 5 seconds. Can anyone to give me a hint, what could cause this long
> loading time?

I would guess that lilo is accessing the CF card in a different IDE mode.
(or just copying the data in a really inefficient way).
You may be able to tweak lilo's settings to make it run faster, or perhaps
you'll need to switch to a different bootloader.

Quote:> Second question: Would it be possible to get a better booting time by
> uncompressing the file system, storing it on flash and just loading the
> dynamical parts (f.e. /var) into ram? How would I have to modify my current
> system consisting of  the mentioned compressed filesystem, kernel (vmlinuz)?

That would definately speed up booting.
you should be able to leave it as it is, lilo will load the kernel into memory
and then just load the root filesystem off the CF card.
Change /etc/fstab to make / mount as readonly,
and change /var to mount onto a ramdisk that you create in your startup scripts
somewhere.

regards,

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SnapGear - A *Guard Company ---    ph:         +61 7 3435 2809
  | Custom Embedded Solutions          fax:         +61 7 3891 3630
  | and Security Appliances            web: http://www.veryComputer.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ---  Free Embedded Linux Distro at   http://www.veryComputer.com/  ---

 
 
 

1. Booting with RAM root file systems

I am trying to build a boot image which contains itself the kernel and
the root file system. In a first approach i will use lilo as loader
cause i am using my latop as test-host. I am not planning to pass
any parametter to the kernel, the stuff will be deeply embbeded in the
future. So all the kernel-setup should be pre-made with rdev an so
on.

Which approaches could be taken?
Should i use the initrd stuff? Is it mandatory?

I am stepping through the Linux Bootdisk Howto but i still can not
find my attached compressed root file system image. i have printked in
the rd.c kernel module some key information and seems that the crfs
image adressing is wrong

This is the proccess that i have followed

- compressed-kernel-image

 996 bzImage-rt3.1
- i will left 50 free blocks so the file will have the crfs at the
block
1046
- to build the crfs i think that a raw 8Mbytes file is enough



And fill the file structure /sbin, /bin, ans so forth



- Kernel/Image configuration
The magic number for redev 17430 = 1046 + 2^14


- Join Kernel/customized crfs


bs=1k seek=1046

- So boot-rt3.1-nodisk.img have all the stuff
- The Lilo stuff /etc/lilo.conf

image=/boot/boot-rt3.1-nodisk.img
        label=linux-rt3.1-nodisk
        append=" devfs=mount"
        read-only



and all seems ok, lilo downloads the info to my master boot record
reboot and ..

Kernel Panic: VFS: Unable to mount root fs on 01:00

which corresponds with the /dev/ram0 device programmed previously with
rdev

Any Hints??

2. Q: Improving the Security of Your Site by Breaking Into It

3. Enhanced Filing system - file system like DEC Advanced File system for Linux

4. Out with aspppd, in with ppp.

5. qty free ram on rescue system for small ram i386?

6. Good or Bad experiences with 2.4?

7. Saving RAM on an all-RAM system by compressing executables?

8. DOSEMU compile

9. REQ: Help with accessing NTFS files system from RH 7.3 Win2K dual boot system

10. "Standard Journaled File System" vs "Large File Enabled Journaled File System"

11. RAM root file system

12. HELP: file system gone after adding RAM

13. how to load Linux file system into 16 Mb RAM Disk ?