Questions tagged [diskutil]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

APFS bug?: Faulty 'Disk full' message after spanning APFS container over 2 physical disk-partitions

I used the following command on two physical Samsung SSD's inside my Mac mini 2012 with OCLP and Big Sur. I use it as a server, kids Apple Arcade gamingbox, AppleTV, Photo presenter in 4K (with ...
user avatar
  • 11
0 votes
1 answer
20 views

How to get full "Media name" from the command line

From the Disk Utility GUI I can pick a physical disk and then click info and I get a Media name of ST325062 4NS Media (this happens to be disk4) From the command line I can do diskutil info disk4 and ...
user avatar
  • 409
0 votes
1 answer
44 views

Hard drive not showing in Recovery Mode despite reformat in HFS+

Same issue as related in this thread but I already did the following: Re-created a new GPT (GUID) partition table (using GParted, Ubuntu) Created an HFS+ partition specifically for my MacOS Re-...
user avatar
  • 31
0 votes
0 answers
95 views

APFS Container lost after crash and reboot

My 15" MacBook Pro Late 2016 with a 500GB SSD was occasionally rebooting (but only) during MS-Teams meetings. Anyway, the last crash was destructive and now I get flashing "?" when it ...
user avatar
  • 1
2 votes
1 answer
97 views

How to know what the different `roles` do in `diskutil apfs` shell command

I wish to know what these mean, which one I should use, when specifying the <roles> as shown here. $diskutil apfs addVolume Usage: diskutil apfs addVolume <containerRefDisk> <fs> &...
user avatar
0 votes
2 answers
72 views

What happens when you delete GUID_Partion_Scheme?

/dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *121.3 GB disk0 1: ...
user avatar
  • 1
1 vote
2 answers
732 views

APFS disk plugged in newer system gives "Incompatible Disk" warning in original OS

If you plug an external macOS system disk using APFS into a newer version of macOS you will get a warning afterwards back in your original macOS saying: "Incompatible Disk. This disk uses ...
user avatar
0 votes
0 answers
57 views

diskutil unmountDisk fails, but lsof shows no processes using the disk

I have a number of external hard drives with multiple partitions each. Since getting a new Macbook Pro and updating to Monterey, running diskutil unmountDisk on two of these HDs fails with an error ...
user avatar
  • 113
1 vote
2 answers
46 views

Merge partition on external hard drive

I wanted to format and merge 2 partitions on my external hard drive. I used the command : diskutil erasevolume "Free Space" "" /dev/disks4s4. But now I lost 30go on 2TB and I can'...
user avatar
  • 11
3 votes
1 answer
319 views

diskutil no longer gives PID of dissenting process?

I recently got a new mac and simultaneously upgraded from Mojave to Monterey. Formerly, when I ran diskutil unmountDisk <disk here>, if there was a dissenting process, it would provide me with ...
user avatar
  • 113
1 vote
1 answer
36 views

Internal NVMe SSD missing 65GB after uninstalling Boot Camp with Boot Camp Manager [duplicate]

I am attempting to reclaim the 65GB or so I previously partitioned using Boot Camp Assistant. I have tried another answer listed before to the same problem however I could not get it to work. I have a ...
user avatar
  • 21
2 votes
1 answer
149 views

Is there an open source alternative to diskutil available for macOS?

Is there an open source alternative to diskutil available for macOS? I am hoping to find a command line program that perform the same core functions like: verify disk or volume repair disk or volume ...
user avatar
1 vote
2 answers
107 views

Macbook Air Can Not Start After Trying to Remove Ubuntu

I was trying to remove Ubuntu (dual boot) from my 2017 Macbook Air. Now my computer can not start successfully in either macOS or Linux. When I restart it, it now opens refind, then gnu rnu in both ...
user avatar
-1 votes
1 answer
21 views

Creating new gpt header for broken SD-Card [closed]

I have a broken SD Card. It is detected by mac OS, but I cannot mount it or store data on it. When using gpt -r show and got this: /dev/disk8 (external, physical): #: TYPE ...
user avatar
0 votes
1 answer
58 views

Unable to Expand APFS Container [closed]

I'm having a problem similar to this one, where I can't expand an APFS container to fill all available space. Here's my disk layout in Catalina: % sudo diskutil list ...
user avatar
0 votes
0 answers
77 views

Trying to disable “ignore ownership” option on NTFS partition, not much going right

Cloned a Boot Camp partition from my old Mac with dd (both thus being NTFS), but, unlike the original, it does not show in the boot menu. Research suggests this is because ownership is disabled. Thus ...
user avatar
  • 11
0 votes
1 answer
41 views

Unable to allocate free space at end of disk to Mac

As per screenshot below, my Mac has 1TB storage, but the actual capacity shown in Disk Utility only 816GB. There is 200GB categorised as "free space" when I performed a diskutil list, ...
user avatar
0 votes
1 answer
567 views

can't claim free space to my container disk

I have a 500gb ssd and I have 1 container which its size is only 70gb. I can't add the remaining 430gb of storage to this container using disk utility for some reason I tried adding the remaining ...
user avatar
0 votes
0 answers
65 views

dd-Image of Target Mode Disk cannot be unlocked (cryptousers lost)

I struggle with understanding APFS and FileVault and I hope you can help me to understand: I put my MacBook in Target Mode and wanted to create a (backup) image on a macmini which I borrowed from a ...
user avatar
0 votes
2 answers
127 views

Script to mount exfat drive

hope you are doing great. I´m using a Macbook pro 2019 with Big Sur and I have all my photos and videos in a external drive formatted in ExFat. Each time I have to mount the disk I need to run this ...
user avatar
0 votes
1 answer
431 views

How to properly unmount image (dmg / sparsebundle)

[macOS Mojave 10.14.6] I've recently discovered r/w disk images and the particularly fascinating sparse bundle. As I understand it, an image (the .dmg or .sparsebundle itself) is "attached" ...
user avatar
1 vote
0 answers
45 views

Lost macOS boot option after using EaseUS partition to resize Windows partition

I am using a Macbook Air. After I installed Windows 10, I wanted to resize the Windows Partition and create a new partition to use data. After that, Windows informs me that a recovery error - cannot ...
user avatar
0 votes
1 answer
193 views

Does "gpt remove" command delete files along with partition? Trying to recover a Mac OS partition Vol Type FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF

I have a Macbook Pro with Big Sur on it, and I installed Linux Mint. I then resized the encrypted Mac OS APFS partition in order to grant Linux more space. After that I created another smaller Linux ...
user avatar
  • 113
0 votes
2 answers
302 views

APFS Volume does not increase in size

I have an issue with an APFS volume that resides inside a SparseBundle. I tried to increase its size (similar to this: Is it possible to increase size of an APFS volume?), but failed. Unfortunately, I ...
user avatar
1 vote
0 answers
69 views

Recover Apple CoreStorage Volume, LVG, Logical Volume Group -container / partition / volume

I wasn’t able to mount the disk on my MacBook (I had removed both hard drives from iMac, since it’s logic board went bad and I thought not to put more money on Apple products due to such bad hardware ...
user avatar
1 vote
1 answer
3k views

How to make remove free space and make APFS container take it up

I am on 11.1 Big Sur beta. I have a partition with no disk identifier called (free space) I would like to remove this, and then make the APFS container take up the free space. Here is a screenshot of ...
user avatar
0 votes
0 answers
138 views

How do I move a partition in on macOS?

I'm migrating data from a 525GB drive to a 1TB drive. Part of the reason I'm doing this is the APFS container got messed up on the 525GB drive (I have backups). The first thing did was dd the data ...
user avatar
  • 285
4 votes
0 answers
465 views

How to mount a .dmg file with a different volume name (or modify it once mounted)?

MacOS Catalina, 10.15.6 Given a .dmg file, foo.dmg, I want to be able to attach it so that its contents will be visible in the Finder application under the Locations section with an arbitrary name, ...
user avatar
1 vote
2 answers
141 views

How to set a consistent location for drives mounted on boot?

Each time I reboot my computer, when I run diskutil list the order of the mounted drives changes: /dev/disk0 becomes /dev/disk1 and vice versa. This creates problems for applications and scripts that ...
user avatar
  • 119
1 vote
2 answers
2k views

Cannot resize APFS container after updating to Big Sur

I've installed Big Sur beta 2 and tried to use Boot Camp Assistant but I got the error "disk could not be partitioned". Also tried to partition manually but "a problem occurred while ...
user avatar
  • 153
3 votes
2 answers
128 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, ...
user avatar
3 votes
3 answers
4k 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:...
user avatar
  • 777
1 vote
0 answers
46 views

Macbook Pro 2015 barfed during Boot Camp partitioning, rebooted to uninitialized APFS drive

I was trying to run Boot Camp to have access to the windows Steam library. Boot Camp kept failing and it would then hang on "error: please wait while we reset the partitions to the usual configuration,...
user avatar
1 vote
1 answer
595 views

format/Erase Equivalence Disk Utility and Terminal Command diskutil

What is the diskutil equivalence from Disk Utility of Format/Erase with Format MS-DOS(FAT) and Scheme GUID Partition Map. Format/Erase with Format MS-DOS(FAT) and Scheme Master Boot Record. In other ...
user avatar
2 votes
1 answer
107 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 ...
user avatar
2 votes
2 answers
903 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/...
user avatar
  • 121
0 votes
1 answer
142 views

How can I hide a ramdisk from Finder?

I'm creating ramdisks on MacOS following the usual procedure (ie: diskutil erasevolume HFS+ mydisk after hdiutil attach -nomount ram://SIZEINBLOCKS). They work, but they show up in Finder windows with ...
user avatar
  • 161
1 vote
1 answer
440 views

Unable to mount partition

I've combined two partition formatted as NTFS for dual boot system with bootcamp. I did this while running windows using a special program to adjust partitions. but after a necessary restart according ...
user avatar
1 vote
0 answers
171 views

External Hard Drive accidentally turned off and won't show any files

I recently bought a hard drive and when I connected it to my laptop, the partition option was not available in Disk Utility. So I looked on the Apple Forums and found a solution, which included ...
user avatar
  • 11
2 votes
1 answer
749 views

Create encrypted partition for Time Machine from command line using diskutil or gpt, instead of Disk Utility?

I can use Disk Utility to create an encrypted partition, intended for Time Machine backups. I would choose the Mac OS X Extended (Journaled, Encrypted) format. However is there also away to achieve ...
user avatar
  • 1,309
0 votes
2 answers
323 views

How to create a read-only shadow for existing RAM disk on macOS?

Read-only RAM disk can be created with method described in this post, so how to create a read-only shadow mount point for existing RAM disk while keeping the original mount point unchanged with ...
user avatar
  • 163
6 votes
1 answer
2k 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 ...
user avatar
  • 163
0 votes
0 answers
184 views

command silently failing when running from the root's crontab

I have a script that runs diskutil and since diskutil needs permissions to run I'm running the script from the root's crontab. Steps: sudo su root crontab -e sh /test.sh Nothing ever happens ...
user avatar
0 votes
0 answers
99 views

Mac Hangs on boot, Macintosh HD partition intermittent failures

I have the following problem: My 2016 MacBook Pro (El Capitan) hangs on boot. The progress bar loads to near completion, after that it stops. The laptop heats up and eventually shuts down. What I ...
user avatar
1 vote
1 answer
498 views

What is the difference between this disks (0 and 1) on my Mac?

I want to know how does my Mac use this disks. What is the difference between this disks (0 and 1) on my Mac? And what is the difference between internal and synthesized? I would be appreciated if ...
user avatar
  • 133
2 votes
0 answers
69 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 ...
user avatar
  • 21
4 votes
2 answers
350 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. ...
user avatar
0 votes
3 answers
2k views

How long should diskutil resetUserPermissions take (Catalina)?

I am following this article because of this issue. The Terminal has been going on for about 2.5hrs and I do not know of a way to see a progress bar or know if it is stuck or if something else is ...
user avatar
1 vote
0 answers
50 views

Can I recover a drive after accidentally allocating it to a fusion drive?

I made an incredibly boneheaded mistake. I typed diskutil cs create Fusion\ Drive disk1 disk2 instead of diskutil cs create Fusion\ Drive disk0 disk1 (while I was looking at the list to make sure I ...
user avatar
  • 475
0 votes
2 answers
163 views

Should diskutil list an unmounted drive?

diskutil list showed the presence of an external drive.  But nether Finder nor df showed it.  And there was no "oops" pop-up when I unplugged it. Is diskutil list supposed to show everything plugged ...
user avatar
  • 3,355