Author Topic: Mounting a full hard drive image?  (Read 4034 times)

0 Members and 1 Guest are viewing this topic.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Mounting a full hard drive image?
« on: September 19, 2005, 11:07:17 pm »
Hey --

I need to mount a full hard drive image as if it's an actual hard drive.  Is this possible?

Essentially I direct copied a full hard drive (such as /dev/hda) and want to mount its main /dev/hda1 partition, which is NTFS.

Is it possible?
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Mounting a full hard drive image?
« Reply #1 on: September 19, 2005, 11:33:29 pm »
hm..

get root

cd /
mkdir hd
mount /dev/hda1 /hd
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Mounting a full hard drive image?
« Reply #2 on: September 19, 2005, 11:59:17 pm »
Hey --

I need to mount a full hard drive image as if it's an actual hard drive.  Is this possible?

Essentially I direct copied a full hard drive (such as /dev/hda) and want to mount its main /dev/hda1 partition, which is NTFS.

Is it possible?

I don't quite understand you.  If you want to mount /dev/hda1, then what Joe said.

If you have a "dd" (.iso) image, you can mount it like this:
iago@Slayer:~$ sudo mount -o loop /mnt/vmware/iso/BroodWar.iso  /mnt/tmp
iago@Slayer:~$ ls /mnt/tmp
autorun.inf*  bw.ico*  install.exe*  isp/  setup.exe*  smackw32.dll*  support/

If it's ntfs, you might have to specify "-t ntfs" to the mount command.  I don't have an iso of a NTFS drive, so I'm not sure if that works, but I don't see why not. 

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: Mounting a full hard drive image?
« Reply #3 on: September 20, 2005, 01:55:53 am »
I didn't dd /dev/hda1, I dd'd /dev/hda.  I know how to mount /dev/hda1 or individual partitions.  But I copied the entire thing, partition table included.

So, if I did something like:

mkdir /tmp/hd
mount notebook-backup.img /tmp/hd

would it spawn:

/tmp/hd/hda1 (ntfs)
/tmp/hd/hda2 (ext3)
/tmp/hd/hda3 (swap)
/tmp/hd/hda5 (ntfs)
/tmp/hd/hda6 (ntfs)
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Mounting a full hard drive image?
« Reply #4 on: September 20, 2005, 02:10:05 am »
Hmm. Sounds difficult. =P
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Mounting a full hard drive image?
« Reply #5 on: September 20, 2005, 09:33:54 am »
I didn't dd /dev/hda1, I dd'd /dev/hda.  I know how to mount /dev/hda1 or individual partitions.  But I copied the entire thing, partition table included.

So, if I did something like:

mkdir /tmp/hd
mount notebook-backup.img /tmp/hd

would it spawn:

/tmp/hd/hda1 (ntfs)
/tmp/hd/hda2 (ext3)
/tmp/hd/hda3 (swap)
/tmp/hd/hda5 (ntfs)
/tmp/hd/hda6 (ntfs)

I don't know, but I kinda doubt it. 

I have no clue how to do that.  But there's likely a way.  www.linuxquestions.org might be a good place to ask this one.