The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,887 other followers

Archive for the ‘Ubuntu’ Category

Using a Mac for prepping the SD-card for an ODROID-C1+

Posted by jpluimers on 2018/02/12

Some notes based on The woods and trees of OpenSuSE on single-board computers – image abbreviations – and getting it installed using OS X « The Wiert Corner – irregular stream of stuff.

I needed to get Ubuntu on an ODROID-C1+ (as it looks like nobody is maintaining a current OpenSuSE for it).

Installing the ODROID-C1+ image using OS X

Download image

Download either of these (note that “minimal” is different from “mate minimal”; see https://www.youtube.com/watch?v=jOYWx_YToh8) from de.eu.odroid.in/ubuntu_16.04lts:

Put image on SD card

I installed on a 8 gigabyte SD card that revealed itself as /dev/disk1 using this diskutil command (via osx – List all devices connected, lsblk for Mac OS X – Ask Different [WayBack])

diskutil list

So this wrote the image to SD card in a sudo su - prompt:

targetDevice="disk1"
unxz --keep ubuntu-16.04-minimal-odroid-c1-20160817.img.xz; \
diskutil umount "/dev/${targetDevice}s1"; \
dd bs=1m of="/dev/r${targetDevice}" if=ubuntu-16.04-minimal-odroid-c1-20160817.img; \
sync; \
diskutil list; \
diskutil eject "/dev/${targetDevice}"

Boot and first time steps on Odroid

Use the default user and password that [WayBackODROID Forum • View topic – Ubuntu Minimal User / Password mentions:

odroid login: root
Password: odroid

From there, create a new user and add it to the sudo group (I used visudo to check the correct group for sudoers) :

adduser jeroenp
addgroup jeroenp sudo

And then hook it up to the network and get the IP address:

ifconfig

Now you can ssh into the odroid with user jeroenp and the password assigned to it. You can also perform a sudo su - to get to root level.

ssh and configure a few things

First of all, install etckeeper as it’s a life saver:

apt-get install etckeeper

This will install some other packages, but that’s OK; it will end suggesting you to enter email address, name and perform an initial commit:

Initialized empty Git repository in /etc/.git/

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@odroid.(none)')
etckeeper commit failed; run it by hand

Do that:

cd /etc
git config --global user.email "example@example.org"
git config --global user.name "Example User"
git commit -m "initial commit"

Now perform these steps:

  1. Change the root password
  2. Disable etckeeper daily autocommits
  3. Change the hostname
  4. Update/Upgrade/Distribution-upgrade
  5. Fix the cursor in console mode

Change root password:

# sudo su -
# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Disable etckeeper daily autocommits involves one line in /etc/etckeeper/etckeeper.conf:

-#AVOID_DAILY_AUTOCOMMITS=1
+AVOID_DAILY_AUTOCOMMITS=1

Change the hostname; assuming your new host name is newHostName.

  1. edit /etc/hosts and replace the old hostname with newHostName
  2. Perform these commands:
    hostnamectl set-hostname newHostName
    exec bash
    hostname -f

Both the command prompt and the hostname output should show newHostName.

Update/Upgrade:

apt-get update
apt-get upgrade

Fix the cursor in console mode:

Somehow the Odroid C1+ does not support a blinking hardware text cursor.

 

–jeroen

Posted in Development, Hardware Development, Linux, Odroid, openSuSE, Raspberry Pi, SuSE Linux, Tumbleweed, Ubuntu | Leave a Comment »

Odroid-C1 (and likely others): fixing the textmode cursor on the physical console

Posted by jpluimers on 2018/02/05

Somehow the Odroid C1+ does not support a blinking hardware text cursor. Which means that when you logon to the console in text mode, it is really hard to edit the command-line or text files a there is no visual clue where the cursor is.

It took me to find out the cause, but odroid C1 console no “hardware cursor” got me there: [Archive.isArch Linux ARM • View topic – ODROID-C1: No hardware cursor in terminal. The odd thing is that sending escape sequences like mentioned in [WayBackCursor Appearance in the Linux Console LG #137 didn’t fix the problem either. For instance, these didn’t help at all:

echo -n -e '\e[?17;14;224c'
echo -e "\e[?16;0;64c"

I tried similar ones from [WayBackVGA-softcursor.txt as well, but they failed too.

Since I usually ssh into the box, doing without a console cursor usually is no problem except when you run into network trouble and really need the console.

Fixing it took a bit longer to find out,  but refining to  “odroid C1” console no blinking cursor got this as first hit: [WayBackODROID Forum • View topic – fbcon cursor. And it came down to going to the second page of the first archived link above. So I had a kind of “duh” moment. Anyway, at [WayBackArch Linux ARM • View topic – ODROID-C1: No hardware cursor in terminal – pagee 2 is the below code which got me a nice large light-blue cursor:

infocmp >> ~/terminfo.txt
sed -i.bak -e 's/?0c/?112c/g' -e 's/?8c/?48;0;64c/g' terminfo.txt
tic terminfo.txt
tput cnorm

These are the commands used:

–jeroen

Posted in *nix, Linux, Power User, Ubuntu | Leave a Comment »

When clonezilla shows “overlayfs missing workdir” during boot, then hangs

Posted by jpluimers on 2018/01/22

Clonezilla is a nice partition cloning tool, but sometimes booting it just gives you this message on the screen:

overlayfs missing workdir

As it’s the first message during boot, searching for clonezilla “overlayfs missing workdir” returns no meaningful results towards the top of the list.

From what I could trace back from the search results is that somewhere before 2.4.x this started to happen in the “stable” branch.

There are actually two branches that in practice are stable on the http://clonezilla.org/downloads.php:

  • alternative stable (which doesn’t have a version number but a YYYYMMDD date followed by -yakketty)
  • stable (which has a version number)

I think because of the naming, people usually start downloading the stable version. That doesn’t boot on most of the physical and virtual machines I’ve tried.

In my experience however, alternative stable doesn’t suffer from the overlay missing workdir issue on all the physical and virtual machines I’ve tried booting it with so far.

So I did some digging:

  • alternative stable is often referred to a alternative but it’s an Ubuntu-based branch running the same clonezilla software as the stable branch
  • stable is the Debian-based branch.
  • Ubuntu is based on Debian but Ubuntu releases in a much faster pace than the release frequency of Debian Stable.
  • Ubuntu has support for more recent hardware than Debian

TL;DR: Use alternative stable when stable fails to boot.

–jeroen

Posted in *nix, Debian, Power User, Ubuntu | Leave a Comment »

Ubuntu – changing hostname without rebooting

Posted by jpluimers on 2018/01/15

Assembled from various bits in [WayBackHow do I change the hostname without a restart? – Ask Ubuntu.

Assume your new host name is newHostName.

  1. edit /etc/hosts and replace the old hostname with newHostName
  2. Perform these commands:
    hostnamectl set-hostname newHostName
    exec bash
    hostname -f

Both the command prompt and the hostname output should show newHostName.

Note: if you get this when performing hostname -f then you forgot to edit /etc/hosts as per [WayBack] Just so everyone knows, the edit of /etc/hosts did the trick the 12.04 – Why I get hostname: Name or service not known error? – Ask Ubuntu:

hostname: Name or service not known

–jeroen

Posted in *nix, Linux, Power User, Ubuntu | Leave a Comment »

Casting the audio of application on your Linux machine via Chrome to a ChromeCast

Posted by jpluimers on 2017/02/06

Hopefully by now mkchromecast [WayBack] works on more Linux versions (and maybe even Mac OS X is better supported [WayBack]), but back then it was only available for Ubuntu 16.10 and up:

Do you want to stream the audio from Rhythmbox, VLC or another Linux app to your TV through Chromecast? Well, we’ve found a nifty little Linux tool that lets you do just that.

Source: How to Send Your Linux Desktop Audio to a Chromecast – OMG! Ubuntu!

The tool is at github: Linux · muammar/mkchromecast Wiki  [WayBack]: mkchromecast – Cast macOS, or Linux Audio to your Google Cast Devices

–jeroen

via:

Posted in *nix, Chrome, Chromecast, Google, Linux, Power User, Ubuntu | Leave a Comment »

 
%d bloggers like this: