Booting from Live USB image

Booting from Live USB image

I am trying to use the Yocto Live USB Image: http://software.intel.com/sites/default/files/devkit-live-img-final.binblob.bz2

The file in the download is of type "*.binblob". Do I just copy that to a USB stick? Ultimately, I would like to boot that image in VMware.

 

 

Thanks,

 

 

Mike

15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

Hello Mike
After expanding the bz2 from the download. You can write (using linux) the binblob to a USB drive using "dd if=devkit-live-img-final.binblob of=/dev/sdX bs=8m conv=fsync" 

replace the X in /dev/sdaX with the USB assigned letter (i.e. /dev/sdd)  Take care with the above command, as you can overwrite any block-device

I don't have VMWare installed to try it, but the image works under Virtualbox. I did have to convert the binblob to a vdi for it work.
http://www.webupd8.org/2009/12/convert-usb-boot-image-img-to-virtual.html
VBoxManage.exe convertdd file.img file.vdi

Tom

Do we use dd to write the iot-devkit-mmcblk0.direct file as well? These info should be in the documentation as well.

Quote:

Tuan Bui (Intel) wrote:

Do we use dd to write the iot-devkit-mmcblk0.direct file as well? These info should be in the documentation as well.

Yes, using dd to copy iot-devkit-mmcblk0.direct to SD works perfectly. The command was:

sudo dd if=iot-devkit-mmcblkp0.direct of=/dev/sd? bs=4096

Don't forget to replace /dev/sd? with the block device assigned to your SD card.

--
Best,
Michal Pawlowski

Your command will work but will not sync the fs and writing in 4K blocks is typically a little slower than 1M blocks, the images where written like this:

sudo dd if=iot-devkit-mmcblkp0.direct of=/dev/sdX bs=1M conv=fsync

If you are downloading the compressed image from iotdk.intel.com/images then use something like this to decompress the image on the fly:

su -c "bunzip2 -c iot-devkit-201402201605-mmcblkp0.direct.bz2 | dd of=/dev/sdX bs=1M conv=fsync"

Remember to triple check your device node /dev/sdX and replace the letter accordingly. Write to the device node & not to a partition!

Win32diskimager works well for Windows users,  but again use care in selecting the target drive.  It will faithfully overwrite any image file to whatever drive you select,  including its own drive. 

Quote:

Tuan Bui (Intel) wrote:

Do we use dd to write the iot-devkit-mmcblk0.direct file as well? These info should be in the documentation as well.

 

http://www.anegis.com

On a Mac you can use the Disk Utility application to copy the image to a USB drive.  Otherwise you can open a terminal and use the above mentioned "dd" command.

Quote:

Michal Pawlowski wrote:

Quote:

Yes, using dd to copy iot-devkit-mmcblk0.direct to SD works perfectly. The command was:

sudo dd if=iot-devkit-mmcblkp0.direct of=/dev/sd? bs=4096

Don't forget to replace /dev/sd? with the block device assigned to your SD card.

in case you are on Linux and want to resize the ext3 root partition to match your sd card:

1. dd over to sd card as described

2. list sd card partitions and remember the start sector for 2nd partition (i.e. ext3 root partition)

$ sudo fdisk -l /dev/sd<X>

3. remove entry for partition 2 in partition table and create new entry. Note: this won't delete any data on partition 2. Just make sure not to forget the start sector

$ sudo fdisk /dev/sd<X>

within fdisk:

d
2

still within fdisk create new partition. Make sure you enter the right start sector otherwise you will likely loose all data within 2nd partition. For end sector you may just take the default (i.e. until end of sdcard)

n
p
2
<enter right start sector>
<RETURN>
w

After this you will have the new partition table on the sd card. However, the new table isn't automatically propagated to your OS. Easiest just to remove SD card and insert it back. When the OS knows the new table you can resize the ext3 fs of the 2nd partition to the new size:

$ sudo fsck.ext3 /dev/sd<X>2
$ sudo resize2fs /dev/sd<X>2

 

 Resizing the images. 

I've had success using gParted on my Ubuntu laptop to shrink both the SD card partitions and the USB live image 
'persistent' partitition. That allowed me to use my 8GB USB sticks and 2Gbyte SD cards. I prefer gParted because it determines and displays the free space on the partition, preventing any unintentional truncation of the existing used sectors.

i.e. gparted does not only change the partition but also changes the filesystem within the partition?

Why isn't this information included in the "getting started" documents on http://software.intel.com/iot -  most of your users will just try and unzip the files and copy them to the SD card - and will be frustrated with the user experience. 

I found the process of getting the IOTDK on an SD card really frustrating. Eventually I got it to work on OSX, and I created a tutorial here: https://github.com/IntelOpenDesign/MakerNode/wiki/Download-and-Installing-the-IoT-Devkit-Image-to-your-Galileo-on-OSX  for anyone who has trouble. Hopefully we will start providing the image files in a format that will make it easy for users to copy it to their SD card ASAP. 

That guide looks nice, but we already have something quite similar here:

https://software.intel.com/en-us/programming-blank-sd-card-with-yocto-linux-image-os-x

Note: if you want to go faster use rdisk on OS X.

As for providing a raw image like the images previously out there that people extract onto their uSD card, I really think this is a bad idea for many reasons. Using dd is a basic skill when writing disk images and besides the obvious 'going too fast and using the wrong device node) is pretty error free.

Leave a Comment

Please sign in to add a comment. Not a member? Join today