Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi all! I am using a RAM Disk in a preboot EFI environment. I store some files and configuration data there. Then I start Linux OS. That memory is not ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    8

    Ramdisk in Linux with start physical memory address and size


    Hi all!

    I am using a RAM Disk in a preboot EFI environment. I store some files and configuration data there. Then I start Linux OS.

    That memory is not erased, it is runtime memory. I have been able to save the memory position in which the RAM Disk starts and its size.

    My question is, is there any command or can annyone tell me how could I modify a ramdisk driver, so it mounts a existing FAT16 RAMDISK giving it the physical start address and size as parameters?

    Thank you very much.

    BR

    Daniel

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    BY RAM Disk, do you mean NOR or NAND Flash or some other kind of non-volatile flash memory? Or is it truly volatile memory?

  3. #3
    Just Joined!
    Join Date
    Sep 2011
    Posts
    8
    In the preboot, I install a FAT16 sytem on 512MB of RAM memory which is maintained when the OS is loaded.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    Is this something that perhaps the EFI Toolkit could help with? I've never used it (or EFI ramdisk, for that matter), but it does at least mention RAM Disks.

    Can you elaborate on your EFI environment or hardware or how you create this ramdisk?

    Is this memory reserved when Linux is booted, or does Linux see it as part of its available memory? i.e does Linux show approximately 512MB less than the total physical memory installed?

  5. #5
    Just Joined!
    Join Date
    Sep 2011
    Posts
    8
    Yes, the ramdisk driver which I developed is based in the ramdisk driver which is included in the EFI Toolkit. But they do not explain anything about building a post-boot persistent ramdisk i.e. they only focus on the pre-boot environment.

    I am a bit newbie with Linux, is there any command which could give me the available memory in Linux?

    Thank you very much

    Best Regards

    Daniel

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    Try these:
    Code:
    cat /proc/iomem|grep System\ RAM
    
    dmesg|grep BIOS-e820
    
    dmesg|grep MEM
    
    cat /proc/meminfo
    
    free
    You can run hex2dec on the output of the first two commands to get human readable numbers.

    At boot time, you can pass kernel arguments (see memmap) that dictate what portions of RAM you want to be accessible and what parts you don't.

  7. #7
    Just Joined!
    Join Date
    Sep 2011
    Posts
    8
    Ok I will try that, I do not know if you know about EFI, but I did store the Ramdisk in the EfiRuntimeServicesData type of memory, so I think it should be accesible, I will try tomorrow any

  8. #8
    Just Joined!
    Join Date
    Sep 2011
    Posts
    8
    I do not have access to the platform in which the system is installed today, I will reply to your question on monday. Btw I want to ask you another question.

    I have seen that there is a project called pramfs which allows you to mount existing filesystems, or so I understood: pramfs.sourceforge.net

    Do you think that if I have a FAT16 system in the RAM (assuming I got to install it in the correct memory type) could this project be used to mount it?

    Thank you

    BR

    Daniel

  9. #9
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    It certainly seems promising...did you look at the technical documentation here? It makes one vague mention of using an "intact filesystem that already exists" but makes no mention of FAT, et al.

    Perhaps the lead developer can help you with your questions regarding this.

  10. #10
    Just Joined!
    Join Date
    Sep 2011
    Posts
    8
    Great idea! I am going to contact him.

    Thanks in advance, I will keep posting about this issue.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •