Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-22-2010, 10:02 AM   #1
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Rep: Reputation: 15
Unhappy fidsk -l command not working satisfactorily

Hi all,

On running sudo fdisk -l command The output is as follow...
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10443    83883366    7  HPFS/NTFS
/dev/sda2           14335       19456    41142465    f  W95 Ext'd (LBA)
/dev/sda3           10444       13849    27358695   83  Linux
/dev/sda4           13850       14334     3895762+  82  Linux swap / Solaris
/dev/sda5           14335       18251    31463271    7  HPFS/NTFS
/dev/sda6   *       18252       19456     9679131   83  Linux
I want to change the filesystem of sda5 to ext3... I used the following command to do that....
 sudo mkfs.ext3 /dev/sda5
After it completes I run the sudo fdisk -l command again.. but the ouput still remains the same.. That is it still shows that the filesystem of sda5 is NTFS...

So please help... Thanks in advance
Old 06-22-2010, 10:22 AM   #2
Registered: Aug 2002
Posts: 17,826

Rep: Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401
mkfs does not automatically modify the partition ID. Just use fdisk to change it to 83. BTW you can still mount sda5 as ext3 even though its ID is not Linux.
Old 06-22-2010, 10:24 AM   #3
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
You have to change the partition label. Here is an excerpt from the Linux partition HOWTO which explains what a partition label is:
A partition is labeled to host a certain kind of file system (not to be confused with a volume label (see Section 6)). Such a file system could be the linux standard ext2 file system or linux swap space, or even foreign file systems like (Microsoft) NTFS or (Sun) UFS. There is a numerical code associated with each partition type. For example, the code for ext2 is 0x83 and linux swap is 0x82. To see a list of partition types and their codes, execute /sbin/sfdisk -T
Basically the fdisk -l command reads this partition label and print information accordingly. To change it you have to use the t command in fdisk. Here is another thread with brief instructions: HTH.

Edit: sorry - as michaelk pointed out - the correct term is partition ID, or partition's system ID.

Last edited by colucix; 06-22-2010 at 10:29 AM.


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
Forum does not retain login info satisfactorily Tim Johnson LQ Suggestions & Feedback 4 06-22-2010 01:47 PM
[SOLVED] command line cd command not working right bjrn64 Linux - Software 6 05-10-2010 06:46 AM
./configure command isn't working in command line jumpmansbro Linux - Newbie 20 01-22-2009 09:29 PM
mv command not working lqchangba AIX 9 07-23-2008 10:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:40 PM.

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