planeschanged planeschanged - 1 month ago 4x
Linux Question

Acessing to /root folder on BeagleBone (Debian) after /usr directory was deleted

I have had some .cpp programs in root directory of my BeagleBoneBlack (Debian). Due to a studpid accident a /usr directory was deleted on my BeagleBone. It make sense for me now, that I can not access the BeagleBone anymore. What I can do is to boot the BeagleBone from SSD-card, but of course I come in this case to another root directory. Do I still have chance to access my .cpp programs from old root directory? The most funniest thing in the story of my stupidness is that I didn't store .cpp programs somewhere else.

Thank you all in advance!


Yes, boot a regular SD-card image (make sure there is no "flasher" in the image name).

Once booted you can mount the eMMC and access your files. Something like this should do the job:

mount /dev/mmcblk1p2 /media
ls /media/root

Depending on what you have installed on the eMMC it may be a different partition (last digit) like mmcblk1p0 or mmcblk1p1. You can then get the files from /media/root e.g. via SCP (winSCP if you are on Windows).