LinuxQuestions.org
Review your favorite Linux distribution.
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 06-22-2010, 10:02 AM   #1
_Linux_Learner
Member
 
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...
Code:
   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....
Code:
 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
Regards
_Linux_Learner
 
Old 06-22-2010, 10:22 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,961

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
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
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
You have to change the partition label. Here is an excerpt from the Linux partition HOWTO which explains what a partition label is:
Quote:
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: http://www.linuxquestions.org/questi...8/#post1904435. 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.
 
  


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
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


All times are GMT -5. The time now is 07:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration