2

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?

  • Please attempt to post your exact error – eyoung100 Nov 6 '18 at 8:32
  • What you should verify is your RAM. – user880592 Nov 6 '18 at 8:34
  • @GabrielaGarcia With a simple pass of Memtest + it would be enough to make sure that the ramdisk contains no errors? I ask this because having a lot of memory would be a process of much delay, instead, in windows for example, I can check the surface of the ramdisk; No need to scan all the memory. – MarianoM Nov 6 '18 at 8:37
  • @eyoung100 I have no error, I just wonder if it is possible to scan the surface of a ramdisk to make sure that the surface is good enough to store important information temporarily. – MarianoM Nov 6 '18 at 8:39
  • RAMdisks are in RAM, they're a sort of virtual drives, I believe. So, no surface like in a physical drive therefore I'm assuming that can't be done. Do you actually have a problem or is this just theoretical? – user880592 Nov 6 '18 at 8:41
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:

https://askubuntu.com/a/453755/889244

https://askubuntu.com/a/666926/889244

| improve this answer | |
  • 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 6 '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 8 '18 at 8: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 8 '18 at 8: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 8 '18 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.