LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-26-2008, 01:03 AM   #1
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Rep: Reputation: 16
[HOW] mount a whole disk not just a partition


I want to mount a whole disk, for the disk is a virtual machine's disk image, I cannot see its partitions.

Does mount or any others have this feature?

mount /dev/sdb10 mnt -t ntfs
NTFS signature is missing.
Failed to mount '/dev/sdb10': Invalid argument
The device '/dev/sdb10' 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?

Thanks in advance,
Shawn
 
Old 11-26-2008, 02:41 AM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
If you have a bit for bit image such as what dd would make, and you want to see and mount a specific partition where there is more than one. You would make a mount directory, run a fdisk command to see where the starting offset of each partition is at, then mount the partition you want using an offset value. The example below is for mounting the first partition which starts at offset 63:
Code:
STEPS FOR MOUNTING PARTITION OF IMAGE.DD FILE FROM IN SAME DIRECTORY AS ROOT OR SUDO:

1: mkdir /mnt/image
2: sfdisk -l -uS image.dd
3: mount -oloop,offset=32256 image.dd /mnt/image

OFFSET = Sectors offset of beginning sector of partition multiplied by 512, in this case the first partition starts at offset 63.
The example above was on an NTFS partition, no need to specify file system type
 
Old 11-26-2008, 02:49 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You can repeat for every partition, make a separate mount directory for each partition.
To mount hfs or hfsplus, modprobe them first before mounting. Have hfsplus,
hfsutils, hfsutils-tcltk installed.
I don't recall ever mounting an entire disk, I can't see it being done either.
 
Old 11-26-2008, 09:43 PM   #4
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Original Poster
Rep: Reputation: 16
Thank you very much. Mount works like a charm

A little problem: after I mount there is a warning message
Quote:
WARNING: Deficient Linux kernel detected. Some driver features are
not available (swap file on NTFS, boot from NTFS by LILO), and
unmount is not safe unless it's made sure the ntfs-3g process
naturally terminates after calling 'umount'. If you wish this
message to disappear then you should upgrade to at least kernel
version 2.6.20, or request help from your distribution to fix
the kernel problem. The below web page has more information:
http://ntfs-3g.org/support.html#fuse26
Does it mean I should use kernel version no less than 2.6.20? Currently the version is 2.6.18.8.

Last edited by duyuyang; 11-26-2008 at 09:45 PM.
 
Old 11-26-2008, 10:28 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Kernels below 2.6.20 produced that error, some little issue with fuse that came with your kernel. It is used in conjunction with ntfs-3g which gives users read/write access to NTFS file systems.
Most images are read only anyway so it can be ignored.
If you have ntfs-3g installed and do write to NTFS file systems you can still ignore the warning as the issue that brought about this warning is relatively rare.
You can eliminate this warning by either updating the kernel to something 2.6.20 and up or by installing fuse from source and removing the fuse module that came with the kernel you presently have.
 
Old 11-27-2008, 01:30 AM   #6
duyuyang
Member
 
Registered: Mar 2008
Posts: 56

Original Poster
Rep: Reputation: 16
Thank you, Junior Hacker.
I have got the fuse source and re-made it. The warning disappeared.

Best regards,
Shawn
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount disk partition lovingsanth Linux - Hardware 3 05-22-2008 08:43 AM
How to read/mount a volume-managed disk partition? tthtlc Linux - Software 11 03-25-2008 07:06 AM
How to view/mount separate disk -- move /home to second disk Spearhead40 Ubuntu 12 11-03-2007 03:37 PM
Reclaim disk partition from hard disk installation EStester Linux - Enterprise 2 03-09-2005 11:46 AM
how to mount a IDE Partition as a SCSI disk? alexlihk Linux - Hardware 1 08-02-2004 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration