What is the partition type ('t' command) in fdisk good for?











up vote
2
down vote

favorite












I can't understand the difference between the filesystem specified using fdisk's command line interface with t. And the one used to format it later using say mkefs.



Why do we need to specify it twice?




  1. Say I launch an fdisk session using sudo fdisk /dev/sdb1

  2. Now, I create a partition using the n command.

  3. Then I change the file system type using the t command.

  4. After that, I still have to format the partition and specify the file system again.










share|improve this question




















  • 1




    Possible duplicate of What's the difference of partition type and filesystem type?
    – kos
    Mar 23 '16 at 8:44















up vote
2
down vote

favorite












I can't understand the difference between the filesystem specified using fdisk's command line interface with t. And the one used to format it later using say mkefs.



Why do we need to specify it twice?




  1. Say I launch an fdisk session using sudo fdisk /dev/sdb1

  2. Now, I create a partition using the n command.

  3. Then I change the file system type using the t command.

  4. After that, I still have to format the partition and specify the file system again.










share|improve this question




















  • 1




    Possible duplicate of What's the difference of partition type and filesystem type?
    – kos
    Mar 23 '16 at 8:44













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I can't understand the difference between the filesystem specified using fdisk's command line interface with t. And the one used to format it later using say mkefs.



Why do we need to specify it twice?




  1. Say I launch an fdisk session using sudo fdisk /dev/sdb1

  2. Now, I create a partition using the n command.

  3. Then I change the file system type using the t command.

  4. After that, I still have to format the partition and specify the file system again.










share|improve this question















I can't understand the difference between the filesystem specified using fdisk's command line interface with t. And the one used to format it later using say mkefs.



Why do we need to specify it twice?




  1. Say I launch an fdisk session using sudo fdisk /dev/sdb1

  2. Now, I create a partition using the n command.

  3. Then I change the file system type using the t command.

  4. After that, I still have to format the partition and specify the file system again.







partitioning filesystem fdisk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 '16 at 8:42









Byte Commander

62.1k26167279




62.1k26167279










asked Mar 23 '16 at 8:34









Abhishek Bhatia

3342935




3342935








  • 1




    Possible duplicate of What's the difference of partition type and filesystem type?
    – kos
    Mar 23 '16 at 8:44














  • 1




    Possible duplicate of What's the difference of partition type and filesystem type?
    – kos
    Mar 23 '16 at 8:44








1




1




Possible duplicate of What's the difference of partition type and filesystem type?
– kos
Mar 23 '16 at 8:44




Possible duplicate of What's the difference of partition type and filesystem type?
– kos
Mar 23 '16 at 8:44










2 Answers
2






active

oldest

votes

















up vote
1
down vote













When you want to change the partition type like linux to Fat,



In this case, you have use the t command to change the partition type,like below,



Device         Boot Start     End Sectors  Size Id Type
**/dev/mmcblk0p1 8096 90111 82016 40M 83 Linux**
/dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux

Command (m for help): t
Partition number (1,2, default 2): 1
Hex code (type L to list all codes): c

Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

Command (m for help): p
Disk /dev/mmcblk0: 3.7 GiB, 3909091328 bytes, 7634944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1d437f06

Device Boot Start End Sectors Size Id Type
**/dev/mmcblk0p1 8096 90111 82016 40M c W95 FAT32 (LBA)**
/dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux


Note: I have changed the first partition to FAT32 from linux using t command to set the respective HEX code for that.






share|improve this answer










New contributor




Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    up vote
    0
    down vote













    What you specify with the t command of fdisk is the partition type. This is not related to the filesystem that is inside that partition.



    The partition type is stored in the partition table and is a hint for the BIOS/EFI firmware or the OS of the content of the partition. I guess only Windows used to use it.



    But this is not related of the filesystem you later create on that partition.



    You could try to create an ext4 partition on a W95 FAT32 labeled partition and linux will be fine with it. This is not recommended but nothing forbids you to do so.






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














       

      draft saved


      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f749246%2fwhat-is-the-partition-type-t-command-in-fdisk-good-for%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      When you want to change the partition type like linux to Fat,



      In this case, you have use the t command to change the partition type,like below,



      Device         Boot Start     End Sectors  Size Id Type
      **/dev/mmcblk0p1 8096 90111 82016 40M 83 Linux**
      /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux

      Command (m for help): t
      Partition number (1,2, default 2): 1
      Hex code (type L to list all codes): c

      Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

      Command (m for help): p
      Disk /dev/mmcblk0: 3.7 GiB, 3909091328 bytes, 7634944 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: dos
      Disk identifier: 0x1d437f06

      Device Boot Start End Sectors Size Id Type
      **/dev/mmcblk0p1 8096 90111 82016 40M c W95 FAT32 (LBA)**
      /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux


      Note: I have changed the first partition to FAT32 from linux using t command to set the respective HEX code for that.






      share|improve this answer










      New contributor




      Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        up vote
        1
        down vote













        When you want to change the partition type like linux to Fat,



        In this case, you have use the t command to change the partition type,like below,



        Device         Boot Start     End Sectors  Size Id Type
        **/dev/mmcblk0p1 8096 90111 82016 40M 83 Linux**
        /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux

        Command (m for help): t
        Partition number (1,2, default 2): 1
        Hex code (type L to list all codes): c

        Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

        Command (m for help): p
        Disk /dev/mmcblk0: 3.7 GiB, 3909091328 bytes, 7634944 sectors
        Units: sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes
        Disklabel type: dos
        Disk identifier: 0x1d437f06

        Device Boot Start End Sectors Size Id Type
        **/dev/mmcblk0p1 8096 90111 82016 40M c W95 FAT32 (LBA)**
        /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux


        Note: I have changed the first partition to FAT32 from linux using t command to set the respective HEX code for that.






        share|improve this answer










        New contributor




        Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.




















          up vote
          1
          down vote










          up vote
          1
          down vote









          When you want to change the partition type like linux to Fat,



          In this case, you have use the t command to change the partition type,like below,



          Device         Boot Start     End Sectors  Size Id Type
          **/dev/mmcblk0p1 8096 90111 82016 40M 83 Linux**
          /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux

          Command (m for help): t
          Partition number (1,2, default 2): 1
          Hex code (type L to list all codes): c

          Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

          Command (m for help): p
          Disk /dev/mmcblk0: 3.7 GiB, 3909091328 bytes, 7634944 sectors
          Units: sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disklabel type: dos
          Disk identifier: 0x1d437f06

          Device Boot Start End Sectors Size Id Type
          **/dev/mmcblk0p1 8096 90111 82016 40M c W95 FAT32 (LBA)**
          /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux


          Note: I have changed the first partition to FAT32 from linux using t command to set the respective HEX code for that.






          share|improve this answer










          New contributor




          Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          When you want to change the partition type like linux to Fat,



          In this case, you have use the t command to change the partition type,like below,



          Device         Boot Start     End Sectors  Size Id Type
          **/dev/mmcblk0p1 8096 90111 82016 40M 83 Linux**
          /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux

          Command (m for help): t
          Partition number (1,2, default 2): 1
          Hex code (type L to list all codes): c

          Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

          Command (m for help): p
          Disk /dev/mmcblk0: 3.7 GiB, 3909091328 bytes, 7634944 sectors
          Units: sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disklabel type: dos
          Disk identifier: 0x1d437f06

          Device Boot Start End Sectors Size Id Type
          **/dev/mmcblk0p1 8096 90111 82016 40M c W95 FAT32 (LBA)**
          /dev/mmcblk0p2 90112 7634943 7544832 3.6G 83 Linux


          Note: I have changed the first partition to FAT32 from linux using t command to set the respective HEX code for that.







          share|improve this answer










          New contributor




          Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          share|improve this answer



          share|improve this answer








          edited Nov 20 at 7:07









          muru

          134k19282482




          134k19282482






          New contributor




          Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered Nov 20 at 7:04









          Mathan Murugan

          111




          111




          New contributor




          Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          Mathan Murugan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.
























              up vote
              0
              down vote













              What you specify with the t command of fdisk is the partition type. This is not related to the filesystem that is inside that partition.



              The partition type is stored in the partition table and is a hint for the BIOS/EFI firmware or the OS of the content of the partition. I guess only Windows used to use it.



              But this is not related of the filesystem you later create on that partition.



              You could try to create an ext4 partition on a W95 FAT32 labeled partition and linux will be fine with it. This is not recommended but nothing forbids you to do so.






              share|improve this answer

























                up vote
                0
                down vote













                What you specify with the t command of fdisk is the partition type. This is not related to the filesystem that is inside that partition.



                The partition type is stored in the partition table and is a hint for the BIOS/EFI firmware or the OS of the content of the partition. I guess only Windows used to use it.



                But this is not related of the filesystem you later create on that partition.



                You could try to create an ext4 partition on a W95 FAT32 labeled partition and linux will be fine with it. This is not recommended but nothing forbids you to do so.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  What you specify with the t command of fdisk is the partition type. This is not related to the filesystem that is inside that partition.



                  The partition type is stored in the partition table and is a hint for the BIOS/EFI firmware or the OS of the content of the partition. I guess only Windows used to use it.



                  But this is not related of the filesystem you later create on that partition.



                  You could try to create an ext4 partition on a W95 FAT32 labeled partition and linux will be fine with it. This is not recommended but nothing forbids you to do so.






                  share|improve this answer












                  What you specify with the t command of fdisk is the partition type. This is not related to the filesystem that is inside that partition.



                  The partition type is stored in the partition table and is a hint for the BIOS/EFI firmware or the OS of the content of the partition. I guess only Windows used to use it.



                  But this is not related of the filesystem you later create on that partition.



                  You could try to create an ext4 partition on a W95 FAT32 labeled partition and linux will be fine with it. This is not recommended but nothing forbids you to do so.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 20 at 8:34









                  solsTiCe

                  5,17421845




                  5,17421845






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f749246%2fwhat-is-the-partition-type-t-command-in-fdisk-good-for%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Quarter-circle Tiles

                      build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                      Mont Emei