Category Archives: Linux - Page 3

An introduction into the Tegra (boot) world

Tegra Logo

Tegra Logo

This blog post provides a big picture of the Linux Tegra OSS world. The Wikipedia article about Tegra serves well to get an overview of the Tegra SoC in general, especially from the hardware side.

Linux/Android software provided from NVidia for the Tegra processors are generally known as Linux for Tegra (L4T). Beside the Kernel and its sources, this includes proprietary driver binaries and utilities.

On the other side, today, open source projects such as Linux or U-Boot have a fairly well upstream support for Tegra too. Also thanks to the effort of NVidia providing open source code and documentation as well as pushing things upstream.

This article should provide a big picture about the boot process, available boot software and the state of upstream implementation. Its not a complete view of things, but it would have helped me learning about the Tegra world, so it might help others too :-).

Read more »

Online resize root filesystem on a GPT partition

This short tutorial shows how to resize a ext4 root filesystem online. Most people use gparted from a recovery system for this task, and I also recommend that for if you are not familiar with the tools used in this guide. Also, make sure you have a backup of the data (I did this myself on a system I just installed, so I would not mind if anything goes wrong). Generally this is not different from doing a manual MBR/fdisk resize, except that we need to treat the unique partition GUID specially since we should maintain it (for boot loaders/boot managers).

So, here is how I resized my ext4 root partition (sda2) using gdisk and resize2fs: Read more »

Setting up schroot for Python multiprocessing

When using Arch Linux, its sometimes required to run something in a older/stable releaes of a Linux distribution. For this purpose I have a Ubuntu 12.04 LTS installation in a schroot environment. However, using Bitbake (a heavily multithreded and Python based build utility) The build aborted with the error:

  File "/usr/lib/python2.7/multiprocessing/queues.py", line 63, in __init__
    self._rlock = Lock()
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1)
OSError: [Errno 13] Permission denied

Read more »

Graphical boot splash screen with Nvidia binary drivers

Recently I had a hard time to bring graphical boot splash screen (Plymouth) to work on a Ubuntu 13.10 Saucy Salamander installation. I use the Nvidia binary driver and activated uvesafb therefor (see this blog post how to do this). However, it didn’t work. In the end two pieces were missing: Read more »

Arch Linux: Gnome 3.10 on Wayland

Gnome 3.10 on Wayland

Gnome 3.10 on Wayland

Gnome 3.10 has initial Wayland support and hit the Arch Linux repositories lately, time to give it a try! The gnome packages are available with Wayland support, namely gnome-shell (which includes the gnome-shell-wayland binary) and mutter-wayland.

But I soon realized, that running Gnome on Wayland using Arch is not possible without some work: Firing up mutter-launch with the gnome-shell-wayland, lead to this error:

$ CLUTTER_BACKEND=wayland mutter-launch --verbose -- gnome-shell-wayland --wayland
...
(gnome-shell-wayland:18781): mutter-ERROR **: Spurious exit of X Wayland server

Gnome (or more specific, mutter, the Gnome window manager/compositor) needs a working XWayland version. XWayland is a X-Server running as a Wayland client. Its only used for non Wayland compatible clients, but is a mandatory requirement for mutter right now. The X-Server in the Arch repositories does not support this mode, hence another package is necessary. Read more »

Canon PowerShot S100 on Arch Linux

My digital camera Canon PowerShot S100 was not detected by Arch Linux automatically despite i’ve installed the required libgphoto2 package. Googling around I found a fix: It looks like GPhoto2 tries to load the wrong driver due to the ambiguous camera name (Canon released two cameras with the same name). The easiest way fixing this is disabling the old driver:

# mkdir /usr/lib/libgphoto2/2.5.2/disabled/
# mv /usr/lib/libgphoto2/2.5.2/canon* /usr/lib/libgphoto2/2.5.2/disabled/

Read more »

Ubuntu: HP Smart Array Controller Status

The HP Smart Array Controller series which can be found in most HP Servers today is supported by the Linux Kernel driver hpsa. The utility hpacucli helps to communicate with the Controller. But this utility flaws native 3.x Kernel support in Ubuntu 12.04 (Precise Penguin). The command ctrl all show doesn’t show any controllers:

=> ctrl all show

Error: No controllers detected.

The command setarch helps to work around this by causing the programm to see a kernel version number beginning with 2.6:

sudo setarch x86_64 --uname-2.6 hpacucli
=> ctrl all show

Smart Array P410i in Slot 0 (Embedded) (sn: 500xxxxxx)

See also Ubuntu Bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/890768.

Flash BeagleBone Black using Linux

BeagleBone Black

BeagleBone Black

Today I received my BeagleBone Black! For 45$ you get more power and even HDMI. There is also a serial debug port now on a distinct header connected to UART0 of the CPU. The user can connect to this serial port with a TTL converter (like the FTDI-USB-Cables) and a terminal emulator. Set the baudrate of 115200 and you should be able to see U-Boot, the boot process and a login prompt in the end. Everything worked fine, except when I tried to connect using SSH it failed with an error:

$ ssh 192.168.7.2
ssh_exchange_identification: Connection closed by remote host

I could no figure out how to resolve this on the currently running firmware so I followed a tip on the mailing list to just upgrade the firmware. On linux this is normally a fairly easy process, one has just to decompress the image and pipe it to a SD-Card.

unxz --stdout BBB-eMMC-flasher-2013.04.13-DDR3-400MHz.img.xz | dd of=/dev/mmcblk0

Read more »

Linux: Trace file system activity of a process

To trace file system activity of a process the Linux utility strace can be used. strace traces all system calls, but using the -e trace=file option gives a nice output about file system activity of a given process. This gives a similar output to the SysInternals Process Monitor which I used sometimes on Windows.

In order to use the utility for a multithreaded program (like Java) the -f parameter helps too. Using the output of strace (blue text) I could manage to find a missing file which crashed a Java program:

 [pid 5997] open("/home/sag/My Documents/BookSmartData/log-2013.04.11-00.29.57.txt", O_RDWR|O_CREAT|O_EXCL, 0666) = -1 ENOENT (No such file or directory)
 java.io.IOException: No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:947)
 at com.blurb.booksmart.util.vent.Vent.writeLogFile(Vent.java:388)
 at com.blurb.booksmart.util.vent.Vent$ExceptionHandler.handle(Vent.java:369)
 at com.blurb.booksmart.util.vent.Vent$BookSmartThreadGroup$1.run(Vent.java:510)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
 at java.awt.EventQueue.access$200(EventQueue.java:103)
 at java.awt.EventQueue$3.run(EventQueue.java:688)
 at java.awt.EventQueue$3.run(EventQueue.java:686)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Deploy ownCloud from Source using Git

ownCloud Logo

ownCloud Logo

ownCloud is a great piece of open source software. It allows you to share files easily like Dropbox or Google Drive (including fancy drag and drop upload on newer browsers), but gives you the control of your data, since you can host an instance yourself!

My goal was to test the latest ownCloud 5 snapshot from Github. I do have SSH access on destination server, so my goal was to deploy it directly using Git. Be warned: The master branch from Github can (and will) contain bugs! But you get bleeding edge and you can help testing the software.  Read more »