I currently have a script that copy the content of a microSD card to the eMMC of a BeagleBone Black. Once the copy is done, I would like to switch root filesystem for the eMMC and finish installing packages.

How can I switch root filesystem? I've found switch_root and pivot_root commands, but no much example of how to use them.

My process would looks like this :

  • Insert microSD card into BeagleBone Black
  • Hold boot switch while applying power
  • rc.local copy microSD to eMMC
  • rc.local switch root filesystem from microSD to eMMC
  • rc.local continues installing (now on eMMC)

OS used is SlackwareARM 14.1.

Note : the process could be called from somewhere else if possible, ie : earlier in init or from u-boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.