I have an I/O board with me using raspberry pi compute module 3. It has an sd card slot which is to be used for secondary storage. Can someone please help me and tell me how to access the sd card and how to use it as a secondary storage device. I am new to raspberry pi and any help is highly appreciated.

Thanks in advance

1 Answer 1


I have never used a raspberry pi compute module 3 but looking at Compute Module 3 Launch! it is said that it's based on the Raspberry Pi 3 hardware so it should run Raspbian. Usually you address SD Cards with a device file /dev/mmcblk0 for the first SD Card. I don't know what you mean with using it for secondary storage so maybe you will also find /dev/mmcblk1 depending on the primary storage. This storages usually have partitions, e.g.:

/dev/mmcblk0        storage
/dev/mmcblk0p1      first  partition on storage
/dev/mmcblk0p2      second partition on storage

If a partition has a filesystem, for example ext4, you can mount it, e.g. the second partition with:

cm3 ~$ sudo mkdir /mnt/part2
cm3 ~$ sudo mount /dev/mmcblk0p2 /mnt/part2

Now you should have access to this partition and can use it as normal folder:

cm3 ~$ sudo bash -c "echo hello world > /mnt/part2/hello"
cm3 ~$ sudo cat /mnt/part2/hello
hello world
  • Hello when im typing sudo echo 'hello world'> /mnt/part2/hello it is showing permission denied. Can you tell me what im doing wrong.
    – roshini
    Commented Dec 9, 2018 at 12:59
  • @roshini Sorry I have made a mistake. The command must be sudo bash -c "echo hello world > /mnt/part2/hello". I corrected the answer.
    – Ingo
    Commented Dec 9, 2018 at 16:32
  • @roshini Glad to help ;) It would be nice if could accept the answer with the tick on the left side. This finished your question and show others that it has an answer and they do not try to help you for nothing.
    – Ingo
    Commented Dec 10, 2018 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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