Questions tagged [diskutil]

diskutil is a command line tool for modifying, verify and repairing disks.

Filter by
Sorted by
Tagged with
73
votes
7answers
110k views

How do I get detailed SMART disk information on OS X (Mavericks or later)

I'm trying to get a detailed SMART status report on the drives in my Mac. I'm not talking about "Verified," I'm talking about the detailed report that's about 100 lines long listing all the vital ...
48
votes
7answers
82k views

External drive does not mount after plug off without eject

I accidentally unplugged my hard drive without properly ejecting it, and now the drive does not mount when plugged in. What can I do to make it work again? I can see the disk in lsusb and diskutil ...
15
votes
3answers
98k views

How can I delete a partition (coreStorage logical volume?) from the Terminal?

I finally understood why Disk Utility will not change the partitions on my HDD, even though I added the most recent one myself (maybe significant: to test Yosemite DP) with it. Now I see it says it ...
9
votes
2answers
22k views

Difference between “diskutil unmount” and “diskutil unmountDisk”?

Sometimes when I try to unmount a disk using the "diskutil" command I get the following message: $ diskutil unmount /dev/disk1 disk1 was already unmounted or it has a partitioning scheme so use "...
8
votes
2answers
17k views

How to fix Mac hard drive partition showing as Fdsik_partition_scheme

My situation seems very similar to how to fix GUID hard drive corrupted to MBR but with enough differences that I haven't been able to put together a confident solution. I have a 3TB Toshiba drive in ...
8
votes
1answer
5k views

macOS partition startup Volume type FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF

I have encountered a nearly identical issue to the one in this question (and this too: Data Not Backed Up, Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF), but my hard drive's main partition is ...
7
votes
2answers
4k views

How can I create a bootable drive for ArchLInux on macOS?

I'm trying to figure out how to do the equivalent of these instructions for creating an archlinux bootable drive on a Mac. (I'm using a Micro SD to USB adapter.) I found these instructions on ...
6
votes
1answer
15k views

Removing EFI partition from external Disk?

A few months ago I decided to format an external HD that I wish to use with my Mac mini, but I can not use 100% of it. In the formatting process, a partition called EFI appeared. When I open the Disk ...
6
votes
0answers
9k views

Is there a way to clean up possibly invalid disks that only show up on Mac OS Recovery through ‘diskutil list’ in Terminal? Does Recovery use them?

Hopefully that question is clear enough, and hopefully this is just me being silly. When I boot into the Recovery Partition, go into Terminal, and run 'diskutil list', I get quite a few tiny and ...
5
votes
1answer
568 views

How to create a read-only RAM disk on macOS from the command line?

On macOS Catalina, a RAM disk with 512MB space can be created with the following command: diskutil eraseVolume HFS+ "RAMDisk" `hdiutil attach -nomount ram://1048576` On Ubuntu, a RAM disk and its ...
5
votes
1answer
723 views

Why won't an fsck-declared-good volume mount?

I have a CoreStorage logical (virtual), encrypted volume that will not mount, even though fsck_hfs declares it clean. Does anyone know what the deal is here? Here is the drive information: /dev/...
5
votes
0answers
92 views

How to allow an internal disk to sleep on 10.13

I have an internal disk which is noisy and seldom used. With previous versions of OSX I was able to spin it down by using diskutil eject, but with the latest High Sierra 10.13.4, after a few seconds ...
4
votes
2answers
249 views

Double Erased my 64GB flash drive, but failed both. How to fully erase it again and make it work?

TL;DR I formatted an USB drive on my AndroidTV which failed, and am now trying to fix it from my Mac. Right now I can see the drive in diskutil list but it neither shows up in Finder nor in Disk Util. ...
4
votes
3answers
3k views

Reclaim lost space from Bootcamp Partition

First off, sorry I didn't understand you had to use apples bootcamp software to deal with bootcamp partitions. I wanted to stop using bootcamp, so I deleted the partition through disk manager some ...
4
votes
4answers
20k views

Couldn't open device

I can not partition nor use a removable USB disk without file system. I obtained the following informations: sh-3.2# diskutil info disk2 Device Identifier: disk2 Device Node: ...
4
votes
1answer
17k views

Creating a partition in unallocated space

I left some unallocated space on my external HD (around 200 GB) and now I would like to create a partition on it using gpt in terminal since the Disk Utility tool on El Capitan is not even showing the ...
4
votes
0answers
2k views

Unable to find an APFS Container Reference after fixing FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF error

After following this guide and giving my partition the proper GUID, i can't access it. Is there a way to recover the container reference its supposed to have or at least a way for me to extract data ...
3
votes
3answers
951 views

dd on Catalina gives “Permission denied” error even after grant it Full Disk Access in Security and Privacy

date; sudo dd bs=1M if=2020-02-13-raspbian-buster-full.img of=/dev/rdisk3; date Thu Apr 23 20:22:45 PDT 2020 Password: dd: failed to open '/dev/rdisk3': Permission denied Thu Apr 23 20:...
3
votes
1answer
1k views

diskutil info disk0 shows --> Volume Name: Not applicable (no file system)

When i use below command in mac terminal diskutil info disk0 I get: Device Identifier: disk0 Device Node: /dev/disk0 Whole: Yes Part of Whole: ...
3
votes
2answers
89 views

Prevent certain APFS volumes from being deleted in Disk Utility.app

I can open Disk Utility and permanently erase any highlighted, internal APFS disk volume not being used to boot the currently running operating system, just by clicking the delete or - (minus) button, ...
3
votes
1answer
239 views

MacOS: two hard drives, one empty

I was trying to recover my Mac from a backup but something went wrong (the recovery was very slow) so I ended up installing a clear MacOS. However, I did something wrong with diskutil, and now have ...
3
votes
1answer
10k views

How to reclaim free space partition on macOS High Sierra?

I was trying to expand my main drive by deleting a third partition I used to have after deleting and formatting with free space: sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s2 I ...
3
votes
1answer
172 views

Can´t mount encrypted external hdd after encryption was interrupted

After I plug the disk it requests the password, I enter it and then it says it is not readable by my computer. Then with Terminal I ask diskutil cs list and displays that info about the volume (see ...
3
votes
2answers
2k views

How do I rename the Boot Camp partition?

The partition is currently called BOOTCAMP, and I would like it to be called Windows. When I try to rename the partition is Disk Utility, no error is displayed, but the change is not persisted (i.e. ...
3
votes
4answers
22k views

EFI system partition repair

I'm having a problem with the internal SSD on one of my Macs running 10.10. It was working fine when I was browsing the web one day and then suddenly froze with the spinning beachball; I couldn't ...
3
votes
1answer
10k views

Create a partition on SD card for ext4 filesystem

I've got an SD card and want to create a partition on it for the ext4 fs. The partition must start after 1MB. This 1MB will be used for a bootloader (u-boot). I'm doing this on OS X Yosemite. Here's ...
3
votes
2answers
853 views

Is it possible to recover a formatted macOS partition

Backstory: After I went to the Apple Store today, the drive in my Mac was wiped by an employee as I was supposed to have it replaced. The replacement unit had an issue though, so they gave me my old ...
3
votes
1answer
188 views

How to parse output from diskutil activity in bash script

I want to be able to run a bash script over each line output from diskutil activity", I haven't been able to figure out how to do this though. I thought maybe I could simply: diskutil activity | ...
3
votes
1answer
1k views

Disk image of OS + Recovery partition?

I'm working with multiple OS X versions frequently and I'd like to have an image which contains a particular OS version's system partition and its recovery partition. Is this possible? (the disk where ...
3
votes
2answers
18k views

How can I create a bootable USB drive for Ubuntu from OS X?

I've decided to switch from OS X to Ubuntu. I'm following the documentation on Ubuntu's site for creating a bootable USD Drive. I converted the ISO to IMG. I ran diskutil list. I inserted my flash ...
3
votes
0answers
6k views

Can't erase disk, Error: -69760

I am trying to format a USB drive, however I am faced with the following error: sh-3.2# diskutil unmountDisk force /dev/disk3 Forced unmount of all volumes on disk3 was successful sh-3.2# diskutil ...
3
votes
0answers
75 views

Difference between “diskutil mount” and “sudo mount”

I was looking for a way to mount the EFI partition on macOS when I realized there was actually two commands to mount a partition: mount and diskutil mount. What is the difference between them? I ...
3
votes
0answers
470 views

How do I recover from Disk Utility hang without system restart?

I have external CDROM connected to MBP and I wanted to read one data CD. The media was in bad shape (scratched) so macOS could not read anything. I wanted to eject the disk and try another media, just ...
3
votes
1answer
4k views

diskutil fails to fix Fusion Drive

My iMac suddenly stopped booting, failing to mount the disk at boot. Running diskutil repair fails with this error: bash-3.2# diskutil repairVolume disk3 Started file system repair on disk3 ...
2
votes
1answer
68 views

I accidentally caused one of my encrypted drives to start converting into a decrypted drive. How can I stop it?

One of my external hard drives used for Time Machine backups has an encrypted HFS+ volume. While in the process of trying to re-associate the backup with my system, I accidentally told it to start ...
2
votes
1answer
53 views

How do I make 1 empty partition out of an external USB disk?

I made a mistake with dd and now my external USB disk looks as follows: $ diskutil list (... output ...) /dev/disk2 (external, physical): #: TYPE NAME ...
2
votes
1answer
2k views

Tried to fix filesystem type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF and probably made it worse

I have a MacBook Air 11 inch which I recently tried to install Linux on with a swap partition and a root partition. In my stupidity I used the “disks” program under “try ubuntu now” to delete the ...
2
votes
2answers
2k views

How do I create an encrypted APFS volume from the command-line?

I'm trying to automate creating an encrypted APFS image with files in it. What I have so far: >>> hdiutil create -megabytes 1 -layout GPTSPUD -fs apfs -volname encryption encryption.dmg ...
2
votes
2answers
1k views

Strange virtual disk. Delete or leave?

I have two virtual disks: Main macOS disk Bootcamp windows disk When I use diskutil listin command line, it shows me: So what the /dev/disk1 is? Should I delete it? And what is EFI EFI disk0s1 is? ...
2
votes
1answer
919 views

Find specific attached disk, not volume, by Applescript

I have a script I use to format any inserted SD card, copy data from specific folders to it, then eject. Each format/copy is triggered manually, as part of a batch process involving maybe a hundred ...
2
votes
2answers
203 views

How to delete a boot partition from MacOS Catalina

A few years ago I created a second boot partition on a MacBook, called "BootOS". I would like to delete this partition and merge the space back into the remaining partition. I have found a question/...
2
votes
1answer
284 views

Why does “diskutil eraseVolume …” add an extra “Apple_Free” partition

My question is about why "diskutil eraseVolume" adds an extra partition to an APM partition table. A little history will help understand the situation better I think -- had a 240GB APM style disk on ...
2
votes
1answer
554 views

After deleting Bootcamp .. I failed to merge free disk space using Disk Utility

After deleting Bootcamp partition I cannot merge it back to Macintosh HD partition nor even using it to install windows again. Using Disk Utility this is what happens: I tried to login to MacOS ...
2
votes
1answer
101 views

100% full USB stick un-mountable after forced eject

During an rsync my USB stick became 100% full without me noticing it. When I tried to eject it, I got a message that it was in use, but no application was named and I could not see anything that was ...
2
votes
1answer
77 views

Help Unmouting disk if UUID is mounted until a Specific Time

Every morning I have the same routine. I come into work and plug in my peripherals including my Time Machine Backup. I have my Time Machine scheduled to only run one daily backup at 3:30pm. I ...
2
votes
2answers
13k views

diskutil verifyVolume / : POSIX reports: Exec format error

I'm having problems with my main system OSX volume. When running sudo diskutil verifyVolume / : $ sudo diskutil verifyVolume / Password: Started file system verification on disk1 OSX Verifying ...
2
votes
1answer
10k views

How to mount Core Storage volume under Linux (or force conversion on unrevertible volume)?

I tried to mount HFS+ partition in Linux today, but I had problem with hfsplus: unable to find HFS+ superblock I've found later that this partition is in fact Core Storage container for the logical ...
2
votes
0answers
50 views

Mac partition shows as type FFFF-FFF… - partition doesn't show in boot menu

I have a Ubuntu 16.04 partition running on my Mac alongside the MAC OS. It started recently that I could only boot into a black screen in the Mac OS and now the partition in the boot menu has ...
2
votes
1answer
532 views

How many APPLE_APFS partitions is a disk allowed to have?

I am using macOS High Sierra Version 10.13.2. The following two examples indicate that a disk is only allowed one APPLE_APFS partition. The output below from a Terminal application window shows that ...
2
votes
0answers
129 views

Salvage data from fusion drive

I have a 2015 iMac 27 inch that had a fusion drive. I recently replaced the fusion drive with a SSD drive. It seems that my iMac had two storages. One is an 128GB SSD drive connected via PCI and a ...