Mistake on run command "dd if=..."

Discussion in 'MacBook Pro' started by Gudabu, Dec 30, 2015.

Tags:
  1. Gudabu macrumors newbie

    Gudabu

    Joined:
    Dec 30, 2015
    Location:
    Córdoba, Argentina
    #1
    I made a mistake when was trying to create a Bootable USB Stick with a Win 7 image to install on my Mother's pc... I accidentally executed the command before put the `of=/dev/disk1 bs=1m` part, so just ran `sudo dd if=/Users/username/Desktop/WIN7.iso` :( ... I pressed "ctrl+c" immediately, but was too late!

    Now when run `diskutil list` shows me another disk (/dev/disk1) and I can´t figure how to unmount/delete it!

    Can anyone help me?

    Code:
    $ diskutil list
    
    Output:
    ----------
    /dev/disk0 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *500.3 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:          Apple_CoreStorage Macintosh HD            499.4 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    /dev/disk1 (internal, virtual):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                  Apple_HFS Macintosh HD           +499.1 GB   disk1
                                     Logical Volume on disk0s2
                                     ADF9C60B-D92F-490D-A3DA-3947E3B53891
                                     Unencrypted
    -------------
     
  2. ifrit05 macrumors regular

    ifrit05

    Joined:
    Dec 23, 2013
    Location:
    Near Detroit, MI. USA
    #2
    Well the if= part is only telling the program the "Input File", so nothing should of been wiped.
    Disk1 should be the USB stick but it looks like it's a virtual copy of your main OS partition.

    If rebooting does not clear the list of mounted disks/partitions then maybe running sudo diskutil unmount disk1 may work.

    Or open up Disk Utility in the Utilities Folder and wipe the disk using the GUI.
     
  3. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #3
    What you are seeing there is normal and nothing is wrong. That second disk1 you are seeing there is just a logical volume that is created when you turn on FileVault2 encryption, which you appear to have done.
     
  4. Gudabu thread starter macrumors newbie

    Gudabu

    Joined:
    Dec 30, 2015
    Location:
    Córdoba, Argentina
    #4
    Hi @Weaselboy and @ifrit05

    I was very sure that "/dev/disk1" not existed before I executed the command, meant disk1 was the usb, but now isn't connected.

    I never turn-on "FileVault2 encryption"...

    Code:
    $ sudo diskutil unmount disk1
    
    Volume Macintosh HD on disk1 failed to unmount: dissented by PID=0 (kernel)

    Code:
    $ diskutil cs list
    
    CoreStorage logical volume groups (1 found)
    
    |
    
    +-- Logical Volume Group C78ABE25-01BB-4C6E-92E0-53EE8CE8497C
    
        =========================================================
    
        Name:         Macintosh HD
    
        Status:       Online
    
        Size:         499418034176 B (499.4 GB)
    
        Free Space:   0 B (0 B)
    
        |
    
        +-< Physical Volume 65682AF6-F5FF-4D7F-A554-0A10E73A0094
    
        |   ----------------------------------------------------
    
        |   Index:    0
    
        |   Disk:     disk0s2
    
        |   Status:   Online
    
        |   Size:     499418034176 B (499.4 GB)
    
        |
    
        +-> Logical Volume Family 1CF9D735-B764-49E5-A306-927F796CFA39
    
            ----------------------------------------------------------
    
            Encryption Type:         None
    
            |
    
            +-> Logical Volume ADF9C60B-D92F-490D-A3DA-3947E3B53891
    
                ---------------------------------------------------
    
                Disk:                  disk1
    
                Status:                Online
    
                Size (Total):          499099262976 B (499.1 GB)
    
                Revertible:            Yes (no decryption required)
    
                LV Name:               Macintosh HD
    
                Volume Name:           Macintosh HD
    
                Content Hint:          Apple_HFS
     
  5. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #5
    I'm sorry... I misread "Unencrypted" as encrypted there. Still totally normal and no way this was caused by that command.

    What happened is Yosemite and El Capitan convert the volume to a core storage volume if the Mac is a Mac portable an on a newer CPU that supports AES-NI. This happens on its own during the install process and you would not have seen it. The core storage logical volume is what you are seeing there as disk1.

    It has been there all along and you just did not notice it.
     
  6. jsnuff1 macrumors 6502a

    Joined:
    Oct 4, 2003
    Location:
    NY
    #6
    You should probably not run terminal commands if you don't know what your doing. You could have very easily wiped you main drive with that command. There are plenty of GUI apps that run those commands for you.
     

Share This Page