Friday, March 2, 2018

Mounting disk image (.img) file in Linux

How to mount .img file in Linux which has got multiple partitions; 


1. First, check partition table of the image by using fdisk;

[root@Linux]# ls hive.img
hive.img


[root@Linux]# fdisk -l hive.img

Disk hive.img: 7549 MB, 7549747200 bytes, 14745600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x244b7fbe

   Device Boot      Start         End      Blocks   Id  System
hive.img1            2048       43007       20480    e  W95 FAT16 (LBA)
hive.img2   *       43008    14690303     7323648   83  Linux

2. Now we need to mount hive.img2 means the second partition of the disk image;

Now offset of hive.img2 is "Start Sector" X "Block Size"
mount -o loop,offset=$((43008*512)) hive.img /mnt

[root@Linux]# df -hP /mnt
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      6.8G  4.3G  2.1G  68% /mnt

Note: If offset is not specified, mount fails to identify the filesystem automatically as below;

[root@Linux]# mount -o loop hive.img /mnt
mount: /dev/loop0 is write-protected, mounting read-only
mount: unknown filesystem type '(null)'







Tuesday, April 24, 2012

Sorry I am not able to write this blog - "Building Arch Linux" on time. Since I was a bit confused about my life. "I just want to know what I want to do in my life?"

That is the reason I started reading "The Monk Who Sold His Ferrari" by Robin Sharma. And checking some blogs and reading more about Deepak Chopra. Really getting mad about the reason for my existence in this world.

Almost 4 years back I read a book written by Deepak. That book's name was "Life After Death". That was a really amazing book. But none of these books are giving me the exact answer to my question "What is my role in this universe project".

Tell me, In your office do you really want to do some tasks which are not assigned to you?
Can you be in a project without knowing your role in that project?
Will your manager be happy if you accomplish some task, without completing actual assigned important tasks?

I am working on the wrong task?
                     or
Am I in the wrong project?
                 

I want to know two things;

1) What is that profession/work/job assigned to me by this great universe?
2) What is the password/key/PIN to unlock and know that assigned project?


If anyone know how to reach this project, please let me know.

I hope many of you have the same questions, then why don't we start working out on this and help each other.


Please join me........................

Please check your keyboard (Logic of the keyboard)
<                     These two indicates directions
>
/ -----------------> Which is the projection in the proper direction
? -------------------> Same key also represents question yourself about your direction
<Shift Key> -------> Indicates it will shift your life upwards



Just this came to my mind, it means question about the projection in the right direction.

Regards,
Guru

Wednesday, March 28, 2012

What is Arch Linux

Arch Linux is an independently developed, i686/x86-64 general purpose GNU/Linux distribution versatile enough to suit any role. Development focuses on simplicity, minimalism, and code elegance. Arch is installed as a minimal base system, configured by the user upon which their own ideal environment is assembled by installing only what is required or desired for their unique purposes. GUI configuration utilities are not officially provided, and most system configuration is performed from the shell by editing simple text files. Based on a rolling-release model, Arch strives to stay bleeding edge, and typically offers the latest stable versions of most software.

- > DOB: Arch Linux 0.1, was on March 11, 2002

- > Philosophy: Arch Linux is lightweight, flexible, simple and aims to be very UNIX-like

- > Packaging: "pacman" A binary package manager

- > Suitable for: This Linux is suitable for people who like to know how Linux work. For example who want to build their own cycle after getting spare parts from the garage. Means we decides what we need. In case while raiding cycle breaks, you know how to fix it on your own.

It is suitable for people who like to learn Linux and spend time with it.


For more details please visit below site:

https://wiki.archlinux.org

Tuesday, March 27, 2012

Hi All,

My name is Guru and I love Linux. It does not mean that I know all about Linux. Linux is like your girl friend

Note:

(if married == 'yes' then gf=wife)
###gf Girl friend

you can not understand her in your life time. Same thing with Linux. All the packages, libs, etc etc. are like thoughts floating in your girl friend's mind :) every time they are taking new colors:


Any how for another few days I will start working with Arch Linux. If any one want to experiment with Arch Linux then you could check my blog.


Now let me start building Arch Linux in my Virtual Box.


Regards,
Guru