How to burn an image file to USB in Ubuntu Linux?

 

This is a quick tip. In Windows, we’ve lot of free and paid alternatives to write an image file to USB device(e.g ImgBurn, Win32DiskImager). Let me explain my requirement. If I get a bootable ISO image file of an operating system like Ubuntu or moblin how would you do that if you’re in a Linux environment? A byte-exact copy of the ISO image must be placed on the USB drive. It is not sufficient to simply copy the image file to the drive.

It’s quite simple to do that

unmount the USB device if it’s automatically mounted to the system.

Step 1

You can either use # umount <usb-drive> command or directly unplug using your nautilus file manager(windows shell equivalent)

Step 2

Image Writer is a small python executable script that detects your USB drive and writes the image to it. The advantage of using image writer is that it will not inadvertently overwrite your system hard drive. Download Image Writer. Navigate to the desired location where you kept the image writer and change its permission to execute.

# cd <directory with downloaded image-writer file>
# chmod a+x ./image-writer
# ./image-writer <image file>

Now you’re done!

There’s a alternative method using ‘dd’ which you can see in the following link. But it’s very risky. It may erase your whole system files if it’s not used carefully.

Source: moblin help

 

How to fix mt.exe : general error c101008d ?

 

Those who developed a window based (native C/C++) application using Microsoft Visual Studio 2005 or above might have experienced an error similar as follows.

mt.exe:general error c101008d:Failed to write the updated manifest to the resource of file "some_sample.exe/dll". The process cannot access the file because it is being used by another process.

and if you build the exe again(or link again) it may get succeeded?,

What does this indicate? How to fix this issue?

The fix is very simple, disable your antivirus scan and try the build again (DO THIS AT YOUR OWN RISK. DON’T BLAME IF SOMETHING WRONG HAPPENS). Probably you wont face this issue anymore.

The reasons for this issues are.

Your anti-virus program is always vigilant on the executable files written in your system. So once your linker generates this exe, the file will undergo strict scanning by your anti-virus scanner if it’s active. During the scan time, the file will be exclusively locked by the anti-virus program.

The error you’re seeing about embedding manifest to the exe. Embedding manifest is not part of compilation or linking. You can embed manifest to any executable using the manifest tool (mt.exe). See How to embed a manifest in a C/C++ application.

mt.exe –manifest MyApp.exe.manifest -outputresource:MyApp.exe;1

or

mt.exe –manifest MyLibrary.dll.manifest -outputresource:MyLibrary.dll;2

the suffix “1” is for exe and “2” is for dll. This process is automated in Visual Studio (See, manifest generation in Visual Studio ).

Once the exe is written to the disk, visual studio will execute the next step using mt.exe to embed the application manifest in to it, but this time the file will be exclusively locked by antivirus which cause this error. if your antivirus lightning fast to scan the exes, you wont see this error.

This kind of error are quite easy to get in clear-case networks where the files in the views are access slightly less speed than a normal disk drive. In that case the antivirus program may take a bit more time completely scan the executable.

 

How to Install Google Chrome OS with VMWare?

 

Hope all of you heard of release of Google Chrome OS.

It’s light weight open source operating system which designed to work with web applications. If you want to know more about the project you can visit their official website( chromium.org) . So that I can keep this post as simple as possible. If you want to know about Google Chrome OS in 3 minutes, you must watch this video!

Before starting I must say that, YOU MUST HAVE AN INTERNET CONNECTION TO GET THINGS GET GOING! (I hope it’s already there as you’re reading this blog!)

To install google chrome there are two different ways.

  • Prepare a linux installed machine
  • Get the source tarball and build tools
  • Build the source (takes around 10gb of your HDD).
  • Create the chromium image and install it. Details can be found here

You can install the image natively in a machine or you can install in a virtual machine. VM’s are a bit more convenient as you PC is not all affected whatever do in that.

The second way is more simple. As someone already took all the pains to download and build the source and prepared the OS image.

I am approaching the second method which is more simple and convenient.

  1. Visit http://gdgt.com/google/chrome-os/download/
  2. Download the OS image (You may need to create a login for downloading (you can also use your facebook to authenticate it.
  3. Get VMWare Player from VMWare website.
  4. Install VMWare Player
  5. Unzip the vmware virtual disk image (vmdk) you’ve downloaded from gdgt.com

There you go. You’ve all ingredients for your installation. Now let’s start the installation. note that I have tried this in Windows 7 and VMWare Player 3.0

1. Create New Virtual Machine

image

2. Choose for “I will install operating system later”

image

3. Choose Other as your operating system

image

4. Name your virtual hdd (we can change this later and use the downloaded vmdk image). The VMPlayer new interface is not that friendly.

image

5. Press Next and leave your Options default

image

6. Finish your setup

image

7. Now you can see your Virutal Machine in the VMWare Player window. Now you need little bit more customization and we need to map the vmdisk we’ve. Choose Edit Virtual machine settings

image

8. Configure RAM and VMDK

a. Given more room to run the Virtual machine. Given 1024 MB of my RAM to run the Virtual Machine

b. Remove the default HDD

image

9. Click on Add and Choose for Hard Disk

image

10.  Choose for existing virtual disk

image

11. Browse to vmdk file you downloaded (unzipped)

image

12. VMWare player may ask to convert it to new format. Do this according to your preference. but I lft the image untouched and kept in old format

image

13. This is an option step. Only required if VMWare Prompts about vmdisk usage issues if vmdk image is kept in different hard drive than the default HDD. Click on the “Advanced Button of virtual machine settings window.

image

14.  In my system VMWare asked me to choose IDE0:0 as default for the image. This might be different for you. Do as VMWare explains in error message (if occured) when starting up virtual machine

image

15.  Finish the setup and now go back to your Virtual Machine Choose to “Play Virtual Machine”. You can see its booting up

image

16. You can use your Google ID (or Gmail ID ) and password to login

image

16. You can see the default Google Home Page when you login

GoogleHome

17. Click on the Chrome Button on right top corner to see your default web applications.

ChromeHOme

18. You can access your own stuffs as you’re seeing.

The internet access was too slow in the virtual machines. I will share more screenshots later. Anyway you’re there in your Chrome OS right? So share your experience and stories. Put them as comments or put in your blog twitter anywhere you find comfortable. Signing Off Chrome OS. Bye till I sign in again.