LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 07:28 PM   #1
LAPIII
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 350

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, 07:43 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
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, 08:05 PM   #3
LAPIII
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 350

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, 08:22 PM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
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, 08:25 PM   #5
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 218

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

Rep: Reputation: 103Reputation: 103
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 08:57 PM.
 
Old 03-28-2011, 09:06 PM   #7
LAPIII
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 350

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



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 01:58 AM
mandriva dual boot filesystem type unknown,partition type 0x7 llearner Linux - Newbie 2 01-24-2010 02:03 PM
Filesystem type is ext2fs, partition type 0x83 TONYSUCCAR Linux - Enterprise 2 08-13-2009 02:20 AM
filesystem type unknown, partition type 0x7 crazyface_juicebox Linux - General 1 02-11-2007 11:50 PM
root (hd 0,0)Filesystem type unknown, partition type 0x7chainloader +1 ece30675 Linux - Distributions 5 07-20-2004 09:04 AM

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

All times are GMT -5. The time now is 04:11 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
Open Source Consulting | Domain Registration