0

I have looked through the other questions here on AU, and none of them seem to help me deal with this particular problem, so I am starting a new question.

For some context, all I am trying to do is install the Ubuntu Rescue Remix image onto an external USB drive. I am currently running these commands on my iMac, according to the steps made available via the Ubuntu Rescue Remix instructions.

My problem is that even after I unmount [but not eject] the destination USB drive (assigned to /dev/disc4); I still get the Operation not supported error, which (I think) is the error someone gets when trying to run a dd operation on a mounted drive (or "Resource Busy" error).

So here is the command I run:

sudo dd if=ubuntu-rescue.img of=/dev/disc4 bs=1m

And here is the result I get:

dd: /dev/disc4: Operation not supported

The output I get from running diskutil list:

...
/dev/disk4
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.3 GB     disk4
   1:                 DOS_FAT_32 8GBUSBFLASH             8.3 GB     disk4s1

So can anyone help me understand why I can't seem to run the dd command on /dev/disc4, even after it has been unmounted, yet not ejected?

Thanks!

Update: Someone cited this answer as a potential solution to my question, so perhaps someone might find an answer there, but my question is unique, because it is asking in the context of dd operations, and the errors resulting from my dd operations --- the suggested answer doesn't talk about dd operations at all, so it can't serve as an answer to my problem.

11
  • shouldn't a usb drive usually show up as a scsi drive? Maybe you should try to use /dev/sdX instead of /dev/disc4? Dec 28, 2014 at 13:50
  • @LittleByBlue Running the command as you suggested gives me this error: dd: /dev/sdx4: Operation not supported, similar to the error I am already getting. Dec 28, 2014 at 13:51
  • replace sdx with sdc or sdd in your case it should be /dev/sdd and write it not to sdd4 but to sdd Dec 28, 2014 at 13:54
  • @LittleByBlue, same result: Operation not supported Dec 28, 2014 at 13:56
  • 1
    Possible duplicate of How do I get my Mac to boot from an Ubuntu USB key? Feb 11, 2016 at 23:15

4 Answers 4

3

Solution

There is (normally) no device called /dev/discY.

You will have to find your device using ls /dev|grep sd

this will return you someting like

$ ls /dev|grep sd
sda
sda1
sda2
sdb
sdb1
sdc
sdc1

then you mount the partition, of wich you think it could be your usb-stick

and see if it is the right device.

mount /dev/sdc1 /mnt && ls /mnt

if it is it, unmount it

umount /mnt

and use

dd if=whatever.img of=/dev/sdc

to write the image to the device.

Explanation

Ubuntu seperates four kind of device types:

  1. scsi drives

    these are today the most common. They are under the name sdX

    (sd = scsi drive) the the partitions are called sdXY.

    X is always a small letter starting from a and Y always an integer starting from 1 .

    usb works with a kind of scsi protocoll, too.

  2. parallel drives

    these are called hdX for hard drive.

  3. removable devices (without usbs)

    these are called srY for optical drives, Y is here an integer starting from 0.

    fdY are floppys and so on..

  4. Tapes

    are called nstY (guess what Y is) but you will most likely never face a tape.

The are all listed in the directory /dev/ dev for device.

1

You need to find the right location of your usb drive before you run dd. In my experience usually usb storage devices are located at /dev/sd*.

Check the output of lsblk to know where your usb drive is located.

Then use that location in dd. of=/dev/sd*

0

The most hassle-free way to find out which device-name a certain disk/drive/unit has:

  1. Mount the disk via the GUI (e.g. Nautilus)
  2. Open a shell and type lsblk, press ENTER

The "MOUNTPOINT" column will have the label of the disk as in /media/$USER/label - assuming it has a label.
If there is no label, then unmount the disk and re-run lsblk - compare the lists.

As you know the /dev/xxx device name running dd should work nicely with it unmounted and using sudo.

0

Probably it's disk not disc.

Unmount with diskutil unmountDisk disk1 (or whatever disks shows you the command:diskutil list)

and then sudo dd if="the iso file name" of=/dev/disk1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .