Disk mounting

From Noah.org
Revision as of 15:58, 12 February 2009 by Root (talk | contribs)
Jump to navigationJump to search


fdisk

This will list all the disks that Linux sees, including any hot swapped drives that may have just been plugged in:

fdisk -l

mount individual partitions in a whole disk image

If you have a while disk image and you want to mount partitions inside that image then use `losetup` to create a loopback device for the image.

For example, if you copied an entire disk using `dd` like this:

dd if=/dev/sda of=disk.img bs=32768

You can later create a loopback device for it and see its partitions with `fdisk` and mount those partitions individually with `mount`.

losetup /dev/loop0 disk.img
fdisk -l /dev/loop0