Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running MSWindows virtualized with /dev/sda2 as it's primary drive. Consequently, there is a partition table on that partition, shown as:

# fdisk -l /dev/sda2

Disk /dev/sda2: 137.4 GB, 137436203520 bytes
255 heads, 63 sectors/track, 16709 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System
/dev/sda2p1   *           1       16708   134206978+   7  HPFS/NTFS

So my question is simply: What are the major/minor numbers to create /dev/sda2p1? What about sda2p2 and sda3p1?

share|improve this question
    
Running: CentOS release 5.3 (Final), kernel: 2.6.18-128.1.10.el5 –  NVRAM Dec 14 '09 at 21:50
    
What are you using for your virtualization? –  heavyd Dec 14 '09 at 22:29
    
@heavyd - KVM (version 36) –  NVRAM Dec 15 '09 at 18:24

1 Answer 1

up vote 1 down vote accepted

Assuming this is a straight disk image (e.g., your virtualization solution is not adding some extra metadata to things), this document (also here) offers some suggestions for accessing your partitions on /dev/sda2 (summary: use the -o offset option to losetup to create a new block device referencing the appropriate offset into sda2).

You can also use the Network Block Device (NBD) to create a partitioned block device from /dev/sda2, see this LWN article which described the process in detail. And hey, I just learned something new.

share|improve this answer
    
Yes, I realized I could use loopback/offset after I posted and found out that I don't have an NTFS module in my kernel (d'oh). I used the same technique (elsewhere on Ubuntu) to share a "virtual USB flash drive" with the host & a VM. Tedious, but it worked; however I didn't use /etc/fstab then. –  NVRAM Dec 15 '09 at 18:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.