LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-28-2011, 08:28 PM   #1
Advice Pro
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 343

Rep: Reputation: 7
How do I check filesystem type?


fsck gave me:
Code:
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/dev/sda1 is mounted.  

WARNING!!!  The filesystem is mounted.   If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.

Do you really want to continue (y/n)?
I don't want to cause damage, but I'd rather not go into BIOS.
 
Old 03-28-2011, 08:43 PM   #2
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,189

Rep: Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526
You don't need to go into the BIOS. You run e2fsck on an unmounted partition, not on one that is mounted.

So, as the root user you umount the partition, then run e2fsck on an ext2, ext3 or ext4 file system. One easy way to know is look at your /etc/fstab file. The file system type is in there for each mounted partition.
 
Old 03-28-2011, 09:05 PM   #3
Advice Pro
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 343

Original Poster
Rep: Reputation: 7
Since I don't use all of my HDD, wouldn't I have an unmounted partion? Would unmounting this partion, with Ubuntu on it, cause any damage and then when mounted again?
 
Old 03-28-2011, 09:22 PM   #4
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,189

Rep: Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526
Quote:
Would unmounting this partion, with Ubuntu on it, cause any damage and then when mounted again?
No, umounting a partition takes it out of the file system, so the system can not access it while it is being checked ( and possibly corrected.

If it is the root partition, you can boot from a live CD, and check it.
 
Old 03-28-2011, 09:25 PM   #5
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
You could start gparted or whatever and it should display the filesystems of each partition
 
Old 03-28-2011, 09:50 PM   #6
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
The live CD advice is sound and is probably the easiest route.

If a filesystem is open (a long running program is resident there, someone has cd'd into a directory in that file system, etc.) then you can't unmount it.

(You appear to be aware of this, as you gave us your 'fsck', but for the benefit of others: as almost all commands require root access, you'll either need to proceed each command with "sudo", or switch to the root account with 'su -l root'. You'll need to open a terminal session to enter "line mode" commands. Be extremely careful when root.)

If you do a 'mount' command (with no options) it'll show you what device is mounted at what mountpoint in the file system.

E.g. the root filesystem ('/') shown with the 'mount' command
Code:
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
The /etc/fstab entry that caused the device to be mounted at boot time...
Code:
/dev/sda5     /     ext4     errors=remount-ro     0  1
To see if a filesystem has open files on it use the 'lsof' command.
E.g.
Code:
lsof +d /
If open files you can't 'umount' it. It'd say
Code:
umount: /: device is busy.
The easiest way to force a fsck of a filesystem that cannot be unmounted on Ubuntu, you can set the "mount count" to a value higher than the "max-mount-counts" then reboot. When the system comes back up, it will do an fsck on that filesystem as part of the reboot.

So on my little Ubuntu netbook, I can do
Code:
tune2ef -C 10000 /dev/sda5
(do a 'man tune2fs' for an explanation.)

Then reboot.

There may be an easier way to do this as I'm not terribly Debian or Ubuntu literate, but what I described should work. I invite comment from those better versed in Ubuntu than I. And as I mentioned, the live CD is a good option.

Last edited by tommylovell; 03-28-2011 at 09:57 PM.
 
Old 03-28-2011, 10:06 PM   #7
Advice Pro
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 343

Original Poster
Rep: Reputation: 7
I installed gparted from the package manager and navigated to Partion > Information. It reads that my file system is ext4.
 
  


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
changing file system type to another filesystem type,does it effect on data? janakiramulu Ubuntu 1 02-04-2011 02:58 AM
mandriva dual boot filesystem type unknown,partition type 0x7 llearner Linux - Newbie 2 01-24-2010 03:03 PM
Filesystem type is ext2fs, partition type 0x83 TONYSUCCAR Linux - Enterprise 2 08-13-2009 03:20 AM
filesystem type unknown, partition type 0x7 crazyface_juicebox Linux - General 1 02-12-2007 12:50 AM
root (hd 0,0)Filesystem type unknown, partition type 0x7chainloader +1 ece30675 Linux - Distributions 5 07-20-2004 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:51 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration