Mount /etc on ramdisk (booting from HD)

Mount /etc on ramdisk (booting from HD)

Post by Marco Zennar » Sun, 27 Oct 2002 03:54:04



Good morning,
            I read in an old comp.os.linux.development.system article:

Quote:> Right at the start of rc.sysinit ( for SYSV style ),
>I remount /etc and /var as ramdisks.

There was no details or explanation.

I am really interested about mounting the /etc and other system directories
in the RAM.
Actually I would like to mount everything in the RAM.
I just want to boot from HD and then run everything from RAM. My system has
to work
with NO floppy, NO cd-roms and it can access the HD only at boot time (it is
a embedded computer).

I tried to remount /etc on the ramdisk but I got a kernel panic error.

Can you tell me how to mount the /etc on ramdisk? I am NOT an expert, and I
am turning crazy.

Thanks,
            Marco

 
 
 

1. lilo config for dual hd-boot hd->ramdisk-boot?

Hi, I've got a 128 Mb flashdisk with hda1 partition of size 48Mb
(actually 50192Kb), of which 41Mb is used. I can directly boot this
partition with a standard lilo configuration. Oh, I have 64Mb of RAM,
but the OS, my small program, and no other servers require only 6Mb of
this.

Since it is a flashdisk, with limited rewrite capabilities, I would like
to load the whole of this hda1 partition into a ramdisk and use the
ramdisk as the root fs, that way I only ever read from the flashdisk.

I don't think I need to use initrd (since my kernel *already* has
everything it will need, I do not need to do a two-stage boot),  and I
don't think I need a compressed image of the root filesystem (since the
first partition, which, as explained above, I can also use directly as
the root filesystem, contains exactly what I want to load into RAM).

Ok, so my 2.2.19 kernel has ramdisk support compiled in - i.e. not just
as a module, and also loopback device and initrd, though I don't think I
need the last two of these.

My lilo.config has:

        boot=/dev/hda
        prompt
        timeout=30

        #  To use hda1 as root
        image=/path/to/the/kernel
                label=flash
                root=/dev/hda1

        #  To load hda1 into ram0 and use *that* as root fs
        image=/path/to/the/kernel
                label=ram
                append="root=/dev/ram0 start_ramdisk=0 ramdisk_size=50192 load_ramdisk=1"

Booting the 'flash' works fine, but booting 'ram' doesn't; the kernel
gets loaded correctly, but then it says "can't mount root filesystem on
01:00". I presume '01:00' means major 1 minor 0, which *is* ram0, so it
seems that the kernel knows what I want to be the root filesystem, it's
only that it failed to load the partition into memory before trying to
mount it.

I also tried adding 'prompt_ramdisk=1' just to see if it was even seeing
any of the ramdisk-related kernel parameters, and it did not prompt me
after loading the kernel, before attempting to load/mount the root
filesystem.

Can anybody offer any advice? Many thanks!

Alexis

2. ISP PPP woes

3. Boot broken, no ramdisk or hd w/PCI video

4. Help..XF86_Mach64 server

5. booting bsd using ramdisk and no HD

6. Kernel panic with Red Hat 2-4-18 kernel

7. How to mount /etc on ramdisk

8. xpert@play98 setup question

9. mount errors when booting from HD, ok booting from diskette

10. problem with creating ramdisk: kernel loads, but hangs when it tries to mount ramdisk

11. ramdisk for linux: mount /ramdisk

12. How do you mount the hd after booting from the boot/root diskettes

13. Problems mounting harddrive partitions after booting RAMDISK.