I am here to ask you if it is possible for a ramdisk to get corrupted and if so, is it possible to verify the surface of it?
Asked
Active
Viewed 2,871 times
1 Answers
2
I am going to autoresponder because I have continued looking and I managed to deduce how I can check if there is a defect in the allocated space of the ramdisk.
First let's create the ramdisk. In this example it will have a size of 1 GB:
sudo mkdir -p /media/ramdisk sudo mount -t tmpfs -o size=1024M tmpfs /media/ramdisk sudo chmod 1777 /media/ramdisk
To make the ramdisk permanently available, add it to /etc/fstab.
grep /media/ramdisk /etc/mtab | sudo tee -a /etc/fstab
Once mounted, we proceed to install F3 rom the link of the official page F3 (Fight Flash Fraud) or with the command:
sudo apt-get update sudo apt-get install f3
Assuming that they have installed it using the above command, in the terminal they should write the following and in the following order:
Write the data in the free space:
f3write /media/ramdisk
Read the test data:
f3read /media/ramdisk
And enjoy the storage in a space free of errors.
Sources consulted:

MarianoM
- 655
-
F3 only determines if the declared size is equal to actual size. Primarily used for sorting out "mis-sold" SDHC and flash drives. You do NOT want to try and run a "surface scan" or "badblocks" utility on a SSD. – heynnema Nov 06 '18 at 20:41
-
@heynnema That's right, I understand perfectly what he is referring to. However, this utility when saving files and then being checked, can be useful in flash memories where badblock is not able to detect errors; I have checked this on my own as well. What it does basically is save a file with random content and then check it; in case there was a defective sector or address of memory, in the verification the check would indicate the defect in the unit. – MarianoM Nov 08 '18 at 08:12
-
@heynnema Anyway, I have to edit this because after posing the question, I realized that it is impossible to know if the RAM disk is safe to store information, since the operating system can vary the memory addresses for the storage of the information. Therefore, the only effective way is to do a complete test. – MarianoM Nov 08 '18 at 08:14
-
Oh, you're talking about a RAM disk, not a SSD? Your language was a little unclear when you said surface check. F3 only writes a file at determinate memory locations, and then later goes to read the file to check if it got made. SDHC cards sold as 32G that have only really 8G will fail F3, as file locations from 8-32G never got written, and your SDHC dealer ripped you off. Use memtest to check your main RAM. – heynnema Nov 08 '18 at 13:48
fstab
? – eyoung100 Nov 06 '18 at 08:55