# Installing Ubuntu on an RCA Cambio 2-in-1
## Cheapo MS Surface clones on Linux!
### 20180925

So over my last days off, I bought an [RCA Cambio][1]
from WalMart (I paid $140 for mine, Amazon on the link above sells
them for $118) which is an Intel Atom 2-in-1 tablet that comes with
Windows 10, 32gb ssd, 2gb RAM, and a touchscreen. Not stelar, but
it'll do the job.

The hurdle to installing Linux on these devices is they have a 64bit
processor, and use 32bit UEFI. So Most live usb installers will
choke on them. To get past this, I used [isorespin][2].
This script allows you to customize an ISO image for these Atom-based
devices.

I downloaded the Ubuntu ISO image on my Void Linux Thinkpad, and
created a directory in the root of the thinkpad chmod'd 0777. I then
copied the ISO to this directory along with the isorespin.sh script.
After this, I booted the laptop up with a Linux Mint thumbdrive I
had laying around (you need a ubuntu/debian based distro for this),
and modified /etc/sources/sources.list on the live USB to point to
actual Linux Mint repos (not the CDLive repo). Then:

sudo apt -y install p7zip-full bc curl klibc-utils iproute2 genisoimage dosfstools
sudo apt -y install squashfs-tools rsync unzip wget findutils xorriso

Followed by:

cd <directory I made>
./isorespin.sh -i <ISO image> -u --upgrade --atom -p <some software I wanted to add>

Then:

dd if=<my new iso> of=/dev/sdx bs=64k conv=noerror,sync status=progress

EDIT: /dev/sdx above is an additional USB flash drive I inserted into
the thinkpad. Use lsblk to find the correct device after insertion.
Do not overwrite your live USB, and if you already run Debian/Ubuntu/
Mint/etc, then you needn't boot to a live USB at all, use sense...

Boot up the Cambio with the drive, install Linux. Do not try to dual
boot with Windows 10, will not work.

You will need to issue an:

xrandr -o right

to orrient the screen correctly in lanscape mode and:

xrandr -o normal

for portrait. The touch screen (Goodix Touchscreen Device) will be
inverted in ladscape mode. The command to fix this in landscape is:

xinput list

(note the ID of the touchscreen)

xinput set-prop <ID #> "libinput Calibration Matrix" -1 0 1 0 1 0 0 0 1

Both the xrandr and xinput commands are in my ~/.config/i3/config.
I set Ubuntu to not boot to gui and have I3 in my ~/.xinitrc if I
want to startx.

Wifi works, touch works, sound doesn't yet (I'll get to it, it is
just not important to me on this device)... overall I am pleased with
it and consider it a good purchase.

[1]: https://www.amazon.com/RCA-Cambio-Tablet-Windows-Keyboard/dp/B077S2YRF4/ref=pd_sbs_147_2?_encoding=UTF8&pd_rd_i=B077S2YRF4&pd_rd_r=624d24b5-c105-11e8-a6af-01eb2f54162e&pd_rd_w=sVcN8&pd_rd_wg=aGaMO&pf_rd_i=desktop-dp-sims&pf_rd_m=ATVPDKIKX0DER&pf_rd_p=0bb14103-7f67-4c21-9b0b-31f42dc047e7&pf_rd_r=JJED0CNTTT2AEKY1WJ8H&pf_rd_s=desktop-dp-sims&pf_rd_t=40701&psc=1&refRID=JJED0CNTTT2AEKY1WJ8H
[2]: https://linuxiumcomau.blogspot.com/2017/06/customizing-ubuntu-isos-documentation.html