Installing UbuntuMate using ddrescue fails

The ddrescue command specified in https://ubuntu-mate.org/raspberry-pi/ fails with “write error”. The SD card is 16G in size, completely empty, and not write protected.

Here’s the output:
<<
sudo ddrescue -D --force ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img /dev/mmcblk0
GNU ddrescue 1.19
Press Ctrl-C to interrupt
rescued: 1376 kB, errsize: 0 B, current rate: 196 kB/s
ipos: 1376 kB, errors: 0, average rate: 688 kB/s
opos: 1376 kB, run time: 2 s, successful read: 0 s ago
Copying non-tried blocks… Pass 1 (forwards)
ddrescue: Write error: Input/output error

lsblk yields this:
<<
georg@gadogado:~/Downloads$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 111.3G 0 part
└─sda5_crypt 252:0 0 111.3G 0 crypt
├─ubuntu–vg-root 252:1 0 103.4G 0 lvm /
└─ubuntu–vg-swap_1 252:2 0 7.9G 0 lvm
└─cryptswap1 252:3 0 7.9G 0 crypt [SWAP]
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 390.6G 0 part /media/Data
├─sdb2 8:18 0 390.6G 0 part /media/Data2
├─sdb3 8:19 0 1K 0 part
└─sdb5 8:21 0 52.6G 0 part
sr0 11:0 1 1024M 0 rom
mmcblk0 179:0 0 14.9G 0 disk
├─mmcblk0p1 179:1 0 63M 0 part /media/xxx/PI_BOOT
└─mmcblk0p2 179:2 0 4.6G 0 part

Don’t use ddrescue. It fails.

Run; sudo dd bs=4M if=ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img of=/dev/sdX status=progress conv=fsync

/dev/sdX is your SD card

I ran above command to install ubuntu-mate on microSD card without problem.

Regards
satimis

1 Like

I have not tried installing UM onto an SD card, but I see nothing wrong with using good 'ol dd here. It achieves what ddrescue is attempting and failing to do, and always wrong. If it ain’t broke, don’t fix it. :smiley:

I always use sudo dd bs=4M if=path/to/ubuntu-mate.iso of=/dev/sdx status=progress && sync to make bootable USB keys for UM. Never fails. :slight_smile: Just be careful with dd, it can wipe out your hd if you give it the wrong device. It may be a bit different installing to an SD card so check that out first. Not sure about the conv=fsync flag satamis puts in his command, is this a special flag for making a bootable SD card?

fsync forces a physical write of output data and metadata