Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ramdisk]

The tag has no usage guidance.

70
votes
7answers
84k views

Creating a ram disk on Linux

I have a machine with 62GB of RAM, and a trunk that's only 7GB, so I thought I would create a RAM disk and compile there. I am not a Linux expert. I found instructions on the internet to create the ...
11
votes
2answers
3k views

Reserve fixed RAM memory region as a block device ( with a given start physical address)

There have been a lot of questions about RAM Disks and I am aware of ramfs and tmpfs which allow the use of ram as a block device. However my interest is in using a fixed memory address range as a ...
9
votes
3answers
8k views

Debian 8 KVM Guest - Loading initial ramdisk

I have updated my KVM management script for Ubuntu 14.04 KVM hosts to support debian 8 guests. After a manual installation (preseed script does not work yet), I am stuck with the the following message ...
8
votes
7answers
31k views

Is there a linux OS that can be loaded entirely into RAM?

I have 32 GB of memory in my PC. This is more than enough for a linux OS. Is there an easy to use version of Linux (Ubuntu preferably) that can be booted via optical or USB disk and be run completely ...
8
votes
1answer
806 views

Can you throttle the bandwidth to a tmpfs based ramdisk?

I created a ramdisk using tmpfs as follows: sudo mount -t tmpfs -o size=1024m tmpfs /myramdisk I was looking into cgroup blkio subsystem bandwidth limits "read_bps_device" and "write_bps_device" but ...
6
votes
2answers
2k views

how to deallocate /dev/ram0

I have allocated /dev/ram0: dd if=/dev/zero of=/dev/ram0 bs=1M count=1024 Now I have 1Gb sitting in memory. How do I free up the allocated space ?
6
votes
1answer
668 views

How to specify memory region for ramdrive

We are setting up a Linux based benchmarking cluster. Each node is going to be a headless, diskless machine, booted via tftp, the OS copied to a local ramdrive, and the same ramdrive is used as local ...
6
votes
3answers
3k views

RAM alternative to swap partion or swap file on an SSD

My Debian stretch system has a lot of RAM. Currently, it uses an encrypted swap partition on the SSD, but under normal conditions I don't ever expect lack of memory to cause it to be used. But ...
5
votes
1answer
8k views

How Linux kernel 3.x manage ramdisk as block device?

I need a block device in RAM. I built a 3.x kernel and added the RAM block device driver. The number of RAM block device drive is 16 (by default) but when the kernel boots there is no ramx in /sys/...
5
votes
1answer
487 views

Regarding the creation and destruction of sensitive data on linux/unix systems

In modern file systems (and on modern SSDs) there is no guarantee that if you write over a file using a traditional utility (such as dd) that the data will be overwritten in-place and journaled ...
4
votes
1answer
2k views

Measurement of free ram through /proc/meminfo with ramdisk (initrd)

I am booting a disk image via PXE, it is a full system on an initrd ramdisk. I would like to measure the actual free memory of the system (not including buffers and file system caching). I was told ...
3
votes
3answers
597 views

Why are there internet utilities in my initial ramdisk?

I have a fairly standard initial ramdisk created using mkinitcpio. I'm on Arch GNU/Linux. A while ago I got dropped to a rescue shell and poked around in the /bin of the ramdisk to see what was ...
3
votes
2answers
2k views

why is filesystem intensive script not faster on ram disk

I have a script which creates a lot of files and directories. The script does black box tests for a program which works with a lot of files and directories. The test count grew and the tests were ...
3
votes
1answer
389 views

Cannot create NFS on a tmpfs drive

OS: SLES 12.3 Running these commands: mkdir /foo/ramdisk mount -t tmpfs -o size=100m tmpfs /foo/ramdisk Creating a NFS on /foo/ramdisk produces this result when I run showmount -e <IP>: ...
3
votes
3answers
1k views

Linux speed up by moving files to ramdisk at start

I have more than enough ram in my computer (8GB), which hardly gets used. In the most cases my desktop and apps use up in 2-3GBs out of it, on the other hand I do not have an SSD. My system is 64bit ...
3
votes
2answers
922 views

du on ramdisk displays 3GB less than df

I understand there's often a some discrepancy between du and df but when I du my ramdisk it occupies 13G, whereas df shows it's using 16GB. This seems quite a big difference. Is this normal? [root@...
3
votes
1answer
681 views

How to create a RAM disk from the Kickstart environment?

I'm installing a CentOS 7 VM, and I would like to create a RAM disk inside the %pre section of a Kickstart file. However, doing so via mkfs -q /dev/ram1 8192 is not possible as the mkfs binary is ...
2
votes
1answer
504 views

How to keep the file in RAM

I have a laptop with Linux Slackware. When it's working on battery saving a file to hard drive takes around a second. When I'm writing code I waste a lot of time saving the files. I have about 2 GB ...
2
votes
1answer
18 views

Find size of shared memory tmpfs

When mounting a tmpfs we can pass as an option its (maximum) size and prevent the relevant fs from growing indefinitely and thus consuming all of our RAM, e.g. $ mkdir -p /tmp/shmemory $ sudo mount -...
2
votes
2answers
3k views

How to create a real RAM disk that reserves memory?

I've been shortly using the following on Linux Debian Jessie to create a "RAM disk": mount -o size=1G -t tmpfs none /mnt/tmpfs But I was told it doesn't reserve memory, which I didn't know. I would ...
2
votes
1answer
906 views

Missing /dev/ram0 /dev/ram1 and /proc/kcore

I have been experimenting with etckeeper to store different snapshots of /etc in a git repo. I have cloned a working /etc in /etc-1 of a clean VPS and I have restored metadata with etckeeper, the I ...
2
votes
1answer
321 views

can a full ram-disk cause swapping?

I have a application that is using /opt/otrs/var/tmp for caching a lot of temporary data. The vendor suggest that one option could be also to put this directory on a ramdisk (If you have enough RAM). ...
2
votes
1answer
387 views

Generate bootable ELF from bootloader, kernel, device tree, ramdisk

I'm new to Linux Kernel programming, and am pretty stuck with (what I think is) the last step in building my bootable image. For some background, we are trying to upload a complete OS image onto the ...
2
votes
1answer
404 views

Tmpfs with overflow on disk?

I'm looking for a way to have a tmpfs-like file system that can be unlimited in size, but will use a specified amount of RAM after which the "oversize" data will be stored on another disk-backed ...
2
votes
0answers
475 views

htop showing less memory usage

I'm currently trying to benchmark performance improvements when using a RAM disk. So I've been giving my VM 24 of the total 32 GB RAM, and created a 16GB RAM Disk inside. It's beeing used, ...
2
votes
0answers
134 views

switching to ramdisk root

My application is to do a secure erase on my system disk (an SSD) using hdparm from a shell script. So my thoughts were: create a ramdisk copy the linux OS to the ramdisk unmount the original system ...
1
vote
2answers
4k views

How can I create an ext4 ramdisk?

First, I have create the directory that I will want to mount to. mkdir /mnt/ramdisk Now, I could easily turn this into a ramdisk using ramfs or tmpfs via mount -t tmpfs -o size=512m tmpfs /mnt/...
1
vote
2answers
1k views

How do you create block RAM Disks on demand?

I learned that I can do modprobe brd rd_nr=1 rd_size=4585760 max_part=1 if I want to create a ram block device at /dev/ram0 but lets say I want to flush the device (to free the ram), then delete it ...
1
vote
2answers
121 views

loadaddress of ramfs

I have some difficulties to make initramfs functional with SAMA5D27 SOM1 Evaluation Kit. I am trying to have a functional initramfs. I first verified that I have a functional linux when used with ...
1
vote
1answer
664 views

How to specify U-Boot not to use uramdisk

I would like to specify U-Boot not to use uramdisk to boot because my ramdisk is part of the Linux image. The problem is that even if I choose sdboot which I modified and call "bootm {linux} - {...
1
vote
1answer
2k views

How to create and mount a RAM disk at computer startup?

This is how I create RAM disk manually on Linux Debian Jessie: mount -o size=1G -t tmpfs none /mnt/tmpfs My question is, how do I make this automatic at each computer startup?
1
vote
2answers
1k views

Linux 3.x init ramdisk embedded in bzImage?

Is the initial ramdisk embedded into the bzImage? How to load an rootfs.cpio as a ramdisk and switch the root?
1
vote
1answer
117 views

How to download original ramdisk file to the computer? [closed]

Linux embedded, is it possible to download original ramdisk file to the computer, to get source code? Access via SFTP. U-boot 1.2.0 Kernel command line: root=/dev/mtdblock3 mtdparts=spansion:0x20000(...
1
vote
1answer
4k views

How do I create a RAM disk on Linux Mint?

I am running a package that adds data to the end of 140–300 files each time through the process. I'm thinking of moving the process to a RAM disk, and using rsync to copy it back when done. My goal ...
1
vote
0answers
141 views

Why can't dd write to /dev/ram0 on Core Linux?

I created an ext2 file-system on /dev/ram0 ramdisk, and mounted it at /mnt/ram. mkdir /mnt/ram mkext2fs /dev/ram0 sudo mount /dev/ram0 /mnt/ram -o rw Reading from ramdisk with dd works. dd if=/dev/...
1
vote
0answers
97 views

Anything-sync-daemon is not making backup snapshots

I have Anything-sync-daemon ("asd") installed and minimally configured according to this page: Anything-sync-daemon - ArchWiki Running asd p gives the following output: Anything-sync-daemon v5.85 ...
1
vote
0answers
326 views

Using compressed RAM disks for swap in FreeBSD on an early Raspberry Pi board

I have an old Raspberry Pi one model B with 256Mb RAM with FreeBSD installed (12.0-CURRENT). Since the device has so little memory, I thought I'd try to use compressed swap in RAM, in order to achieve ...
1
vote
0answers
128 views

Define RAM disk size of a custom built kali iso when booted live

I'm building a custom kali iso and would like to define the size of the root / (tmpfs) partition when it's booted live from an USB. Is this possible? I've got 32G of ram, and the ram disk size is 50%=...
1
vote
1answer
1k views

Is there ramdrive on AWS EC2 instance by default?

I found my df command says the following: $ df Filesystem 1K-blocks Used Available Use% Mounted on udev 31428656 0 31428656 0% /dev tmpfs 6288016 9136 ...
1
vote
0answers
453 views

How to reserve ram for ramdisk (tmpfs) but also prevent it from swaping

My scenario: I have a server with 256GB of ram and I want to create a ram disk, with let's say a 224GB size. Now, I know that there are two main types for ramdisk - ramfs & tmpfs (taken from here)...
1
vote
0answers
30 views

Can you write your whole existing filesystem to an image?

I'm reading about filesystems for embedded linux. If you're using a ramdisk, how its supposed to work is a compressed image of the filesystem is kept in the boot partition, and is copied into the root ...
1
vote
1answer
826 views

Kernel's cached memory can't be freed, even dropping caches

All host's memory is cached and there's no way it can be freed. /dev/ram1 is used for storing testing files, but after each build we run freeramdisk. $ freeramdisk /dev/ram1 $ echo 3 > /proc/sys/...
1
vote
0answers
286 views

Display boot splash on ramdisk only system

I'm working on a kiosk system with the root file system loaded into RAM. One of the requirements is that the boot process output should be completely hidden from the user. I've already managed to set ...
0
votes
1answer
22 views

mv command for many nonexistent files, does it wear off the destination disk at all?

I am trying to continuously move many files (~ 10 000 each minute) from /ramdisk to normal /ssd , but not all files are there. When the mv /ramdisk/file55 /ssd/file55 fails because source is not ...
0
votes
1answer
161 views

Linux: How to create and attach a RamDisk without mounting it?

On Linux, how can a RAM disk be created and attached without being mounted? Moreover, how can the device name like /dev/sdb assigned to the RAM disk be found? Finally, how can the RAM disk (which is ...
0
votes
1answer
33 views

Is there a way to import a layout with multiple partitions into ramdisk?

I dumped the partition layout of a disk, with: sfdisk -d /dev/sda > part_table cat part_table output label: dos label-id: 0x0004bc49 device: /dev/sda unit: sectors /dev/sda1 : start= ...
0
votes
1answer
22 views

Inspect a Ramdrive?

I have mounted a ramdrive via /etc/fstab. And I would like to inspect the properties of the drive such as the memory policy (e.g. bind, prefer, or?) to make sure all properties are expected. How can ...
0
votes
1answer
2k views

Requiring a script to sync ramdisk before and after reboot

On a specific machine I use a lot of RAM to serve websites really fast directly from RAM (which by the way is working amazingly well). For this I have mounted a ramdisk in /etc/fstab (in debian 7, via ...
0
votes
1answer
788 views

how to add application to initrd.gz

I have an initrd.gz (from linux parag*n live cd) I want to edit the file inside and add app like apache,ophcrack,etc. So far I've done extracting by following these step wiki.ubuntu.com/...
0
votes
2answers
821 views

Ramdisks in OpenSuse 13.1

I've just installed OpenSuse 13.1, and noticed 5 tmpfs ramdisks in the partitioner, mapped to /dev/shm, /run, /sys/fs/cgroup, /var/lock and /var/run. I don't remember seeing these ramdisks in the ...