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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












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/ram0 bs=1 count=1


When I want to write the contents of the file my_file to ramdisk, it fails.



dd if=./my_file of=/dev/ram0 bs=1 count=1
0+0 records in
0+0 records out
0 bytes (0B) copied, 0.000913 seconds, 0B/s


However, just reading the file dumps its content on stdin.



dd if=./my_file bs=1 count=1


The permission on /dev/ram0 shows rw permisssion for root.



ls -l /dev/ram0
brw-rw---- 1 root staff 1, 0 Jul 5 02:56 /dev/ram0


What does prevent dd from writing to /dev/ram0?







share|improve this question



















  • Im not sure that what you want to do is possible but you better mount the fs instead of trying to overwrite it
    – Kiwy
    Jul 5 at 8:27














up vote
1
down vote

favorite












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/ram0 bs=1 count=1


When I want to write the contents of the file my_file to ramdisk, it fails.



dd if=./my_file of=/dev/ram0 bs=1 count=1
0+0 records in
0+0 records out
0 bytes (0B) copied, 0.000913 seconds, 0B/s


However, just reading the file dumps its content on stdin.



dd if=./my_file bs=1 count=1


The permission on /dev/ram0 shows rw permisssion for root.



ls -l /dev/ram0
brw-rw---- 1 root staff 1, 0 Jul 5 02:56 /dev/ram0


What does prevent dd from writing to /dev/ram0?







share|improve this question



















  • Im not sure that what you want to do is possible but you better mount the fs instead of trying to overwrite it
    – Kiwy
    Jul 5 at 8:27












up vote
1
down vote

favorite









up vote
1
down vote

favorite











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/ram0 bs=1 count=1


When I want to write the contents of the file my_file to ramdisk, it fails.



dd if=./my_file of=/dev/ram0 bs=1 count=1
0+0 records in
0+0 records out
0 bytes (0B) copied, 0.000913 seconds, 0B/s


However, just reading the file dumps its content on stdin.



dd if=./my_file bs=1 count=1


The permission on /dev/ram0 shows rw permisssion for root.



ls -l /dev/ram0
brw-rw---- 1 root staff 1, 0 Jul 5 02:56 /dev/ram0


What does prevent dd from writing to /dev/ram0?







share|improve this question











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/ram0 bs=1 count=1


When I want to write the contents of the file my_file to ramdisk, it fails.



dd if=./my_file of=/dev/ram0 bs=1 count=1
0+0 records in
0+0 records out
0 bytes (0B) copied, 0.000913 seconds, 0B/s


However, just reading the file dumps its content on stdin.



dd if=./my_file bs=1 count=1


The permission on /dev/ram0 shows rw permisssion for root.



ls -l /dev/ram0
brw-rw---- 1 root staff 1, 0 Jul 5 02:56 /dev/ram0


What does prevent dd from writing to /dev/ram0?









share|improve this question










share|improve this question




share|improve this question









asked Jul 5 at 5:09









Holmes.Sherlock

214110




214110











  • Im not sure that what you want to do is possible but you better mount the fs instead of trying to overwrite it
    – Kiwy
    Jul 5 at 8:27
















  • Im not sure that what you want to do is possible but you better mount the fs instead of trying to overwrite it
    – Kiwy
    Jul 5 at 8:27















Im not sure that what you want to do is possible but you better mount the fs instead of trying to overwrite it
– Kiwy
Jul 5 at 8:27




Im not sure that what you want to do is possible but you better mount the fs instead of trying to overwrite it
– Kiwy
Jul 5 at 8:27















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453525%2fwhy-cant-dd-write-to-dev-ram0-on-core-linux%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453525%2fwhy-cant-dd-write-to-dev-ram0-on-core-linux%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay