[Solved]Access eMMC when boot from SD card?

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[Solved]Access eMMC when boot from SD card?

Postby inkydinky » Sat Aug 01, 2015 5:15 am

tl:dr :
If you boot from an SD card can you access what is on the eMMC ?

Wordy version:

I updated my system today after the power went out. I update every blue moon because of lack of a real need bc uptime is so good and I have several running processes that I don't like to interrupt just for an update that most likely is superfluous. So when the system goes down for reasons beyond my control I update. I'm guessin gthe system had been running conservatively nonstop for 2 months. After the update and reboot, she wouldn't come up. I usually run her headless, so I had to pull her out of her cage and hook her up to a monitor. I powered her up and nada, zero, zip, zilch came up. I poked around and I feel like I'm a victim of what is described here: http://archlinuxarm.org/forum/viewtopic.php?f=60&t=8982.
I read that with dismay as I took it to mean that I would need to reinstall Arch and reflash the emmc as this was an unrecoverable error. So, I flashed the latest image onto an SD card and booted the ole gal back up.

I had a couple of items on the eMMC/flash that i'd like to recover if possible. Is there a way to access the emmc while booting off an SD card?
I tried poking around in /dev/mmcblk* to no avail. /dev/mmcnblk appear to be `block special` and not directories.
I also did a search for what I thought the file names were from / , again to no avail.

Do I need to mount the mmc first? if so what is is named? I looked for a /dev/sdX but found nothing.

Any thoughts?

The hardware is a beaglebone black Rev b.
Last edited by inkydinky on Sun Aug 02, 2015 7:22 pm, edited 1 time in total.
inkydinky
 
Posts: 7
Joined: Tue Mar 17, 2015 11:37 pm

Re: Access eMMC when boot from SD card?

Postby inkydinky » Sun Aug 02, 2015 4:22 am

I never found a direct way to access the eMMC while logged in and booted from the SD card. I did find a way to recover my files and start fresh.

Boot the BBB using the working OS from the SD card.
copy off the entire eMMC block using dd:
$this->bbcode_second_pass_code('', 'dd if=/dev/mmcblk0 bs=1M | ssh martin@192.168.1.67 'dd of=/home/martin/Documents/path/to/backup.origBBB.img bs=1M'')
I found my system to be on $this->bbcode_second_pass_code('', '/dev/mmcblk1p2'), yours may be different.
On your host system, you can mount the image using mount
$this->bbcode_second_pass_code('', ' sudo mount -v backup.origBBB.img /some/mount/point -o loop -t ext4 ')
You may need to change the filesystem (-t) parameter if you setup your system differently.
cd on over to the mount point and off you go exploring and recovering files!

Helpful resources:
http://www.berriman.co.uk/how-to-backup-bbb-emmc-card/
http://www.linuxquestions.org/questions/linux-general-1/mounting-a-dd-image-file-95579/
inkydinky
 
Posts: 7
Joined: Tue Mar 17, 2015 11:37 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 21 guests