Tag Archives: linux

Boot Partition in Ubuntu Keeps Running out of Space After Upgrade to 18.04

After I upgraded to the latest LTS from Ubutnu, namely 18.04, I was finding I could never have more than two kernels installed at a time. /boot kept running out of space and updates would fail. Running sudo apt autoremove && sudo apt autoclean would resolve the issue until the next upgrade. This was tolerable until I needed to install both a generic and a low-latency kernel.

Looking at my df output it almost seemed as if the upgrade swapped my efi and boot partitions. My efi partition was 500MB and my boot partition only 250MB! The solution I found was to resize the partitions to make the efi partition 100MB and the boot partition 650MB. This process wasn’t as easy or smooth as I initially thought, so I figured I would document what it took to make it work.

Step 1 – Boot a Live USB

First thing you need is to have a liveUSB from ubuntu that you can boot into:

Create a Bootable USB Drive in Ubuntu

Boot into this drive, selecting “Try Ubuntu Without Installing”

Step 2 – Resize the Drives

After Ubuntu boots, open a terminal and type sudo gparted. In gparted, resize your efi drive to 100MB first, then resize your boot partition into the remaining space. Make sure no flags are set for the boot partition and the boot,esp flags are set for the EFI partition.

When you resize the EFI System Partition, it will change to fat16. This needs to be reformatted back to fat32 to work. Once this is done right click on efi partition, and select New UUID. Once this is done apply all settings and quit gparted.

Step 3 – Install and Run Boot Repair

Now you need to install and run boot repair from withing the live USB environment.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Once boot repair loads, click the recommended repair button and follow onscreen instructions.

Once you are done, reboot!

Amazon Kindle Fire 5.3.1 Hacked – Rooted and new Rom

I just purchased a Amazon 5th gen kindle fire to use as a ground station for my drones. The device supports OTG and has the power needed to run the 3dr usb telemetry device.

Out of the box the fire is kind of useless for anything but an e-reader amazon buying tool.  Rooting and a ROM upgrade solves this! It is fairly simple, however the process is time consuming with lots of waiting (have something else to do like a book or a movie while you’re waiting on certain processes).

Step 1: Make sure you have 5.3.1.0 fire OS installed on device
Go to Settings -> Device Options -> Software Updates to check the version. My device shipped with 5.3.1.0 so I did not need to load a different firmware. Your mileage may vary.

If version is less than 5.3.1.0 follow This Guide instead.

If version is greater than 5.3.1.0 follow these instructions to install the 5.3.1 firmware. download from here

DO NOT attempt to downgrade a > 5.3.1.0 device below 5.3.1.0!!! This it will BRICK your fire.

Once version is 5.3.1.0 go to step 2

Step 2: Reset to factory settings
Go to Settings -> Factory Reset and perform a factory reset. This will reboot the device.

When device boots skip all set up and do not connect to WiFi yet (this will slow down any unwanted update process).

Step 3: Enable Developer Mode
Go to Settings -> Device Options and tap the build number seven times to enable dev mode.
Go to Settings -> Device Options -> Developer and turn on USB debugging and ADB.

Step 4: Download needed files
Download the latest SuperTool from RootJunky and extract somewhere you will remember.

Download the latest Nexus ROM for Fire Tablet but DO NOT extract it.

Step 5: Run SuperTool
From a command line navigate to the SuperTool folder and run the appropriate file. In Linux the command is
$ ./3-Amazon-Fire-5th-gen-linux-mac.sh
You will see a screen like this:

Press 2 and Enter to root device. First it will install KingRoot to your device which you will then have to run from your device when directed to do so. KingRoot will ask you to connect to WiFi.

You will likely have to run KingRoot repeatedly before it will work. Time to grab a book or a movie as this part takes time. Each time you run KingRoot it will reboot your device a few times and show progress on the screen. Each attempt takes about 10-15 minutes or more. After the first attempt I unplugged my device from the computer and had to run KingRoot a total of 4 times before it worked. Just keep trying.

Once root is gained plug your Fire back into the computer (you may need to cycle the ADB setting on your device for it to be recognized) and continue the SuperTool process following all instructions there. This will install SuperSu which will need interaction from you on the device. Follow the setup procedure according to the instructions in SuperTool.

Once this process is done run “Block OTA updates” to prevent accidentally losing root access.

Step 6: Install Rom via FlashFire
While still in SuperTool install FlashFire (option 6).

From your computer copy the zipped ROM file downloaded in Step 4 over to the INTERNAL storage of your Fire device.

On your device run FlashFire and follow these steps exactly, otherwise you risk the installation having problems:

Select the red plus (+) button to expand a selection of options, choosing Wipe.
Select System data, 3rd party apps, and Dalvik cache if they are not already checked.
Click the red plus (+) button again and choose Flash ZIP/OTA.
Search for the Nexus ROM that you’ve copied over and choose it.
Automount and Mount /system read/write need to be unchecked.
Drag Wipe to the top of the queue.

Hit the flash button to start the process.

This will take a few minutes and the screen might go blank for a while. It will eventually boot into the new ROM.

Step 7: Enjoy!
With new ROM installed be sure to update Google first. After it updates clear google app and framework cache and reboot.

Install apps. You will need EVERYTHING as this is a very vanilla ROM.

OTG works great with APM/Tower or DroidPlanner software.

Much faster, full play store support and NO ADS! Yay!

Configure Tarot 2D Gimbal on Linux / Wine

Having trouble getting serial devices in Linux to show up as COM ports ( eg, COM1 ) in Wine? So was I. Getting the correct software to configure your Tarot Gimbal and getting the com ports to work can be a nightmare.

Problem solved! Read on!

So you have a Tarot Gimbal and the included USB programming dongle.

On your *nix machine ( I am using Ubuntu, your mileage may vary ):

Make sure user has dialout privileges:

$ sudo usermod -a G dialout username

Log out and back in.

Install Wine:

$ sudo apt install wine

Configure wine to run XP

$ winecfg

Add required items to Wine registry (~/.wine/system.reg):

[Hardware\\Devicemap\\Serialcomm] 1231984861
"Serial0"="COM1"

More info here: https://onetransistor.blogspot.com/2015/12/wine-serial-port-linux.html

Plug in your USB to serial adapter to computer. Link device (ttyUSB0 in my case) to Wine com1

$ ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

Download programming software: ZYX-BMGC-EN_V1.5.zip

Uncompress the file, right click on main application and select run with Wine.

Plug in connector on USB to Gimbal.

Select COM1 in software and click connect.

Power on drone/gimbal.

Hack Away!