Hot answers tagged

42 votes

Can't format my usb drive. I have already tried with mkdosfs and gparted

Analysis of the problem Memory cards and USB pendrives have the same kind of hardware inside, so the same methods are relevant to both kinds of devices. The term 'drive' can refer to a USB pendrive ...
  • 44k
36 votes

How to Fix "Read-only file system" error when I run something as sudo and try to make a folder/file?

This worked for me: First, run this command with sudo permission: sudo fsck -n -f Then reboot the machine. The options -f and -n are documented directly under man fsck, but under the filesystem-...
34 votes

how to format USB Flash Disk using Ubuntu terminal

First, you have to find out which device (/dev/sd??) your USB stick is. Therefore look at the output of sudo fdisk -l After that unmount the device/partition (if necessary) by running sudo umount /...
  • 459
23 votes

I can't format my live-USB pendrive (udisks-error-quark, 11)

If you don't have any valuable data on that drive you can create a new partition table with Gnome Disks if it doesn't like the current one: Click on the cogwheel for drive operations and select “...
22 votes

wipefs device or resource busy

Use the -f (force) option: wipefs -af /dev/sdb
20 votes

How to know when formatting disk has finsihed - Ubuntu 16.04?

I had a similar situation where I right clicked a previously created partition on an external drive to reformat it. Once it had started there was no window of any sort to show the progress of the ...
17 votes

How do I identify the partitions of my hard drive in order to then shred them all?

Why not shred then entire device (important! choose the right device to shred!): shred /dev/nvme0n1 ... rather than shred /dev/nvme0n1p1
  • 2,498
16 votes
Accepted

Should you format your disk running Ubuntu?

There never was a reason to format a disk in Windows unless for re-installing the OS or another OS. Defragmentation yes but that was inside Windows. Regarding the comment: people tended to format to ...
  • 289k
14 votes

Cannot format my SD card

It's very easy. First insert your SD in Sdcard Reader, let Ubuntu mount it. check the access path for the sd card using df You will get some output like this Filesystem 1K-blocks Used ...
14 votes

How to format Ubuntu bootable USB?

Neither of the two existing answers solved my problem. I needed to go to the Disks app and hit Ctrl-F to get a prompt to actually format the USB drive. Thanks to this answer.
13 votes

How do I completly delete Ubuntu 12.04 (only OS installed)?

Boot other distro/OS that you want to install on your desktop and when you're prompted to set up your partitions, delete all existing. Now when you've deleted all partitions, create a new one for ...
13 votes

Format and partition second hard drive using terminal? (Ubuntu Server 14.04)

Solved I used fdisk -l to show the partitions and then: fdisk /dev/sdb n p 1 [enter] [enter] w and then: mkntfs /dev/sdb1 in that order to partition the drive. ...
13 votes
Accepted

Analogue of Ubuntu's Disks in Xubuntu?

You could use gparted. Install by opening a terminal by pressing Ctrl+Alt+T and typing: sudo apt-get install gparted If you would insist on using the disk utility: sudo apt-get install gnome-disk-...
  • 88.1k
13 votes

wipefs device or resource busy

Unmount the disk and all the partitions on it: sudo umount /dev/sdb* Then retry the wipe.
13 votes

Ubuntu server 20.04 - time format 24 hours on shell with date command

The easiest way is to change LC_TIME variable to locale that uses desired time formatting. en_GB uses 24h clock for example. You can set it system-wide using localectl: localectl set-locale LC_TIME="...
  • 339
12 votes

Should you format your disk running Ubuntu?

I have a slightly different opinion. Firstly, there were occasionally good reasons to reformat Windows. It slowed down if you installed things (including fonts). That wasn't fragmentation, it was ...
  • 287k
11 votes

Unplugged USB stick while formatting - now not recognized any more

sudo apt-get install gparted Launch GParted from the dash, switch to the usb stick, choose Device → Create Partition Table (accept the default setting), create a new partition.
  • 5,500
11 votes

Format usb and confirm all zeros

I'll throw my hat into the ring here as well. One alternative that I love to use is scrub. It is in the repositories, so to install it from a terminal window type in: sudo apt-get install scrub ...
  • 38.7k
11 votes

I can't format my live-USB pendrive (udisks-error-quark, 11)

The best way to do is... Open Terminal sudo fdisk -l This will list your all mounted/unmounted device.. Look for your USB device ... you can cross-verify it by from the Disk utility...It may list ...
10 votes

How to customize the font style in notify-send?

The issue might be that the summary string is not parsed, whereas the body string is parsed. The format should be notify-send <OPTIONS summary body> You will notice in the code below the summary (...
10 votes
Accepted

Format usb and confirm all zeros

Apply dd, and tr for virtual inspection: dd if=/dev/sdb | tr '\0' 0 Apply dd and grep for automatic checking: dd if=/dev/sdb | grep -zq . && echo non zero The above is significantly slower than ...
  • 190k
10 votes
Accepted

How do I fix NTFS from Ubuntu?

You can try to use ntfsfix in order to repair the NTFS volume. This is a 'solution' in that it can fix simple errors such as the MFT and MFTMirror not matching up, and some minor filesystem ...
  • 71.1k
9 votes

How to Fix "Read-only file system" error when I run something as sudo and try to make a folder/file?

If you are dual booting Windows with Ubuntu and you do not have any error in dmesg, then the problem could very well be caused by Windows. In Windows go to Control Panel → Power Options and disable ...
  • 101
9 votes

Bash create custom string

You can use brace expansion and printf: printf "%s\t" ROW1 n{1..300} The first string specifies the format of output to printf, and %s is replaced with a corresponding argument. Since there is only %...
  • 190k
9 votes

Why unmount a partition before overwriting the disk?

umount un-mounts file systems. This is needed here because it would be bad if you overwrote the partition while it is still mounted and possibly accessed by any application. You'd get errors. See ...
  • 104k
8 votes

Swap vanished after reboot

This is not happening in the reboot. After you finish your setup (running ecryptfs-setup-swap), go back to gparted and reload the table & open a terminal and run: sudo fdisk -l /dev/sda. You gonna ...
  • 46.6k
8 votes

Cannot format my SD card

You can use the included Disks application Click on the target partition. Now you can create new partitions, format the disk or change partition type.
  • 730
8 votes

How to format a booteable usb made by Startup Disk Creator

Install mkusb sudo add-apt-repository universe sudo add-apt-repository ppa:mkusb/ppa sudo apt-get update sudo apt-get install mkusb Run mkusb and select restore to a standard storage device
7 votes

Thunderbird date format?

How to get YYYY-MM-DD HH:MM date format in Thunderbird 60 sudo ln -s /usr/share/i18n/locales/en_DK /usr/share/i18n/locales/root echo 'root.UTF-8 UTF-8' | sudo tee -a /etc/locale.gen sudo locale-gen ...
7 votes

Unable to format pen drive

It sounds like you may have a broken pendrive; go to a terminal and try these commands; ensure the pendrive is in fact /dev/sdc 1st though (use mount): sudo -i fdisk /dev/sdc p # Lists the partitions ...

Only top scored, non community-wiki answers of a minimum length are eligible