LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-20-2009, 07:23 AM   #1
indexer
LQ Newbie
 
Registered: May 2009
Posts: 6

Rep: Reputation: 0
finding out filesystem unmounted disk


Hello,

I have a hard drive that is unmounted, and i am not sure which filesystem it uses, how can i find out which filesystem is being used so i can mount it?

Indexer
 
Old 05-20-2009, 07:32 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

As root user: fdisk -l /dev/<HD>

HD should be something like sda, sdb, hda depending on the disk(s) that are present in your system.

PS: The number (like sdb3) should be omitted!!

Hope this helps.
 
Old 05-20-2009, 07:44 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by druuna View Post
As root user: fdisk -l /dev/<HD>
That does not tell you the filesystem.....

"lshw" works (you might have to install it)

Also try "vol_id"
 
Old 05-20-2009, 07:50 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@pixellany: You are right, of course. My command shows the system (linux, swap, hpfs etc.), not the filesystem (ext2/ext3/reiserfs etc).

I stand corrected! And sorry for the mix-up.
 
Old 05-20-2009, 08:43 AM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Also:

# file -s /dev/XXX

Dave
 
Old 05-20-2009, 08:52 AM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Just for more variety..

blkid -L

or

blkid /dev/sdbX

Last edited by farslayer; 05-20-2009 at 08:53 AM.
 
Old 05-20-2009, 09:34 AM   #7
*******
Member
 
Registered: Feb 2009
Posts: 63

Rep: Reputation: 16
Quote:
Originally Posted by pixellany View Post
That does not tell you the filesystem.
How so? It does display the FS Id, doesn't it?:
Code:
Disk /dev/sda: 18.3 GB, 18389272576 bytes
255 heads, 63 sectors/track, 2235 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          10       80293+  16  Hidden FAT16
/dev/sda2              11          11        8032+  11  Hidden FAT12
/dev/sda3   *          12          24      104422+   7  HPFS/NTFS
/dev/sda4              25        2235    17759857+   5  Extended
/dev/sda5              25          34       80293+  83  Linux
/dev/sda6              35          83      393561   82  Linux swap / Solaris
/dev/sda7              84         695     4915858+  83  Linux
/dev/sda8             696        1852     9293571   83  Linux
/dev/sda9            1853        2235     3076416    7  HPFS/NTFS
 
Old 05-20-2009, 09:44 AM   #8
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Quote:
Originally Posted by ******* View Post
How so? It does display the FS Id, doesn't it?:
You can't tell if those 'Linux' filesystems are EXTx/ReiserFS/XFS/whatever.
 
Old 05-20-2009, 09:49 AM   #9
*******
Member
 
Registered: Feb 2009
Posts: 63

Rep: Reputation: 16
Ah, OK. Thanks.
 
Old 05-20-2009, 10:02 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by ******* View Post
Ah, OK. Thanks.
And even more: this ID is not necessarily in sync with the true contents of the disk. These ID's can be set manually from within fdisk, and changing them doesn't affect the contents or the type of partition or fs at all.

The file command works ok, but you need to add -s to it knows it's a special file. Otherwise it will just tell you that it's a device node.

Last edited by i92guboj; 05-20-2009 at 10:04 AM.
 
Old 05-20-2009, 11:19 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
another option:

Code:
blkid /dev/hdX
 
  


Reply



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
Local filesystem automatically unmounted dylan.goh Linux - Software 4 04-15-2008 02:52 AM
Possible to see unmounted filesystem? Randux Slackware 9 03-06-2008 10:03 AM
How to get the filesystem for an unmounted drive? Tortanick Linux - General 8 03-12-2007 06:20 AM
Unmounted disk spins up Libra Linux - General 2 01-14-2007 12:32 PM
Root FIlesystem not cleanly unmounted bouke Fedora 2 08-03-2004 01:24 PM

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

All times are GMT -5. The time now is 04:47 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