3

I want to write an SD Card Image to a SD Card inserted in the Raspberry PI. What I have done (and it is working):

  1. Login to Raspberry an change the /boot/cmdline.txt a NFS Root (Something like ... root=/dev/nfs nfsroot=192.168.1.159:/media/raspbian rootfstype=nfs ...)

  2. Reboot the Raspberry (with the NFS Root)

  3. Unmount the /boot partition (so SD Card is no longer mounted)
  4. Write with dd to the SD Card
  5. Reboot the Raspberry (to the new written sd card)

Is there an opportunity to unmount the Root / File System without the need of a NFS Server? Can the Raspian switched to a new RAM only Root (to have an unmounted SD Card)?

1 Answer 1

0

Yes you can. But it's not very easy.

So, first you need to create initramfs to use with your kenrel. You can place initramfs to /boot partition and after kernel boots it will use it for your rootfs. There is a configuration for it in config.txt and you may need to recompile kernel to be able to boot with it.

Then, you are free to unmount SD card and do whatever you want with it.

Maybe there is something online to try it out but I'm not sure, you may google it.

Your Answer

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

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