Friday, October 16, 2015

Linux from Scratch Journey part 1


I have installed both Gentoo and Arch Linux in VMs and real hardware. Both are the most customizable Linux distros I have worked on. You basically get a bash shell and build from there. However if you really want a customizable version of Linux that you can say you built then you should take the plunge and try Linux from Scratch.

Linux from Scratch (LFS) is a version of Linux that is built completely from source. What you get from LFS is a document that walks you through how to build your system. I just finish the section where you build your temporary tool-chain that you will use the build the system. The instructions were great. So long as you follow them exactly you should be fine. I am right now building an x86_64 based system, however depending on how successful I am I may try to build a PowerPC version on my iBook G4.

I will be adding posts as I work through LFS. Document both the success and issues that may arise.

Tuesday, October 13, 2015

First dive into BSD land


So I have spent the last few months working through FreeBSD and OpenBSD on my iBook G4 to see how well PowerPC is supported. It has been a mixture of challenge and frustration. I was hoping to make way more progress than I did, but in the future I hope to press on and report better news.

FreeBSD on PowerPC

The one thing that I really like about the BSDs is their initial installs are extremely simple and straightforward. Just like Gentoo, FreeBSD has a handbook that guide you though the set up. The documentation there is fantastic. FreeBSD uses a ports system for installing packages. This means compiling from source everything that is not in the base system. They do have precompiled binaries to install but they are not available for PowerPC. This is where things got really frustrating.

If you want to install Xorg on iBook G4 with a 1.42 Ghz CPU be prepared to wait for at least 2 days to compile. YES TWO DAYS! This is mostly because the process halts when it needs into install a dependency and it will ask if you want the default settings for do you want to change them. Then it will start to compile and install the dependency before it actually install the package you want. If a package has multiple dependencies then you can see why it takes so long.

There were ports that simply crashed and would not build. Packages like drm for graphics and even firefox would either fail to build or require some work to get going. I eventually got XFCE going but I needed to disable hardware acceleration and I had no browser to access the web. I never got chance to work on wireless access. Maybe sometime in the future.

So for a headless server FreeBSD could be used on PowerPC but there is a lot of work that needs to be done before I could recommend as a DE.

OpenBSD on PowerPC

OpenBSD uses a FAQ as their means of documentation. Like the FreeBSD handbook it is a great source of information. The install like FreeBSD was fairly simple. The one area I would recommend you deviate from the defaults is the disk partitioning section. The installer will recommend a partition scheme for you. This scheme creates multiple small partitions for /boot, /home, /usr, etc. The issue is that the chances for a partition (especially /usr since that is where the ports tree ends up) to get full pretty quickly. So I recommend doing a custom layout and have a swap and root partition only. You can find more info on to set up disks in OpenBSD here.

One advantage that OpenBSD has over FreeBSD is their precompiled packages are available for PowerPC. OpenBSD actually prefers you to install their packages over compiling ports. This is from their section in the FAQ on packages and ports,


IMPORTANT NOTE: The ports tree is meant for advanced users. Everyone is encouraged to use the pre-compiled binary packages.

OpenBSD also has Xorg as part of its base system which is a huge help in setting up the DE. I was able to get lumina and xfce working but there was some performance issues that need to be worked on. It looks the radeon r300 driver is supported under 5.8 (current), which is set to release soon.

Apart from a DE, OpenBSD is superb platform for networking. Setting up OpenBSD as a simple router/firewall is pretty straight forward. OpenBSD's pf is an amazing packet filter. There are also plenty of great packages that will help turn OpenBSD into a pretty powerful application layer firewall. I have been really enjoying learning this aspect of OpenBSD even if it is not strictly PowerPC related.

I have yet to try out NetBSD and it is on my list. I will post more on BSD as time permits.

Sunday, October 11, 2015

turning off ipv6 under Linux


Anyone familiar with networking know that the available number public ipv4 addresses is pretty much dried up. So as time goes on the move to ipv6 will only grow. However at least in parts of the US home users may not want to switch just yet. My local provider has ipv6 enabled but the performance is horrible. Pages and downloads simply drag or just stalls. Since the OS will prefer ipv6 over ipv4 when available the only option is to disable it. First check to see if you are receiving an ipv6 address by pulling the interface info from terminal

rican-linux@xubuntu-MacBookPro:~$ ifconfig wlp3s0
wlp3s0       Link encap:Ethernet HWaddr
                   inet addr:10.10.1.20 Bcast:10.10.1.255 Mask:255.255.255.0
                   inet6 addr: fe80::225:ff:fe4f:4961/64 Scope:Link
                  
inet6 addr: 2602:306:8b30:a310:225:ff:fe4f:4961/64 Scope:Global
                  
inet6 addr: 2602:306:8b30:a310::43/128 Scope:Global
                  
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
                   RX packets:41182 errors:0 dropped:0 overruns:0 frame:624154
                   TX packets:21081 errors:0 dropped:0 overruns:0 carrier:0
                   collisions:0 txqueuelen:1000 
                   RX bytes:36444300 (36.4 MB) TX bytes:2165921 (2.1 MB)
                   Interrupt:21



Now to disable ipv6 globally you will need to add this statement to the end of the /etc/sysctl.conf file, net.ipv6.conf.all.disable_ipv6 = 1. Then run the command as root sysctl -p /etc/sysctl.conf. This will disable ipv6 on your system.

Hopefully in time as more places have better ipv6 support this option will not be needed.

Martin Winpress helps keep PowerPC going with Ubuntu-MATE


A great thank you needs to go out Martin Winpress.  First he is part of the team that has given PowerPC users another great Desktop Enviroment to choose from with MATE. Second he has produced a solid distro that has PowerPC support in Ubuntu-MATE.

15.04 was a horrible release for PowerPC under Ubuntu. The release came with a version of xorg that was broken under PowerPC. Many users in the Ubuntufoums were really worried about weather or not it would be fixed. Then the same bug hit Sid right after Jessie was released. Thankfully it was fixed in Debian and the fix made it in time for the 15.10 release of Ubuntu-MATE.

Another fix that made it to Ubuntu was the javascriptcore-gtk bug that crashed browsers like midori and luakit. Now you can browse the web with these lightweight browsers under Ubuntu.

The install for users with the radeon r300 driver is the same as I documented here. Sound, wireless, video playback all worked. One issue I saw and this is because I was testing on my iBook G4 is when you play video with mpv the fans kick off after a minute. This does not happen on my PowerBook G4, but it has a slightly better video card and CPU.

There was an issue with powerd crashing when I plugged in my iPhone, but it looks like that issue has been resolved.

One of really great features that come with this version of Ubuntu-MATE is an app developed by Martin called MATE Welcome. This tool gives you access to documentation, access to the community pages, and allows you to install apps.  You can find more info here.

Another tool is MATE Tweak. It allows to change your window manager without having to logout and back in. It also allows to change your DE layout to with a selection of options. If you like a traditional Windows feel then select the Redmond layout or for OS X choose Cupertino.

With 15.10 there is better iOS support. In 14.04 and even in Debian Jessie if you are running iOS 8 or later shotwell fails to import your videos and photos from your iPhone. This issue is now resolved in 15.10. I am running iOS 9 and can import my photos into shotwell on my iBook G4.

In conclusion I am really excited about Ubuntu-MATE and the option it gives PowerPC users for a modern, secure operating system. If 16.04 is a continuation of I am seeing then the next LTS version of Ubuntu-MATE will be a distro to recommend.

Screenshot with the Cupertino layout:




Wednesday, August 19, 2015

KDE is awesome!



It has been a while since I have posted anything. I have been working on getting FreeBSD working on my iBook G4 and will be posting on that shortly. I wanted to share my thoughts on running a higher end DE in Linux. Most of my posts have been on PowerPC. These machines are older and are better ran more lightweight DEs such as LXDE, XFCE, or even MATE. Running DEs such as GNOME or KDE really do not make much sense on a G4 machine that the most it can have is 2GB of RAM.

However, if you have a more modern machine with good specs then you could go for a more powerful DE. GNOME has been my DE of choice for a while. It is also the DE that my wife really enjoys. One of the features that I really like about GNOME is the keyboard integration. GNOME make it really easy to launch apps and move between workspaces with a few hits on the keyboard. It just has a really clean to look to it. However I have always wanted to try out KDE. So a few days ago a grabbed a Kubuntu 14.04 and 15.04 ISO and went on my way. I was blown away.

The first thing that I noticed right about KDE was how beautiful of a DE it is. Everything from the panel layouts, how notifications are displayed, and the look of the application really show that a lot of work has gone into making KDE aesthetically pleasing. It is also one of the most customizable DE I have seen. Some people would say that is way too customizable and I can how you can get lost in all the options. However, for me I it is not an annoyance at all. It also has a lot of compiz like features built into its window manager, kwin.

If you decide you want to give it a try I would suggest going with Kubuntu 14.04. Normally I would prefer Debian, but the current stable release does not have all the plugins for KDE. So for example I the KDE network-manager applet is not in Jessie so you need to the GNOME applet. If you are using Sid then the plugin is there.

I am currently running Kubuntu 15.04 on my 2009 MacBook Pro and even on this older machine KDE runs well. Now 15.04 is running the newer Plasma5 version of KDE. It is still pretty experimental, which is why I recommend the 14.04 version. One drawback I have found with Kubuntu is using Kontact on a Mac that is a little outdated. It is a productivity suite that manages email, contacts, and calendar. It is very resource intensive so I choose not to use to manage my email.

If you are running KDE in Debian you can choose not to install this suite if you desired. This is an advantage that Debian has over Kubuntu. However Kubuntu does give you an more straightforward out of the box experience. This may be important if someone does not want to spend time installing packages to get the DE working.

Below is a screenshot enjoy!





Saturday, June 27, 2015

Ubuntu-MATE fits my MacBook Pro nicely


I have been an OS X users for years. I was always happy how it performed. Then came Yosemite and all changed. It was just one issue after another. Safari performance was poor, my garmin would no longer work. Then came the news that iPhoto was being replaced with Photos. This new change meant that syncing photos from the iPhone to the MacBook will now require sending your picture to iCloud. No longer was there direct sync from phone to machine.

It was then I decided to move to Linux on my MacBook. Now I have been using Linux on my PowerPC machines, but kept my MacBook running OS X. So now came the decision of what distro to use.

I first started Ubuntu 15.04, but I was not happy with Unity. There was issues that made some web pages barely readable, software center was having css issues and suspend was not working well on Apple hardware. Then I went to Ubuntu-GNOME and still the same issues. Then finally I went with Ubuntu-MATE.

Ubuntu-MATE  works great on this machine. All the issues I had with the previous flavors of Ubuntu were gone. Plus all the features that Ubuntu-MATE team have added like one-click compiz activation and multi panel layout so if you are looking for OS X or Windows layout setting it up is pretty simple. The performance has been great so far. I could not recommend this flavor of Ubuntu more highly. Thanks to Martin Winpress and the team.

Tuesday, June 9, 2015

A simple TrueCrypt alternative on Linux


A lot of people who were security conscious use TrueCrypt for disk encrytion. Sadly it was discovered to contain security vulnerabilities and for a while now it has been deemed unsafe to use. Thankfully there is an effort to audit the code. So hopfully this may be resolved in the future. Till then there is a really simply way to get portable disk encryption under Linux.

First verify that the package cryptsetup is installed. If not then install it, sudo apt-get install cryptsetup. Once this is installed use the command fallacate to create a file of a paticular size (for example 100M).


rican-linux@lubuntu-powerpc:~/Public$ fallocate -l 100M test.img
rican-linux@lubuntu-powerpc:~/Public$ du -h test.img
100M test.img


What the command did was creat the file test.img and allocate 100M of disk space to it. The extension is really not needed you create a drive without it. The next steps will be to use the disk utility that comes with the Linux desktop you installed to make this file into a loopback drive then create and encrpyted partion using LUX.


First open the disk utility and select attach image.




Then goto the directory where the file is located. Before you select the file uncheck the read-only option on the bottom, then select attach. The file should now be seen as a loopback drive in the disk utility.












Once mounted use disk utility to format the loopback device with ext4.









Once the device is formated to created your encrypted partition select create new parttion.


 

Then enter the passphrase used to encrypt the volume. Be sure to make it complicated! Now you have a portable encrypted filesystem.