* [Qemu-devel] Mounting windows partition
@ 2004-05-08 20:03 Lean Fuglsang
2004-05-08 20:25 ` Tim
0 siblings, 1 reply; 3+ messages in thread
From: Lean Fuglsang @ 2004-05-08 20:03 UTC (permalink / raw)
To: qemu-devel
Hello,
i created a file - which was emulated as the filesystem for windows98.
I then made some partitions in the emulated dos, and installed windows.
My question is, how can I mount this partition in Linux?
So how do I get a windows_disk1 like the kernel finds in /dev/hda1...?
--
Lean Fuglsang <lean@omnia.dk>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Mounting windows partition
2004-05-08 20:03 [Qemu-devel] Mounting windows partition Lean Fuglsang
@ 2004-05-08 20:25 ` Tim
2004-05-09 1:56 ` Michael Torrie
0 siblings, 1 reply; 3+ messages in thread
From: Tim @ 2004-05-08 20:25 UTC (permalink / raw)
To: qemu-devel
Linux does not have good support for loopback partition table reading.
You can mount a file as a partition, but not convince the kernel to read
a partition table off of a file.
There was a patch to the loopback driver available for 2.4.x, but I
don't think it is being maintained. I think some guys from NASA wrote
it, and they made it very hard to use on any distro other than redhate.
It also required a patch to losetup, that didn't work for me, so it was
buggy even when I used it. (If anyone has info on an
improved/maintained patch for this, I would love to know. It would be
very nice to have this for the forensics work that I do.)
The only other work around that I know of, is to run losetup with the -o
option. Basically, skip over the first track of the "disk" until you
reach the parition's superblock/header. You need to know the exact
offset for this, of course. fdisk -l will probably help you figure that
out.
Once you have your loopback device created, you can mount it like a
partition.
tim
On Sat, May 08, 2004 at 10:03:27PM +0200, Lean Fuglsang wrote:
> Hello,
> i created a file - which was emulated as the filesystem for windows98.
> I then made some partitions in the emulated dos, and installed windows.
> My question is, how can I mount this partition in Linux?
> So how do I get a windows_disk1 like the kernel finds in /dev/hda1...?
>
> --
> Lean Fuglsang <lean@omnia.dk>
>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Mounting windows partition
2004-05-08 20:25 ` Tim
@ 2004-05-09 1:56 ` Michael Torrie
0 siblings, 0 replies; 3+ messages in thread
From: Michael Torrie @ 2004-05-09 1:56 UTC (permalink / raw)
To: qemu-devel
On Sat, 2004-05-08 at 14:25, Tim wrote:
> Linux does not have good support for loopback partition table reading.
> You can mount a file as a partition, but not convince the kernel to read
> a partition table off of a file.
>
> There was a patch to the loopback driver available for 2.4.x, but I
> don't think it is being maintained. I think some guys from NASA wrote
> it, and they made it very hard to use on any distro other than redhate.
> It also required a patch to losetup, that didn't work for me, so it was
> buggy even when I used it. (If anyone has info on an
> improved/maintained patch for this, I would love to know. It would be
> very nice to have this for the forensics work that I do.)
As long as you know where the partition starts in the image, using
losetup works great. For example, here's how I mounted my image. If
the image has only one partition in it created by windows, this will
probably work for you too:
# fdisk -lu disk.img
You must set cylinders.
You can do this from the extra functions menu.
Disk /home/storage/w2k.img: 0 MB, 0 bytes
16 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/home/storage/w2k.img1 * 63 9765503 4882720+ c Win95
FAT32 (LBA)
Partition 1 has different physical/logical endings:
phys=(1023, 15, 63) logical=(9687, 15, 63)
The start of the partition is sector 63. To find the byte location,
multiply 63 by 512, which is 32256. Now use losetup to set it up:
# losetup -o 32256 /dev/loop0 disk.img
# mount /dev/loop0 /mnt/diskimage
Hope this helps
>
> The only other work around that I know of, is to run losetup with the -o
> option. Basically, skip over the first track of the "disk" until you
> reach the parition's superblock/header. You need to know the exact
> offset for this, of course. fdisk -l will probably help you figure that
> out.
>
> Once you have your loopback device created, you can mount it like a
> partition.
>
> tim
>
>
>
> On Sat, May 08, 2004 at 10:03:27PM +0200, Lean Fuglsang wrote:
> > Hello,
> > i created a file - which was emulated as the filesystem for windows98.
> > I then made some partitions in the emulated dos, and installed windows.
> > My question is, how can I mount this partition in Linux?
> > So how do I get a windows_disk1 like the kernel finds in /dev/hda1...?
> >
> > --
> > Lean Fuglsang <lean@omnia.dk>
> >
> >
> >
> > _______________________________________________
> > Qemu-devel mailing list
> > Qemu-devel@nongnu.org
> > http://mail.nongnu.org/mailman/listinfo/qemu-devel
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel
--
Michael Torrie <torriem@chem.byu.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-09 1:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-08 20:03 [Qemu-devel] Mounting windows partition Lean Fuglsang
2004-05-08 20:25 ` Tim
2004-05-09 1:56 ` Michael Torrie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).