https://ubuntu-mate.org/raspberry-pi/
After downloading and decompressing the img file, instructions tell you to use
sudo ddrescue -d -D —force ubuntu-mate-15.10-desktop-armhf-raspberry-pi-2.img /dev/sdX
which fails with a
ddrescue: Can't open input file: Invalid argument
but why?.. because fuck you, that's why, syntax is perfectly fine, and it even fails with absolute paths, so no fucking reason at all, anyway.. using the good old dd works fine:
sudo dd bs=4M if=ubuntu-mate-15.10-desktop-armhf-raspberry-pi-2.img of=/dev/mmcblk0
in addition, in a separate terminal you can use
sudo pkill -USR1 -n -x dd
to display progress, progress will be shown in the terminal writing the image.
Now just to be safe, type sudo sync to let all remaining operations finish, then you can safely remove the microSD card and boot your rpi2.
yaaay! we can see it booting and getting to the beautiful system configuration page, select your preferred settings and let it install everything for you and reboot.
Now login, connect to the network and update all packages:
sudo apt-get update && sudo apt-get upgrade
time to resize file system to use all our microSD storage:
sudo fdisk /dev/mmcblk0
d,2
n,p,2,enter,enter,w
reboot
sudo resize2fs /dev/mmcblk0p2
surprisingly enough, the last command gave me a "Permission denied to resize filesystem", even as root, it was complaining about "on-line resizing required", I went the easy way and resized it monuted in my laptop.
I had to go into recovery mode and run e2fsck to fix several issues, reboot again and rerun the command, it turned out to be a bad setting, I was using bs=1M in the dd command, that created wrong desc_blocks, so always use 4M.
We now have the 100% of our storage available, time for next steps:
Some useful packages are not installed
sudo apt-get install vim htop ntpdate
Date/Time is normally wrong
Run and create a init script with this line:$ sudo ntpdate -u ntp.ubuntu.com
$ sudo vi /etc/init.d/time-sync
> /usr/sbin/ntpdate -u ntp.ubuntu.com
$ sudo chmod +x /etc/init.d/time-sync
$ sudo update-rc.d time-sync defaults
Some overclocking settings, if you have a good power source
#safe overclockarm_freq=1000
#arm_freq_min=400
sdram_freq=500
#sdram_freq=250
core_freq=500
#core_freq=250
over_voltage=6
temp_limit=80
boot_delay=0
disable_splash=1
gpu_mem=256
initial_turbo=60
#extreme speed, VOIDS WARRANTY!!
gpu_mem=256
force_turbo=1 #Voids warranty!
arm_freq=1100
sdram_freq=500
core_freq=500
over_voltage=6
temp_limit=80 #Will throttle to default clock speed if hit.
boot_delay=0
disable_splash=1