Issues writing an SD card image from Ubuntu under VirtualBox

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issues writing an SD card image from Ubuntu under VirtualBox

Jump to solution
1,449 Views
bricdesigns
Contributor II

I'm trying to write an sdcard image created with a completely stock Yocto build (which completed successfully).  Following the instructions (including the sync at the end), I dd the .sdcard image onto the SD card.  Unfortunately, when I try to boot (the system does show signs of life and does start the boot process), I see all sorts of warnings on the serial console that point to a corrupt filesystem, and things end in a hang or a kernel panic.

I'm running Ubuntu 14.04LTS (I've tried 12.04 as well) under VirtualBox 4.3.20 running on a Windows 7 box.

If anyone's had success with a similar config, any hints on what may be wrong?  Any recommendations for particular SD cards or SD card readers that you've had success with?

Labels (2)
0 Kudos
1 Solution
1,035 Views
bricdesigns
Contributor II

Hi Carlos,

     Thanks for a great suggestion.  That definitely would have been a faster path to test than my compiles.

     I actually got things to work finally after I changed two things.  First, instead of removing the SD card reader each time I wanted to swap the SD card around, I left the SD card reader connected to my PC and just removed and inserted the SD card.  This let the SD card reader stay assigned to the VM and made it so that Windows didn't keep getting involved.  The more likely fix was actually the second thing - when I was inserting the SD card reader each time, Ubuntu was automatically mounting the partitions that it found, and I wasn't unmounting them before I did the dd.

     So after I inserted the SD card with the SD card reader already connected to my PC and assigned to my Ubuntu VM and after unmounting the existing partitions on the SD card, I was able to successfully dd the image and boot my iMX6 board.

Thanks!

Brian

View solution in original post

0 Kudos
2 Replies
1,035 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi,

In order to discard connection issues on SD card reader connection between host PC with virtualized system has issues, you should try generating the bootable SD card using the pre-compiled Yocto demo images. Please refer to the “DEMO_BSPs” downloadable from “Operating System Software-Board Support Packages” section of the following link:

SABRE for Smart Devices Reference Design|Freescale

As a recommendation for virtualized OS, is using a USB card reader, instead of using the integrated SD reader of some computers, as USB devices are better routable between host and virtualized systems.


Hope this will be useful for you.
Best regards!
/Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,036 Views
bricdesigns
Contributor II

Hi Carlos,

     Thanks for a great suggestion.  That definitely would have been a faster path to test than my compiles.

     I actually got things to work finally after I changed two things.  First, instead of removing the SD card reader each time I wanted to swap the SD card around, I left the SD card reader connected to my PC and just removed and inserted the SD card.  This let the SD card reader stay assigned to the VM and made it so that Windows didn't keep getting involved.  The more likely fix was actually the second thing - when I was inserting the SD card reader each time, Ubuntu was automatically mounting the partitions that it found, and I wasn't unmounting them before I did the dd.

     So after I inserted the SD card with the SD card reader already connected to my PC and assigned to my Ubuntu VM and after unmounting the existing partitions on the SD card, I was able to successfully dd the image and boot my iMX6 board.

Thanks!

Brian

0 Kudos