NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Creating a RAMDISK

From Texas Instruments Wiki
Jump to: navigation, search


Here is the procedure to create a RAMDISK. This is especially useful if you want to increase the size of an existing RAMDISK.

1. Create a file of zeroes for the size of the ramdisk you want. This example assumes a 32MB file system

[root@localhost jjd]# dd if=/dev/zero of=ramdisk bs=1M count=32
32+0 records in
32+0 records out
33554432 bytes (34 MB) copied, 0.243921 s, 138 MB/s

2. Format the file as a file system.

[root@localhost jjd]# mkfs ramdisk
mke2fs 1.40.8 (13-Mar-2008)
ramdisk is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
8192 inodes, 32768 blocks
1638 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=33554432
4 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks: 
	8193, 24577

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

3. Use the loop file system to mount it.

[root@localhost jjd]# mkdir mnt
[root@localhost jjd]# mount -o loop ramdisk mnt

4. Copy your root file system to mnt. Here you can copy a file system from an existing RAMDISK (see this link), and add other files as needed.

[root@localhost jjd]# cp -r <path/to/filesys>/* mnt

5. Unmount the image

[root@localhost user]# umount mnt

5. Zip it up!

[root@localhost user]# gzip ramdisk

7. You should end up with a compressed ramdisk.gz

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Creating a RAMDISK here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Creating a RAMDISK here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Creating a RAMDISK here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Creating a RAMDISK here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Creating a RAMDISK here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Creating a RAMDISK here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Creating a RAMDISK here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Creating a RAMDISK here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Creating a RAMDISK here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity