Answering my own question, you can use the undocumented parameter 'unit' to set
the units to bytes in parted.
r...@storage:~# parted /dev/mapper/storagevg0-ntserveriscsi unit B print
Disk /dev/mapper/storagevg0-ntserveriscsi: 1099511627775B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name
Flags
1 17408B 134235135B 134217728B Microsoft
reserved partition msftres
2 134235136B 1099510596607B 1099376361472B ntfs Basic data
partition
Information: Don't forget to update /etc/fstab, if necessary.
r...@storage:~# losetup -d /dev/loop2
r...@storage:~# losetup -o 134235136 /dev/loop2 /dev/storagevg0/ntserveriscsi
r...@storage:~# mount -t ntfs-3g /dev/loop2 /mnt/storage/
Just for the archives. Thank you, you've been a great help as always :)
Dave
----- "Dave Kempe" <[email protected]> wrote:
> Hi,
>
> I have a GPT partition like so:
>
> #parted /dev/mapper/storagevg0-ntserveriscsi
> GNU Parted 1.7.1
> Using /dev/mapper/storagevg0-ntserveriscsi
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted) p
>
> Disk /dev/mapper/storagevg0-ntserveriscsi: 1100GB
> Sector size (logical/physical): 512B/512B
> Partition Table: gpt
>
> Number Start End Size File system Name Flags
> 1 17.4kB 134MB 134MB Microsoft reserved partition msftres
> 2 134MB 1100GB 1099GB ntfs Basic data partition
>
> (parted) q
>
> And I would like to mount the ntfs basic data partion.
>
> According to this:
>
> http://ubuntuforums.org/showthread.php?t=945028
> I can use losetup with an offset in bytes to find the ntfs data and
> mount it like so:
>
> r...@storage:~ #losetup -o 137216 /dev/loop2
> /dev/storagevg0/ntserveriscsi
> r...@storage:~# mount -t ntfs-3g /dev/loop2 /mnt/storage/
> NTFS signature is missing.
> Failed to mount '/dev/loop2': Invalid argument
> The device '/dev/loop2' doesn't have a valid NTFS.
> Maybe you selected the wrong device? Or the whole disk instead of a
> partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?
>
> Which doesn't work. Any ideas on how to find the correct offset in
> bytes? parted only prints it in MB, which I assume is an
> approximation.
> Or any other tips for mounting a windows created GPT partition?
>
> Thanks,
> Dave
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html