2

I am running this on Ubuntu 16.04 LTS and using fdisk. I have been trying to change the partition type of a partition on an sd card and I want to change it to win95 fat32 (LBM) which should be command "c" after selecting the change partition type command "t". however when i run "L" to show the list of partition types I am not seeing "c" or win95 fat32 (LBM) as an option. The image below shows all that I am seeing. enter image description here

I have searched the Internet trying to find out why this is but have not found an answer yet. From what I have seen it appears that I should see more types to choose from. Why is it this is what I am seeing and I have no other options?

  • In my experience, it's always preferable to setup the partition in the original operating system. In this case I would partition and format it on Windows. Following this approach can save you a lot of time and data. – Julie Pelletier Feb 1 '17 at 4:41
2

There are four different disk label types: DOS (also known as Intel or MBR), GPT, Sun and SGI (IRIX). Each one has different partition layout and partition types; these are hardcoded in libfdisk(usually /lib/x86_64-linux-gnu/libfdisk.so.1). The partition types shown in your example output are for Disk label type Sun. You can see this when in fdiskyou enter command p and there will be the information Disklabel type: sun:

Command (m for help): p
Disk /dev/sdc: 3.8 GiB, 4026531840 bytes, 7864320 sectors
Geometry: 124 heads, 62 sectors/track, 1022 cylinders
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: sun

Device       Start     End Sectors  Size Id Type         Flags
/dev/sdc1        0 7757191 7757192  3.7G 83 Linux native      
/dev/sdc2  7757192 7857135   99944 48.8M 82 Linux swap      u 
/dev/sdc3        0 7857135 7857136  3.8G  5 Whole disk        

Command (m for help): l

 0  Unassigned       4  SunOS usr        8  SunOS home      82  Linux swap     
 1  Boot             5  Whole disk       9  SunOS alt secto 83  Linux native   
 2  SunOS root       6  SunOS stand      a  SunOS cachefs   8e  Linux LVM      
 3  SunOS swap       7  SunOS var        b  SunOS reserved  fd  Linux raid auto

If there are no important data on the SD, you may change the disk label to DOSwith command o or GPT with command g:

Command (m for help): m

Help:

.
.
.
  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table

But beware, when writing to disk this will delete all your data!

  • thanks a lot for this information. this is exactly what i needed to know to get this done. I did have first create a DOS partition table first before I could change the partition type to win95 fat32 (LBM). – Alex Elliott Feb 7 '17 at 1:57
0

Your partition table is likely GPT, but fat32 requires MBR.

If you don't mind losing all the data already on the disk, you should be able to change the partition table to MBR by using something like gdisk.

  • 1
    FAT32 does definitely not require MBR partitioning. If using GPT, the correct partition type is Basic Data Partition, with the GUID EBD0A0A2-B9E5-4433-87C0-68B6B72699C7. See Microsoft basic data partition. – Johan Myréen Feb 1 '17 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.