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: Bcast: Mask:
                   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
                   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)

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: