Find info about electronics prices, discounts, top deals in link, like US below.

Mount raw img file in ubuntu


Yesterday I tried to open a file of type is raw img file. Not as usual after I unzip the file and then I open the terminal command in ubuntu to mount raw img file to the folder with ussual command terminal in linux / ubuntu but raw img file could not mount because fie type is different from the usual img file with img file is the raw img.

File that I use is a new file I was downloaded is ubuntu-12.04-preinstalled-desktop-armhf+ac100.tar.gz file that Ubuntu os for netbook I will try to use for my tablet pc.
Unzip file ubuntu-12.04-preinstalled-desktop-armhf+ac100.tar.gz with commad terminal :
#gunzip ubuntu-12.04-preinstalled-desktop-armhf+ac100.tar.gz /path/to/whereever

After unzip a file with gunzip then I have many try to mount it by using a command like "mount ubuntu.img  /mnt/disk", but I can not mount and i was got the error message: mount failed: invalid argument, how to mount raw image linux ?, take a look below.

After I look at some of sources in google search finally i get solution. Here below :

1. Unzip your raw img file.
2. Type command terminal :
    go to root your terminal "sudo su" :
   
#fdisk -l imgfile.img
Device        boot    Start     End         Blocks      Id  System
imgfile.img1      *             63           144555          722233           C     W95 FAT32 (LBA)
imgfile.img2                   14455      5212223        34234454+      83    Linux
To mount first img file type command :
#mount -t vfat -o loop,offset=$((63 * 512)) imgfile.img /mnt/disk
note : vfat is for fat file system, ((63 * 512)) the number of 63 is first img file start partition
To mount second img file type command :
#mount -t ext4 -o loop,offset=$((14455 * 512)) imgfile.img /mnt/disk1
note : ext4 is for linux file system, ((14455 * 512)) the number of 14455 is second img file start partition.

If you got invalid argument / message error like below :
mount : wrong fs type, bad option, band superblock on /dev/loop2,
missing codepage or helper proggram, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
The message error above is cause you not giving the right number start partition see the image below :
Extract raw img file in ubuntu linux


Command first in image above with the red circle line is wrong type and wrong number.
Command second in image above with the green circle line is right command.

Another mount raw img file command in ubuntu :

#mount -o loop,ro,offset=32256 hda.img /mnt/rabbit
 this only mount the first raw img file in two partition raw img file.
or if you have : wrong fs type, bad option, band superblock on /dev/loop* etc...
try command below

#fdisk -ul imgfile.img
Device        boot    Start     End         Blocks      Id  System
imgfile.img1      *             63           144555          722233           C     W95 FAT32 (LBA)
imgfile.img2                   14455      5212223        34234454+      83    Linux


For user ubuntu-11.04-preinstalled-netbook-armel+omap.img after boot ubuntu 11.04 need username and password, i use it on asus transformer tf101 sbkv2 and i was try "username : ubuntu" and "password : temppwd" and "username : ubuntu" with "password : ubuntu" it doesn't work, you must reset password manually.

You must edit your etc/shadow open your disk ubuntu in another ubuntu / linux os and edit etc/shadow delete start sign "*" in etc/shadow with run vi command if your mmc or disk is sdb1:

#mount /dev/sdb1
#cd etc/
#vi shadow
reset password ubuntu



delete all start sign " * " with click x to delete in keyboard and save with ZZ, try open in your netbook or tablet pc and type username "root" without quotes and will automatically run to desktop without password. For detail see Install ubuntu 11.04 preinstalled headless-armel+omap to microsd.

reference : http://www.andremiller.net/ | http://www.linuxquestions.org
For detail reset password debian / linux see http://www.debianadmin.com/forgot-root-password-or-reset-root-password-in-debian.html


Description: Mount raw img file in ubuntu Rating: 4.5 Reviewer: Zein Okeh - ItemReviewed: Mount raw img file in ubuntu

Posted by: Zein Okeh Share Everything, Updated at: Thursday, June 07, 2012

1 komentar:

Johnsmith said...

They product look sooo cute!
There is nothing higher than on-line searching, after they get delivered it's like very little presents!!
<3
www.helik.in

Post a Comment

Sorry if my english is bad

Related Posts Plugin for WordPress, Blogger...
Powered by Blogger.