Erasing Drives with the Mac Terminal - A Beginner's Guide

  Рет қаралды 22,980

EasyOSX

EasyOSX

Күн бұрын

Пікірлер: 102
@muhammadarsalkhan4048
@muhammadarsalkhan4048 2 жыл бұрын
Great sir you deserve millions likes
@EasyOSX
@EasyOSX 2 жыл бұрын
Thank you for your kind words!
@TysDigitalVideoTreasures
@TysDigitalVideoTreasures 8 ай бұрын
I needed to e-recycle an old NAS drive, and I couldn't secure erase in the GUI. This video helped me quickly learn how to start that process using terminal. Very thorough, logical and easy to follow instructions. Thank you very much for this video. Excellent instructions!
@EasyOSX
@EasyOSX 8 ай бұрын
Happy to help!
@alanj.nicholas8198
@alanj.nicholas8198 Жыл бұрын
Ya baby, amazing video - I've subscribed - this was the best video on KZbin (by far) thank you so much!! Now I can finally re-use my old "HIVE" drive.
@EasyOSX
@EasyOSX Жыл бұрын
Glad it helped you out!
@jamescarrico1233
@jamescarrico1233 2 жыл бұрын
Outstanding video Thank you I am using Mac for the first time and this was a great tutorial Please keep ‘em coming Subbed
@EasyOSX
@EasyOSX 2 жыл бұрын
Welcome to the Mac world! And thanks for the sub!
@cuevasread
@cuevasread Жыл бұрын
You are great, thank you so much for this tutorial!
@EasyOSX
@EasyOSX Жыл бұрын
You're very welcome!
@christyjohnson8181
@christyjohnson8181 Жыл бұрын
Thanks! This helped solve my problem with reformating a USB flash drive as Disk Utility wouldn't work. Quick and easy once I followed your advice.
@Berkner80
@Berkner80 15 күн бұрын
Funny, I tried everything and the terminal method you laid out and failed but as soon as I booted to my main drive I could mount and reformat my external SSD just using the utility disk program. Just glad I got it to work and maybe this will help others.
@EasyOSX
@EasyOSX 14 күн бұрын
Maybe the reading and writing attempts helped the drive realize what state it was in and remap some of the good bad sectors.
@Berkner80
@Berkner80 14 күн бұрын
@ not sure but just glad I got it to work.
@RC-pk9it
@RC-pk9it Ай бұрын
My hdd didn't erase, received an error saying can't open. Any suggestions?
@EasyOSX
@EasyOSX Ай бұрын
Could be it’s damaged. Did you try a repair in Disk Utility?
@RC-pk9it
@RC-pk9it Ай бұрын
@@EasyOSX -thx for reply. It was definitely corrupted, storage issue but I did repair, verify and currently in disc utility erasing and reformatting, seems to be ok
@EasyOSX
@EasyOSX Ай бұрын
Glad to hear!
@RadhikaSharma-oi4ne
@RadhikaSharma-oi4ne Жыл бұрын
Thank you for the tutorial. I tried everything (unmounting), and then erasing. However it shows an error in the end "Unable to begin erase operation: A writable disk is required (-69772)". Infact, my Mac hasn't been able to read the pendrive (says "The disk you attached was not readable by this computer." and in Windows, it shows write-protected). What to do? Help!
@EasyOSX
@EasyOSX Жыл бұрын
That sounds like the solid state drive has hit its limit. Flash drives and SSD’s only have some many times they can be written to before the components can’t hold a charge anymore. It’s an unfortunate downside to solid state storage. It can be caused by drives not being used in a long time, they get used so much and wear out, and of course damaged or bad components. That drive sounds like it might have gone belly up. At best you might be able to use some more powerful apps like SpinRite to get it back up, but if the components are too worn then the drive may be dead. I’m sorry
@APIRATELOOKSATFORTY
@APIRATELOOKSATFORTY 10 ай бұрын
Thank you. Great tutorial. Very helpful!
@shibanaio
@shibanaio 6 ай бұрын
I’m trying to change my disk from APFS to NTFS to use for windows however it says I can’t change it due to NTFS not being compatible with Mac. Is there any way to change the drive to NTFS even though I’m using a Mac?
@EasyOSX
@EasyOSX 6 ай бұрын
So long as you're using the NTFS command it should let you erase a disk and format it as NTFS. I presume this is an external disk?
@billycrowe4501
@billycrowe4501 7 ай бұрын
Great video, so I have a 4TB ssd with say 70gb of data on it and it is reading as full. I ran disk drill on it and there’s a bunch of files as expected even after a regular disk utility format, as expected. To fix this problem I believe I need to fully wipe the bits off the drive so it will stop registering more storage used than what is actually on it. Would you recommend the secure erase with just writing 0? I was gonna use bleach bit but seems that it may have been integrated into Mac already.
@EasyOSX
@EasyOSX 7 ай бұрын
Makes me a little worried that something’s wrong with the drive. That said a full write of 0’s would hopefully allow the drive to reconfigure its index of good and bad segments, so worth a shot I think
@TheRon0mac
@TheRon0mac 9 ай бұрын
Hi EasyOSX, I am wanting to save Mac OSX High Sierra to my thumb drive to install the OS on other Macs and virtual Macs. I tried erasing my 128 GB thumb drive, disk util erases it. Mac OS Journaled. I was prompted that it erased it. I am unable to save the install media, to the drive. It fails erasing via the terminal. I have tried with another Thumb Drive, a 32 GB SanDisk - it erases in disk util, but not via Terminal. I have the installer downloaded and verified its contents - the createinstallmedia is there. Any suggestions would be appreciated.
@EasyOSX
@EasyOSX 9 ай бұрын
Presume you mean "Mac OS Extended Journaled" as that is an important distinction. What is the error it gives you when it fails in the Terminal? Also, it sounds like you're making a recovery drive, so is it failing with the same error when it's running the createinstallmedia command?
@TheRon0mac
@TheRon0mac 9 ай бұрын
@@EasyOSX Thank you for the reply!! I was not intending to create a recovery drive, but was trying to create an install USB drive - perhaps that's what you meant. I should have taken better notes - I believe the command below is what finally created the file. sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume I believe I changed "MyVolume" to something else, I do not recall. That, or something worked. I then converted the "cdr" file to an "ISO" image file with the command below. hdiutil makehybrid -iso -joliet -o Install\ Mac\ OS\ High\ Sierra.iso MacHS-install.cdr What I was hoping for an end result: I was hoping to run Mac OS High Sierra (that I downloaded using my mid 2011 iMac), on my 2017 iMac which has 13.6.5 Ventura installed - within "VirtualBox". I was able to create the ISO finally. It comes up to a black screen in VirtualBox. I do not know if it is a compatibility issue, or if I did something wrong. I am thinking compatibility, but am not sure. I did choose to use 2 CPU's, and 128 MB video, I also created an 80 GB virtual drive, and chose the High Sierra install ISO file in the virtual DVD/CD combo drive. I de-selected floppy. I can live without it - it was an exercise for me to try.
@EasyOSX
@EasyOSX 8 ай бұрын
So the MyVolume was intended to be filler for the name of your drive, sorry if that wasn't clear. But you would replace "MyVolume" with the name of your drive as it appeared on the OS. That's how it points to the correct USB. Admittedly I've not tried MacOS in VirtualBox, though I know it's possible. I do use another virtual machine app called UTM that does the job for me very well. I've not tried 10.12 in it, but I know it should be compatible. If you don't mind me asking, I'm curious as to what you want to run 10.12 in a VM for?
@TheRon0mac
@TheRon0mac 8 ай бұрын
@@EasyOSX Thanks very much for the reply. One reason I want to have older is for the fun of it. Second, I have a couple of apps that are not compatible with Ventura. I understood about the volume name. I am not sure what went wrong. I may check out the UTM. Thanks for that and all the information. I have used VIrtualBox for Linux, and Windows on Windows - to explore installing apps on windows and not wanting to hose the registry. :)
@nimishdahake1526
@nimishdahake1526 Жыл бұрын
That was a pretty good explanation, thank you!
@Techlevel1534.
@Techlevel1534. Жыл бұрын
Thanks for the video! I now have Catalina installed on my Mac and it works perfectly! Disk utility didn’t work so that’s why I used terminal
@adiimvani2265
@adiimvani2265 11 ай бұрын
Hi there I’ve had an issue where my mac got stuck in a boot loop so I tried erasing my ssd in mac disk utility but it always says error and theres two volumes containing my data and the ssd and I am not sure what to do. Is there anyway I can recover the ssd or erase it.
@EasyOSX
@EasyOSX 11 ай бұрын
Depends on what error you get and the state/condition of the drive. What’s the error say?
@DRETHEGREATS
@DRETHEGREATS Жыл бұрын
im trying to get rid of a virus on my external ssd what's the best option
@EasyOSX
@EasyOSX Жыл бұрын
Guess it depends on the virus. Most can be knocked out with a good secure erase provided its not in the firmware. Also making sure it's not a virus that's compatible with the Mac or whatever OS you're connecting the drive to is important (especially with ransomware). Honestly the safest thing would be just to destroy it but that's not always a real solution.
@delta808z8
@delta808z8 Жыл бұрын
@@EasyOSX so basically after formatting several times my files will start disappearing and reappearing out of no where and it’s a brand new drive but I guess my first transfer of files to this new drive came from a drive with a Trojan on it and formatting doesn’t seem to solve the problems I’m tryna delete everything completely and start over as if I got the drive out the box
@EasyOSX
@EasyOSX Жыл бұрын
Hey Delta, I apologize your comment got flagged as spam for some reason so I'm only just now seeing it. If it is a virus, it's possible it's in the drive's firmware and not on the disk. A secure erase might help if it's on the disk, but if it's in the firmware then a secure erase won't change that. It could also be the drive is faulty and keeps have to move your data to new sectors.
@lavinchi6709
@lavinchi6709 Жыл бұрын
Thank you for very helpful info!!!
@Plastik13
@Plastik13 2 жыл бұрын
Hi, I had securely erased a movie (by writing 0 and 1 over the file). When I used a data recovery tool, the software found the title of the video (Titanic.avi) and the size of the video (750 Mo), but was unable to read the video saying that it was corrupted. It makes sense that the file was corrupted since the core of the file was overwritten. My question is : how come the file of the video was deleted by the secure erasing (wiping) but not the name and the size of the video ?
@EasyOSX
@EasyOSX 2 жыл бұрын
An excellent question. One that is partially dependent on the file system that was used, but also if you erased just the file or the entire drive. The FAT systems (ExFAT, FAT32, FAT16, etc.) have what’s called a File Allocation Table (hence the name) that maintains things like the name, size, location, etc. of the files while the system is in use. A secure erase tool, per the FAT standards, erases over the actual files themselves, but the table may maintain the record. In that case you could see a record of the file and its attributes but not the file itself. If the drive was previously another format such as HFS+ or NTFS, they typically have a log that they record all the actions of a drive or a particular file. In those cases the attributes are stored with the file and thus can be deleted along with the file. However the log or journaling of the file may still exist and some of those attributes stored in that log would be with it. So, there are 4 likely scenarios: 1: If you only erased the file with a secure command but not the entire drive, then the drive’s FAT or Log (depending on the format) would maintain that history of the file and its attributes. 2: If you erased the drive the drive may have saved some trouble and instead kept some of the prior records (especially if you erased it to the same format). Part of this is because drives try to be “smart” about where they move data around so as to ensure they wear out evenly or to avoid damaged sectors. 3: Regardless of your method, it’s possible that there wasn’t a whole lot of other data in that sector of the drive so it was easier to recover that data even if the file itself was lost. 4: The sector where the file attribute or file itself was perhaps not functioning correctly and couldn’t be fully erased. Going back to possibility #2 for a moment. One of things Apple (and other manufacturers) note with modern drives is that regardless of the method of secure erase you use, it’s best practice to encrypt the hard drive at rest (using something like FileVault on Mac, Bitlocker on Windows, etc.) to ensure it already looks garbled to anyone trying to access it illicitly before you intentionally try to garble the data. Something like that can help prevent something like this. Hope this helps
@Plastik13
@Plastik13 2 жыл бұрын
@@EasyOSX Thanks. I have a HFS+ format. Do you know where the logs (that record the actions of the drive and files) are located, in order the secure delete those log files ?
@EasyOSX
@EasyOSX 2 жыл бұрын
The drive controls that, so I don't know where they would be on the drive. If you're intending to still use the drive, then eventually it'll get taken out of the HFS' Journal. If you're planning to get rid of the drive, then the best thing would be to encrypt the external drive and then do another secure erase on it, preferably something with multiple passes.
@jsprojectandweb7540
@jsprojectandweb7540 3 ай бұрын
Disk Utility in the GUI was not allowing the drive to be erased, it kept returning an error - fortunately thanks to the terminal tutorial I have now erased the unreadable data and have full capacity of the drive again. :)
@smallsara2735
@smallsara2735 2 жыл бұрын
Thank you for the video! Unfortunately after following all the steps, at the end it said that it was not possible to erase. Do you know if there is another solution or I should give up? I know that probably my SD card it's damaged because it's really old but I would like to recover some pictures from it. Thank you very much for all your help!
@EasyOSX
@EasyOSX 2 жыл бұрын
Hi Sara. Just to clarify are you wanting to erase the SD card or erase it? Or are these 2 separate things? Just want to make sure I understand properly before making any suggestions.
@smallsara2735
@smallsara2735 2 жыл бұрын
@@EasyOSX Hello, thank you for replying! I'm sorry, maybe I didn't explain myself well. The case is that I have a very old Memory Stick with photos and since 2 years ago my computer does not detect it anymore. What I wanted to do is that I could be able to unmount the disk and afterwards use a data recovery program to be able to recover the photos. I have tried the two methods that you have used in the video, but at the end after trying to unmount or to erase the disk, it says to me "error". So I wanted to ask you what should I do in this case, if there is any other solution> Thank you very much for your help
@EasyOSX
@EasyOSX 2 жыл бұрын
Ah I think I follow now. That’s unfortunate. If it’s been bad for 2 years, that’s not a great sign as far as getting the data back. A recovery program like Disk Warrior may be able to help, but there’s not a guarantee. If it was formatted in a way that it would work on non-Mac platforms then you may be able to plug it into a Windows or Linux system and see if it can repair it, but that may not let you recover the data. What happens if you run First Aid from Disk Utility on your Mac?
@smallsara2735
@smallsara2735 2 жыл бұрын
@@EasyOSX thank you for your answer again. If I try to run the First Aid option it says "Operation failed", so I cant really do it. I guess that doesnt have a solution. Thank you for your help nevertheless :)
@EasyOSX
@EasyOSX 2 жыл бұрын
I'm sorry Sara. Perhaps a more powerful tool like DiskWarrior could help, but the drive just might be dead.
@suzieq8379
@suzieq8379 6 ай бұрын
what if my disk isn't showing up in diskutil? I have an ssd I can't eject and its taken over my pc using windows I don't want to use boot camp to install then delete I want windows gone, it only shows up in the system information?? can you help me?
@EasyOSX
@EasyOSX 6 ай бұрын
Just so I’m on the same page, is this the internal SSD in the Mac or an SSD from another PC
@suzieq8379
@suzieq8379 6 ай бұрын
@@EasyOSX I think it is the ssd from windows , windows is showing up in bootcamp but I don't what to install it on my windows the guy that worked on my Toshiba has remote access and admin over me, I got this Mac thinking he would be gone but he I connected thru my local lan ip he is 1/2 ing it subnet its so disgusting , it show up in my hardware as ms fat 32 or something like that it is not mounted that is greyed out and not sure that he hasn't taken over my Mac phone iPad, can you help me, disk utility has it as internal , says . APPLE SSD SM0128G pic internal physical disk the hardware says 121.33 GB (121,332,826,112 bytes) Model: APPLE SSD SM0128G Revision: BXZ13A0Q Serial Number: Native Command Queuing: Yes Queue Depth: 32 Removable Media: No Detachable Drive: No BSD Name: disk0 Medium Type: Solid State TRIM Support: Yes Partition Map Type: GPT (GUID Partition Table) S.M.A.R.T. status: Verified Volumes: EFI: Capacity: 209.7 MB (209,715,200 bytes) File System: MS-DOS FAT32 BSD Name: disk0s1 Content: EFI Volume UUID: disk0s2: Capacity: 120.99 GB (120,988,852,224 bytes) BSD Name: disk0s2 Content: Apple_APFS bootcamp. say macOS 84gb and windows 37 gb I just don't want to install that I don't have room its taking all my space oh also pci connection I think he installed a card internally on Toshiba to connect to my wifi I have it took apart now the toshiba
@suzieq8379
@suzieq8379 6 ай бұрын
@@EasyOSX Capacity: 121.33 GB (121,332,826,112 bytes) Model: APPLE SSD SM0128G Revision: BXZ13A0Q Serial Number: Native Command Queuing: Yes Queue Depth: 32 Removable Media: No Detachable Drive: No BSD Name: disk0 Medium Type: Solid State TRIM Support: Yes Partition Map Type: GPT (GUID Partition Table) S.M.A.R.T. status: Verified Volumes: EFI: Capacity: 209.7 MB (209,715,200 bytes) File System: MS-DOS FAT32 BSD Name: disk0s1 Content: EFI Volume UUID: disk0s2: Capacity: 120.99 GB (120,988,852,224 bytes) BSD Name: disk0s2 Content: Apple_APFS this is not in disk utility
@suzieq8379
@suzieq8379 6 ай бұрын
@@EasyOSX I don't know where my comments are going?
@EasyOSX
@EasyOSX 6 ай бұрын
So wait it sounds like this is a drive from a Toshiba but the info reads as if it's a boot camp partition on your MacBook? As far as the guy who has access to your network/Toshiba, I think you need to speak to someone local about that sort of hacking, be it your ISP or a local tech person you trust/have a contract with. I think they'd be better able to help you with that part then I can over the web.
@wahoo236
@wahoo236 Ай бұрын
So helpful. I had a SSD that I needed to return after it kept loosing data, and I wanted to wipe my data off it first.
@ascomputerspro
@ascomputerspro 2 жыл бұрын
Error: -69825: Wiping volume data to prevent future accidental probing failed.
@EasyOSX
@EasyOSX 2 жыл бұрын
Usually when this problem comes up it's something to do with the SATA cable connecting the drive to the machine. Either the cable is defective, damaged, or incompatible. By incompatible I mean the drive or machine will only accept a certain SATA generation and not anything newer, for example if the drive is SATA II but the cable is SATA III. How are you connecting the drive to the Mac?
@ascomputerspro
@ascomputerspro 2 жыл бұрын
@@EasyOSX I have tested with both internal SATA III SSD Drive and USB Flash drive. same problem. Error: 69760: Unable to write to the last block of the device. (MacBookPro8,3 Late 2011)
@EasyOSX
@EasyOSX 2 жыл бұрын
That’s an older Mac, but it should be SATA III compatible. You might try running Disk Utility’s First Aid command on it or use the fsck -fy command on it if you’re more Terminal oriented
@rofiihamdi1263
@rofiihamdi1263 6 ай бұрын
Thankyou for this video man, finally i can erase my internal ssd before restore it from old ssd
@fhannon
@fhannon 2 жыл бұрын
Great video! I tried all steps though and when I tried to erase the disk, I'm getting an error: -69877: Couldn't open device Looks like it's unable to create the partition map because of this error. Any tips for this??
@EasyOSX
@EasyOSX 2 жыл бұрын
You might try is running the unmount command. Replace X in the command below with the number of your disk that is giving you that error diskutil unmountDisk /dev/diskX
@lavinchi6709
@lavinchi6709 4 ай бұрын
Thank you so much one more time🌴
@MG-is5bg
@MG-is5bg Жыл бұрын
Thanks a lot, it works for me
@gregboyer3086
@gregboyer3086 9 ай бұрын
Solved my problem. Thank you.
@timmal
@timmal 2 жыл бұрын
Error: -69879: Couldn't open disk :(
@EasyOSX
@EasyOSX 2 жыл бұрын
Hey Timmal. Do you know if any part of that drive you’re trying to erase is currently encrypted?
@timmal
@timmal Жыл бұрын
@@EasyOSX it was used for TimeMachine but I ejected it by mistake during backup. Now it connects unmounted by default and any attempt to mount it was failed
@EasyOSX
@EasyOSX Жыл бұрын
Just to be clear, you're wanting to erase the drive or just mount it and try to recover it?
@timmal
@timmal Жыл бұрын
@@EasyOSX just want to erase
@timmal
@timmal Жыл бұрын
@@EasyOSX just used Disk Drill to fix mount issue
@MG-is5bg
@MG-is5bg Жыл бұрын
Great 👍 underrated work
@ChristianGrytten
@ChristianGrytten 10 ай бұрын
Thank you.
@Billy-hf9tz
@Billy-hf9tz 4 ай бұрын
You are the man!
@y5rdg
@y5rdg Жыл бұрын
Thank you!
@madarab6874
@madarab6874 2 жыл бұрын
Unable to begin erase operation: This operation is restricted by Sandbox; check your settings in System Preferences > Security & Privacy > Privacy > Files and Folders (-69464)
@madarab6874
@madarab6874 2 жыл бұрын
i got this message ?
@EasyOSX
@EasyOSX 2 жыл бұрын
You might not have given your Terminal app permission to access removable drives. Open up System Preferences and go to the path like the error message says. See if you the box labeled "Removable Drives" is checked under Terminal. If it isn't, check that box, then restart the Terminal app (or your whole machine) and try the erase command again.
@madarab6874
@madarab6874 2 жыл бұрын
@@EasyOSX Formatting disk2s2 as Mac OS Extended with name Sucsess newfs_hfs: WriteBuffer: pwrite(3, 0x7fc561221000, 1048576, 272633856): Input/output error newfs_hfs: write (sector 532488): Input/output error Mounting disk Could not mount disk2s2 after erase Error: -69832: File system formatter failed
@madarab6874
@madarab6874 2 жыл бұрын
any help
@EasyOSX
@EasyOSX 2 жыл бұрын
That sounds like the hard drive might be in pretty bad shape. You can try formatting it with the Mac OS Extended (Journaled) instead and see if that helps, but typically I see those errors when the drive has some bad blocks. You could also try formatting it as a different type like ExFAT to see if it gives you the same results
@Schrodinger-xd4pv
@Schrodinger-xd4pv 6 ай бұрын
it got struck in 50%
@EasyOSX
@EasyOSX 6 ай бұрын
At what stage? What kind of erase?
@adamjg4
@adamjg4 6 ай бұрын
160 for u
@EasyOSX
@EasyOSX 6 ай бұрын
I’m sorry, not sure I understand
@billgates3699
@billgates3699 8 ай бұрын
‼️Teaching people while not even able to pronounce “OS X” 😂
@EasyOSX
@EasyOSX 8 ай бұрын
The reason I do that is because people misspelled the channel & site name, so I had to say it that way for traffic and search engine optimization reasons. Now it doesn’t matter as much since we moved past version 10 a long time ago, but the name still sticks.
@usgalsen
@usgalsen 7 ай бұрын
You're the devil that never knows "thank you" & who sees evil everywhere🗑🐍
@producertech
@producertech 5 ай бұрын
THANKS!
@MrFaisal0860
@MrFaisal0860 4 ай бұрын
Thank you☺
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 20 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 15 МЛН
Absolute BEGINNER Guide to the Mac OS Terminal
17:03
Percy Grunwald from TopTechSkills
Рет қаралды 787 М.
Do You Need To Secure Wipe a Mac Drive?
8:20
macmostvideo
Рет қаралды 23 М.
Force an External Mac Drive to Mount via Command Line Terminal Commands in Mac OS X
6:59
Gemsbok Apple Tips and Tricks
Рет қаралды 339 М.
Transform Your Base Mac Mini into a 2 TB Super Mini! DIY GUIDE
20:27
Mac Sound Solutions inc.
Рет қаралды 182 М.
How Should You Format An External Drive For a Mac?
6:56
macmostvideo
Рет қаралды 363 М.
How to Erase a Disk Using Terminal on macOS
7:17
Macintosh Team
Рет қаралды 775
How A Steam Bug Deleted Someone’s Entire PC
11:49
Kevin Fang
Рет қаралды 1 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 20 МЛН