0

I need help to change the file system from ext4 to NTFS. I am using this command:

sudo mkfs.ntfs /dev/sda

But I get this output:

/dev/sda is entire device, not just one partition
Refusing to make file system here!

I don't have any data on /dev/sda. What should I do?

  • 1
    How many drives you have in your system? If one drive.. That is sda. And you have Ubuntu installed in it. The out put says the answer. You can make partitions into ntfs which are not mounted. For example sda3 sda4 etc. – PRATAP Oct 9 '18 at 5:17
  • 4
    @karel et al, I don't think that that duplicate is correct. There's no indication that the OP is installing onto NTFS or that it is the root partition. it may be a duplicate, but not of askubuntu.com/questions/55441/… – tudor Oct 10 '18 at 22:48
  • What is your goal? If you want to install Windows on /dev/sda, just proceed to boot the Windows installer. – Melebius Oct 11 '18 at 9:04
  • 2
    This sounds like an X-Y Problem. What’s the situation and what are you actually trying to achieve? – David Foerster Oct 11 '18 at 11:54
  • try this this might help...... unix.stackexchange.com/questions/252625/… – trusty loki Oct 11 '18 at 15:36
5

While it is technically possible (using the force flag) to create a filesystem that occupies a whole device, other than on some USB keys this is a very unusual (and discouraged) thing to do.

What is expected by mkfs is that you create a partition table first.

On the command line you can use:

  • parted - for an all-in-one partition and formatting system
  • fdisk - for old MBR-type partition tables (limited to 2TB per partition)
  • gdisk - for newer, larger GPT partition tables

If you prefer to use a GUI there's:

  • gnome-disks (recommended)
  • gparted (as long as you're not making special filesystems like exfat)

All of these programs will prompt you to create an empty partition table first, which you then add partitions to. If the application doesn't format the partition for you, then you can use mkfs.

When you have a partition table with partitions in it, the partition will have a number. e.g. mkfs /dev/sda2

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.