title: Direct copy Ramdisk image to Ramdisk device
body: <p>Right, so I've got a Ramdisk image on a mounted device at, say, /mnt/sda1/Ramdisk.img . I want to copy the raw data directly to a ramdisk device at /dev/ram0, in such a way that there will be no need to use mke2fs: I could mount the image and device and find that both are identical.</p>
  
  <p>Ideally this would use only linux commands.</p>
  
  <p>My ideas so far: Mounting the image on a loopback and using basic IO to put the data from one device into the other. I could probably do this with C.
  Also, somehow finding the physical address of the ramdisk device and using linux or C commands to put the file directly into the memory.</p>
  
  <p>Thanks in advance.</p>
  
  <p>P.S: I know that the kernel somehow flags memory which was used for ramdisks so the system does not reclaim it. Anyone know where these flags are?</p>