How do I find out the vfstype of a hard drive partition when it is unmounted in BusyBox?

My question is specific for BusyBox since I am trying to do a mount during a Debian install.

If I do fdisk -l I get a label that just says "Linux". This does tell me if the partition is ext2 or ext3 or whatever.

1 Answer 1

  • With a modern version of mount the file-system type should not need to be specified.
  • sudo blkid displays label, uuid and type (and lsblk to display capacities)
  • file -s /dev/sdX# does the job for partitions as well as disk images.
  • ls /sys/block/*/* is a good resource for many things (but not determining filesystem type)

I assume this is an embedded device, otherwise you should be taking advantage of coreutils, util-linux, etc. rather than busybox.

Let me make this clear, busybox is not consistent across the board - various vendors strip out commands or cripple them to varied degrees. That said, blkid should be available. Run busybox --help which will list the commands compiled into the busybox binary. Also note that often not all those symlinks will exist, so you may need to create them as needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .