Tag Archive for 'linux'

Samsung Series 9 NP900X3C Linux Review: Beautiful

Purchased a Samsung Series 9 13.3 on the 15th August (as there was a cashback offer for purchases after this date, and I’m a student). It arrived two days later, with scratches on the lid. Fortunately, Amazon sent me a replacement and I got that within about 5 days.

Unwrapping it shocks the senses. So thin, light and yet powerful. The first thing I did was boot up and enter the BIOS. When Samsung say a 9 hour battery life, they rely on a 100% charge (naturally), but the BIOS recommends a Extended Life setting, which caps charging at 80%.

Booted into Windows 7, not bad speeds for a Sandisk U100 (sigh, that’s so getting ripped out) and every piece of bloatware under the sun. Within 10 minutes I PXE booted and purged the Windows 7 installation and recovery partitions with Linux. I wanted Wheezy, but it’s not released yet, and Ubuntu Precise is supposed to be a power saving beast, so I whacked on a minimal version of Ubuntu (netboot install).

I installed the very basics of packages: gdm gnome-shell dropbear.

GDM’s autologin feature is broken. Which is a bit of a pain. As for lightdm, that has issues of its own, so I put up with GDM’s lack of autologin. Not wanting Unity, or GNOME3, I stuck with GNOME Classic, which does the job.

First thing I noticed was the CPU governor changed to “ondemand” frequently. This annoyed me a little (I prefer conservative). I found the /etc/init.d/ondemand script and was able to modify it — it runs in the background and after 60 seconds kicks the governor into ondemand by default. I also adjusted the scaling frequencies. Powertop initially was not looking great, but by writing my own pm-utils scripts this improved. With good tunables, I wrote some scripts to mount CIFS, turn off KB backlight, adjust screen backlight and turn off the Bluetooth radio by default. I’m now able to get 7 hours of wireless browsing with 30% brightness and my 80% charge.

I wanted a Linux laptop, as it sure beats virtualising, and I doubted if this would make the cut. My worries were the 4GB RAM. With a Windows mindset, it’s a bit weak for a developer, but on Linux, I can have make -j4 on the kernel, Firefox open and only be consuming 700MB RAM. It’s going to be very hard to get through all this memory, and I’m glad I bought the 13″ rather than the 15″ model.

The only gripe with running it in Linux is a kernel bug where ACPI state changes are not detected properly. For example, if I put my laptop on charge, it takes a reboot before Linux will detect the battery is on charge. Likewise with removal of power. It’s a minor issue though, that doesn’t present in Windows mind, but I’m hopeful a future BIOS update will resolve this problem.

With the samsung-laptop kernel module, most FN hotkeys work, and those that don’t can be fixed quite easily. With newer packages, and by the time we hit Quantal, this laptop will likely be a perfect machine for Linux.

Gripes: Not perfect in Linux — but this will improve, and for Windows, i.e. most users, there’s no problems. The Sandisk U100 is not the best of SSDs, and a Crucial M4 SSD would have gone down a lot better. Having said that, I don’t need blazing fast speeds, and my boot is not bad, about 10 seconds (including GRUB2 3 second timeout).

All in all, a beautiful laptop, that’s only going to get better in time

New Crystalbuntu Update: August 2011

Following hot on the trails of the July update, this months update brings less features but some tweaks under the hood. Here are the main features:

  • New PVR build
  • Airtunes
  • Improved SSH performance
  • NFS support
  • Hulu support

For a full list of changes, see the changelog at the bottom of the page here

Just restart your Apple TV to get this update immediately. Let me know how it goes, and consider making a donation to help fund future enhancements such as the aforementioned.

New Crystalbuntu Update: July 2011

Hey there, it’s time for the July update and as promised previously, this one is a biggy, bringing a lot of new features and optimisations to the table. Make sure you’ve read this.  Here are the main features:

  • AirPlay support.
  • PVR support
  • Dirty region rendering
  • CPU clocking improvements
  • Internal hard drive standby
  • Reduced IO activity
  • Lower power consumption
  • Reduction in heat output
  • Virtual memory handling improvements
  • Faster boot
  • Improved update system
  • Notifications system
  • XBMC optimisations
  • Bug fixes
  • Purging of unnecessary documentation

For a full list of changes, see the changelog at the bottom of the page here

On a sidenote, Mac users accessing their shares over SMB in XBMC should not upgrade to Lion because Apple have dropped Samba for their own implementation. The XBMC development team may fix this shortly in nightlies but for now it is important to not upgrade or implement afp manually if updating to Lion is necessary.

Just restart your Apple TV to get this update immediately. Let me know how it goes, and consider making a donation to help fund future enhancements such as the aforementioned.

New Crystalbuntu update

A new, Crystalbuntu update has been pushed out. This is the first significant update since the first image, here are the main features that the update brings:

  • Faster boot times
  • More streamlined update service.
  • Quieter boots
  • Bug fixes

For a full list of changes, see the changelog at the bottom of the page here

Just restart your Apple TV to get this update immediately. XBMC will need to reinstall itself in a new location. Let me know how it goes, and consider making a donation to help fund future enhancements such as the aforementioned.

PVR:DVB in the UK: still not quite there

Getting a good PVR setup is annoying me lately. Virgin Media offer cable services over DVB-C but it is impossible to connect a device like the HDHomerun because of encryption. DVB-C cards will not work without a Conditional Access Module (which is likely not legal), not to mention the violation of TOS when you hook up equipment to their network that is not authorised. With flaky and quite frankly unappetising offerings on DVB-T (Freeview), and a lack of DVB-T2 cards back in June 2010, I took the DVB-s2 route. I’ve got a dual tuner TBS6981, and it works fine for playback / recording with Astra 28.2E.

Really, what I want though, is a nice integrated system with XBMC. MediaPortal does not play very nice. The channels seem to parse fine in the application, but the orders are unchangeable and are far from acceptable, as well as the issue with EPG information. Scrap that, I tried setting up a minimal Linux distro with XBMC and TvHeadend (fast boot off SSD I’ll tell you that). Unfortunately, recordings don’t seem to go into fstab mounted SMB shares, and the EPG listings reset constantly (I don’t want web-based listings, we get EPG data over DVB-S and I should be able to use it).

TVHeadend didn’t cut it. It insists on rescanning muxes every time, as well as purging its EPG listings on reboot. Once the dev resumes work in the summer, it might be good for a server box, but I was running this on an all rounder-machine, that is regularly rebooted. I did like the AJAX interface, which seemed a nicer touch compared to MediaPortal’s .NET system which seems to not use different threads for the UI and background processing, resulting in long periods of the UI thread locking while waiting for MP to query the remote database. MythTV and me haven’t got on that well before, but I guess I’ll be going back to try it now that I’m not using such a poor DVB-T aerial and I can actually get some decent SNR attenuation.

Ubuntu 8.0.4 is EOL today

Ubuntu 8.0.4 Desktop packages are no longer supported by Canonical. The LTS release has finished its three year support cycle.

What does this mean for Crystalbuntu users?

At the moment, nothing. The latest version of XBMC 10.1 Dharma, as well as the new nightly builds can run on Hardy just fine (although XBMC devs no longer officially support this platform). 8.0.4 LTS is still the best compromise between freshness, stability, performance and driver support.

What about the lack of security updates?

Ubuntu 8.0.4 is still a secure system, behind a router which is using NAT. This is because ports are not by default exposed to the world, unless a DMZ is set. Therefore, your system will be behind a firewall, and so security updates are not the necessity they would be if you were running a web server in a production environment. Those concerned about security: have you changed the default username and password and generated a new SSH key? No? Then your system would never have been secure.

What next when 8.0.4 won’t run XBMC anymore? Why is there no 11.04 image?

8.0.4 will probably run XBMC for a while. There is no later version of Ubuntu used because the driver support in these later systems would cause a loss of functionality. The NVIDIA 7300 GO will not utilise HDMI audio out on driver versions that are compatible with later versions of Ubuntu, so this results in a loss of passthrough and downmixing over HDMI, requiring RCA or optical. Worst of all, newer versions of Ubuntu have a larger footprint, and will use more resources doing the same thing, so while XBMC can run fine on 8.0.4 using typically 90MB of RAM (that’s ~ 35%) or less at load, it will be the primary image. The difference between Ubuntu 8.0.4 and Arch 10.5 in performance is negligible.

So if HDMI sound doesn’t work, performance is worse on later versions of Ubuntu, will we ever be running it on our aTVs?

Probably. The Nouveau driver is an open-source driver for NVIDIA cards and is maintained well. It will become more mature over time (it is currently rather buggy right now), but that should improve. This would allow HDMI sound output. Performance can probably be increased by minimising the image’s packages.

I don’t care about HDMI sound, give me a more up to date image?

Sorry but at this stage in time — there’s no need to do so. HDMI sound is valuable to many users, and this image is intended for the masses. Therefore, I would recommend you setup Ubuntu on aTV yourself if you are so inclined to go for an up to date distribution.

Most likely the next image will be based on the 12.04 LTS release.


Fixed: blinking question mark issue

Hello,

First off: thanks for being patient. I haven’t had a lot of time in the last week, but once I got my head round the problem the solution was simple. The bug however, is a bit of a weird one. The internal hard drive installer seemed to be working for most people, but for a minority, they got a blinking question mark on reboot. Looking at people’s output of parted -s /dev/sda unit s print, I could see that there was no visible filesystem for the first partition (the Recovery partition). This is why the question mark arose — as there was no EFI bootloader, and it is why the mounting portion of the script failed, as there was no present filesystem.

I managed to replicate this problem somehow. The problem was not permissions, but rather the fact that the transfer to the first partition is corrupted. Running it through SSH is fine as the system has already initialised. The big giveaway was the time dd was taking. Swap and Recovery gave throughputs of around 7MB/s, but Recovery was completing at 24MB/s? Yeah right. So I implemented a small MD5sum check. For those that have a successful install, the script continues, else if the checksums do not match, the dd command for Recovery is run again. This fixes the problem every time. It seems the IDE controller is not initalised properly until the first bit of data is dd’d across (excluding /dev/zero), although I could just as easily image sda1 with /dev/random or /dev/zero and then image the Recovery filesystem, but there would be no point for those that have no initial problem.

Another update to the installer is that the Recovery partition is no longer fetched for Ubuntu. Seeing as the installer is running the exact same kernel (mach_kernel), the drive can be duplicated off of /dev/sdb1 and then the com.apple.Boot.plist be modified — which is done anyway. This only saves around 10MB of traffic but helps for people with slow internet connections and cuts out unnecessary waiting time

So for the average user, all you need to know is that the problem is fixed. Simply run the installer again and it should work fine. Once again, sorry about the delays.

Sam

Blinking question mark on aTV after CrystalHD installer

It has come to my attention that some people are getting the blinking question mark after a series of errors when running the IDE Installer image. If you are one of them, here is a brief explanation of what is happening:

The reason your HDD is not being imaged correctly is due to a permissions problem when dd tries to restore Recovery.img.gz to the partition. Therefore, when the script later tries to mount the non-existent file system at /dev/sda1 it fails. Without a correctly partitioned Recovery partition, the system cannot boot, and therefore it leaves you with an annoying ? mark blinking. You could manually copy these partitions over with an SSH session, or you could wait for me to redo the installer image. I am not sure why some aTVs work and some do not — there must be an underlying reason, but unfortunately I cannot identify it as it works every time for me. Originally, I wanted to use Penbuntu to image the devices, as it is a lightweight distro and even has kexec embedded for seamless kernel hotswapping. Unfortunately, when I originally embarked on testing it out, I found the screen would go blank after a few minutes and Davilla informed me this is a known Penbuntu bug. However, considering that Penbuntu may be the solution to our problems, and the fact that it is around 40x smaller, I think it is worth pursuing the problem. For all I know the problem may very well be rectified by “setterm -blank 0″

Please be patient in the matter and

Thank you for your understanding

Released: CrystalHD Linux distributions for AppleTV

Hello. If you’re reading this, then I have good news :)

I have essentially completed the CrystalHD for AppleTV project that I began as far back as June 2010. The project now offers the following:

  • Installation of Linux onto the Apple TV’s hard drive, or onto a USB flash drive
    • via a UI installer in Windows
    • via a UI installer in Linux
  • XBMC Dharma
  • CrystalHD Drivers
  • Audio over HDMI
  • Self-updating system
  • Much more..

General

Undoubtedly, the most challenging aspect of development was the UI installers. Creating images with the software pre-packaged was simple enough, and I’d been successful in this technique as early as June last year. What was more difficult was manufacturing a UI installer that could either image a USB with a live image or an image that would install the software for the user on the internal drive. The Windows installer requires many external libraries such as the usbit (thanks to Alexander Beug imaging is possible). Combine that with the fact that Windows offers next-to-none integrated image and device manipulation mechanisms, unlike Linux where they are rife (namely dd, parted, mount etc), developing a UI installer is difficult. My injection method into the installer image relies on a marker I created and then located using a hex editor, where the distribution the user picks is injected as a byte array to this point. In essence, I had to write an application in Windows that manipulates a Linux filesystem that houses an OS that then emulates an EFI based Mac. Tri-platform :) .  This challenge has contributed to the project’s delay, as have other things going on in my life.

Thank you

I’d like to thank the XBMC community for the excellent support that it shows developers. When I released my initial image in June, I had no idea whatsoever of the immense popularity it would receive. Looking back at the old forum thread now I see that I managed to get over 1000 replies and over 200,000 page views. Message received: People wanted this image maintained and updated in the future. What I’d like to think I’ve done now is make installation a lot simpler by providing a friendly UI that allows installation onto either USB or the internal drive which was very much left alone to following erroneous tutorials where novices were confused by the mention of “/dev/sda”. By making installation simpler and hassle free, I hope that I have helped people realise the feasibility of loading Linux onto their device to enjoy performance gains, where they may have previously considered the task too challenging.

Where’s Arch?

I did say I was going to produce an Arch image. And I did. But apart from the fact it was more up to date than Ubuntu there seemed to be no perceivable gain in performance. In fact, there was a loss of functionality, primarily HDMI sound output, which meant that at this point in time where Hardy is still fit for purpose, there is no need to release an Arch image and double the level of maintenance that must be undertook. I will reconsider this on April 30th, the date on which Hardy will become EOL.

Please consider making a donation

As you are aware of, I have put a considerable amount of time into this project. I have had to make distribution specific images, an image to then install that image on to the hard drive, scripts to auto update the system, scripts to configure the system and two UI installers for two different platforms. Donations, I assure you, will result in future development of this project and will encourage me to spend more time on it. I am going to be in a constant state of maintenance as I maintain the auto-updating service for CrystalHD drivers and XBMC releases. If you feel that this project has helped revive your aTV, or at the very least made the process of getting Linux on your system easier, consider making a donation.

Enough! – where can I get the images?

The images are available through the UI installer (Xenity based on Linux) and these installers are obtainable from the project page here. It is recommended you consult the README file for the installer you are using and the distribution you are using — the FAQ will help solve any common problems that you might have.

How To: Linux over Windows Deployment Services (Diskless Booting)

A few days ago, I tweeted that I swapped out the WDS pxe boot program for pxelinux, and in doing so, I managed to create a system that would let me deploy Linux distributions alongside my Windows images without needing a separate PXE server nor losing the capabilities of WDS. I have found imaging machines over the network much more convinient than installation through flash drive / CD / DVD etc – being able to install my Linux distros in the same manner would be a blessing.

The first thing you need is a working, and by that I mean a configured WDS server that has the correct DHCP options applied. If other machines can load a standard boot.wim then this step has been satisfied.

The next step is to download the syslinux package from the Linux Kernel Archives here. Extract the following files:

  • core\pxelinux.0
  • com32\menu\vesamenu.c32
  • com32\modules\chain.c32

Put these three files in your architecture directory (x86 or x86 — both if deploying to both systems) under your WDS root folder, which will most likely be named RemoteInstall.

Next, create a directory in each architecture called pxelinux.cfg, one called linux (to store distros) and create a file called default.cfg

cd \; cd RemoteInstall\x64; mkdir pxelinux.cfg; mkdir linux; cd pxelinux.cfg; echo OFF > default

Leave it blank for now.

Now we change the boot program to pxelinux.0 which is in the architecture directory. This can be only be done by command line in WS2K8R2. Here is an example:

(x86)

  • wdsutil /set-server /bootprogram:boot\x86\pxelinux.0 /architecture:x86
  • wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.0 /architecture:x86

(x64)

  • wdsutil /set-server /bootprogram:boot\x64\pxelinux.0 /architecture:x64
  • wdsutil /set-server /N12bootprogram:boot\x64\pxelinux.0 /architecture:x64

Now we have the WDS core configured. What we have done is replaced the default PXE boot program with a Linux one. This gives us more flexibility and if we want to use the WDS boot loader to load a boot.wim file, we can do so by passing it in one of the arguments.

The next step is to download some Linux “netboot” images which we can have as installers. I did this for Ubuntu (grab the files here). All that’s needed is the Linux kernel and ramdisk and then the installer can fetch all the necessary bits. I also chucked in memtest86+ — simply one file which means that deployment is also as simple, and gparted which needs to download a file system over TFTP.

Here was my default file:

DEFAULT      vesamenu.c32
PROMPT       0
NOESCAPE     0
ALLOWOPTIONS 0
# Timeout in units of 1/10 s
TIMEOUT 100
MENU MARGIN 10
MENU ROWS 16
MENU TABMSGROW 21
MENU TIMEOUTROW 26
MENU COLOR BORDER 30;44        #20ffffff #00000000 none
MENU COLOR SCROLLBAR 30;44        #20ffffff #00000000 none
MENU COLOR TITLE 0         #ffffffff #00000000 none
MENU COLOR SEL   30;47        #40000000 #20ffffff
MENU TITLE Netboot Menu
LABEL wds
MENU LABEL WDS
KERNEL pxeboot.n12
label ubuntu-1004
menu label Ubuntu 10.04 Installer
kernel /linux/ubuntu1004/linux
append priority=low vga=normal initrd=/linux/ubuntu1004/initrd.gz –

label gparted-live
MENU LABEL Gnome Partition Editor
kernel \linux\gparted\vmlinuz
append initrd=\linux\gparted\initrd.img boot=live union=aufs noswap noprompt vga=788 fetch=tftp://192.168.1.2/linux/gparted/filesystem.squashfs
label memtest
menu label Memtest86+
kernel \linux\memtest\memtest
#—
LABEL Abort
MENU LABEL AbortPXE
Kernel    abortpxe.com

What I have done is store each distro’s kernel and ramdisk in a separate directory. This makes maintenance easier. Kernel arguments are passed with the append parameter — look up the kernel arguments of your chosen distro for more. Note that for gparted I added: fetch=tftp://192.168.1.2/linux/gparted/filesystem.squashfs. This allows the distro to acquire the actual file system, and thus launch utilities such as parted. GParted allows fetching of the squashfs (read only) file over TFTP. This will be accessible at the WDS server in the linux directory we created earlier.

This is good, as we have now added the ability to deploy Linux distros alongside Windows distros and still retain WDS functionality. I wanted to take the idea further though, and boot a LiveCD (which can be easily customised) in the pre-execution environment.

This is very simple to do. I did this with Maverick Meerkat (Ubuntu 10.10). I first appended my current configuration for pxelinux (default):

LABEL maverick-live
kernel linux/ubuntu-1010/vmlinuz
append boot=casper netboot=nfs nfsroot=192.168.1.2:/path/to/file/system initrd=
linux/ubuntu-1010/initrd.gz

Unfortunately, unlike GParted, the filesystem must be served over NFS, not TFTP. First, we need to install an NFS server. Configuration is beyond the scope of this article: see http://technet.microsoft.com/en-us/library/cc753302%28WS.10%29.aspx for more. After this, we can now serve Linux installations and live distributions to any clients that connnect.

I also wanted to automate the installation of Windows versions that are not compatible with WDS (i.e. < XP). This was easy as putting in a rc.local script which used dd to transfer image data and then running resize2fs -f /dev/sda. It would be nice if I could customise the kernel in such a way that I could pass the Win distro to be installed via kernel flags with the append option.