Resolved it is possible to erase a bootable flash drive

Discussion in 'Mac Basics and Help' started by mud25, Jul 10, 2011.

  1. mud25, Jul 10, 2011
    Last edited: Jul 11, 2011

    mud25 macrumors newbie

    Joined:
    Apr 18, 2011
    #1
    Solution: hdiutil unmount /dev/disk3 in terminal
    then go into disk utility the erase the disk
    :apple::apple::apple::apple:
    i was making a bootable flash drive and i screwed up bad (i had the wrong extension on the file) i was wondering if it is possible to erase the volume with a terminal command or some thing it is telling me i dont have significant privileges i tried "sudo rm -rf /Volumes/Ubuntu-Server\ 11/ " but to no avail
    rm: /Volumes/Ubuntu-Server 11//preseed: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//README.diskdefines: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//ubuntu: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//.disk/base_components: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//.disk/base_installable: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//.disk/cd_type: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//.disk/info: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//.disk/udeb_include: Read-only file system
    rm: /Volumes/Ubuntu-Server 11//.disk: Read-only file system
    rm: /Volumes/Ubuntu-Server 11/: Resource busy
    thees are the last lines after trying pleas i need to use the flash drive for bigger and better things:apple:
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    If you just want to wipe it can you not delete whatever partition structure is on it and re-create using Disk Utility?
     
  3. mud25 thread starter macrumors newbie

    Joined:
    Apr 18, 2011
  4. simsaladimbamba, Jul 10, 2011
    Last edited by a moderator: Jul 10, 2011
  5. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #5
    Start Disk Utility. Select the Flash drive (not partition) from the list on the left. Select the Partition tab. Then use the +/- buttons to add/erase partitions or use the "Volume Scheme:" selector to select a new number of partitions.

    B
     
  6. mud25 thread starter macrumors newbie

    Joined:
    Apr 18, 2011
  7. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #7
    Is it by any chance the MacBook Air USB Restore Drive?
     
  8. mud25 thread starter macrumors newbie

    Joined:
    Apr 18, 2011
  9. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #9
    No, that may have explained though why you can't do it, as the MBA Recovery Drive is somehow write protected, but there are ways around it.

    What exact USB flash memory thumb drive do you use and how is it formatted (file system/format and partition map scheme)?
     
  10. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #10
    Make sure you don't have the drive mounted, e.g. Having a Terminal.app window open with a folder on the drive as your current working directory.

    B
     
  11. mud25, Jul 10, 2011
    Last edited by a moderator: Jul 10, 2011

    mud25 thread starter macrumors newbie

    Joined:
    Apr 18, 2011
    #11
    sandisk micro 2gb
    with this command sequence

    diskutil unmountDisk /dev/disk5

    sudo dd if=/Users/icossette/Desktop/ubuntu-11.04-server-amd64.iso of=/dev/disk5 bs=1m

    diskutil eject /dev/disk5

    hdiutil convert -format UDRW -o ~/Users/icossette/Desktop/ubuntu-11.04-server-amd64.iso

    what :eek: elaborate im confused
     
  12. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #12
    Close all applications that might access the USB flash memory thumb drive and also close all Finder windows, that might have the USB flash memory thumb drive selected.
    Then try again.
     
  13. mud25, Jul 10, 2011
    Last edited: Jul 10, 2011

    mud25 thread starter macrumors newbie

    Joined:
    Apr 18, 2011
    #13
    did not change a thing it says this disk is not write able
    how can i override this and delete all of the files off the drive and rerun the drive to its factory settings
    :apple::apple::apple::apple::apple::apple::apple::apple::apple::apple::apple:


    RESOLVED hdiutil unmount /dev/disk3
    "disk3" unmounted successfully. after this i was able to go into disk utility and erase the volume thank god
    thank you all for trying to help me
     
  14. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #14
    Something was holding on to it, which is why I said:

    B
     
  15. mud25, Jul 11, 2011
    Last edited: Jul 11, 2011

    mud25 thread starter macrumors newbie

    Joined:
    Apr 18, 2011
    #15
    i was looking for the command and i was not smart enough to understand what they were saying
    no elaboration was given as to what command to use
    no command there

    whats up with ending the you posts with
    Demi-God
     
  16. chsweb, Dec 3, 2016
    Last edited: Dec 3, 2016

    chsweb macrumors newbie

    chsweb

    Joined:
    Oct 8, 2015
    Location:
    Charleston, SC
    #16
    Confirmed to work, here are the steps simplified for anyone who may find this thread in the future:

    SCENARIO:
    Flash drive has a Mac OS bootable installation on it and your needs delete the old OS so you can install a new OS.

    PROBLEM:
    When you try to delete the disk in Disk Utility, it fails. The flash drive may also be ejected after failing to be erased in Disk Utility.

    HOW TO FIX:
    1. Mount the flash drive again, if its s not already, by removing it and plugging it back in.
    2. Open terminal
    3. type hdiutil unmount [driveName] - replace "[driveName]" with the name of the Flash Drive. For me, when I inserted the flash drive, a window auto-opened with the name "Yosemite Install Disk - 10.10.1" My terminal command looked like this: hdiutil unmount Yosemite Install Disk - 10.10.1
    4. Press enter
    5. That should unmount the flash drive (see Note below).
    6. Open Disk Utility
    7. Select your Flash Drive in the left column of Disk Utility
    8. Click erase at the top of Disk Utility
    9. You should get a message that Disk Utility has erased the drive
    10. You should now be able to follow the steps to create a new bootable drive. (scroll down to "Create a Bootable Installer")

    Note:
    Terminal may give you a message similar to this after running the unmount command:
    hdiutil: unmount: Only a single file can be specified.
    Usage: hdiutil unmount [options] <mountpoint>
    hdiutil unmount -help
     
  17. Zazoh macrumors 6502a

    Zazoh

    Joined:
    Jan 4, 2009
    Location:
    Mico, Texas
    #17
    Kudos to you for finding an old post on this to attach a solution. ;)
     

Share This Page