Create a ramfs File System

Source: Internet
Author: User

) Preparation
There must be a ready-to-use file system, assuming the directory is/rootfs
The Linux kernel needs to support ext2 file system and ramdisk support (the corresponding FS options should be checked)

2) create a ramdisk image on the PC
(1) dd If =/dev/Zero of = ramdisk. img bs = 1 k count = 4096.
The created image is 4 MB and can be modified as needed.
(2) mkfs. ext2-M0 ramdisk. img
Format ramdisk. IMG to ext2
(3) Mount-o loop ramdisk. img/mnt/ramdisk/
Mount ramdisk. IMG to the/mnt/ramdisk directory
(4) CP-A/rootfs/mnt/ramdisk
Copy all your file systems to the/mnt/ramdisk directory.
(5) umount/mnt/ramdisk
Detach a ramdisk
The available ramdisk. IMG image is generated.
(6) gzip-V9 ramdisk. img
Compressed image. I have never attached a compressed image. It should be okay.

3) modify the bootargs of the Development Board and add initrd = 0x336600,4096000
Here 0x3100000 is the address for loading the ramfs file system, and 4096000 is the size

Restart the Development Board and load the ramfs file system normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.