[SOLVED] [partition] Which ID to use to get "fat16", "fat32", or "vfat"?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[partition] Which ID to use to get "fat16", "fat32", or "vfat"?
Hello
There's a script that expects "parted -s /dev/sdb1 print" to return either "fat16", "fat32", or "vfat".
However, when using "mkfs.vfat -F 32 /dev/sdb1" followed by "fdisk /dev/sdb" to set its ID to "W95 FAT32" (type=b), parted returns "Partition Table: msdos". I also tried type=c, ie. "W95 FAT32 (LBA)", to no avail.
Does someone know which ID I should use so that parted is happy and the script proceeds?
You confuse partition type and filesystem format and partition table type. "fat16", "vfat", "ext4" are filesystems, partition types can be for example FAT12, FAT16, FAT32, Linux swap, etc. And partition tables can be "msdos" (most common), "GPT", "Apple". So specify which you want. Anyway filesystem is visible with this command "parted -s /dev/sdb1 print". You can paste this script here, maybe in there is something wrong.
root@ubuntu:~# parted /dev/sdb1
GNU Parted 2.3
Using /dev/sdb1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Unknown (unknown)
Disk /dev/sdb1: 1079MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
You say that "parted /dev/sdb1 print" show nothing. What about "parted /dev/sdb print", maybe it not support showing info about partition, only about whole disk?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.