Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

16 February 2008

Acerhk and Ubuntu update


I was looking through the stats today when I discovered that my most popular post is about acerhk and Ubuntu. I'm not surprised in many ways because it was the one thing that caused hell when I was first trying to install it on my laptop. Incidentally, that laptop is still running Ubuntu very nicely (although I'm about to retire it - it's getting a little old).

Anyway, I commented in the first post that I was hoping Ubuntu might one day have acerhk installed by default. Lo and behold this is the case now which significantly simplifies the steps we have to take to get the wireless working. We can skip all the stuff about module assistant and jump straight to configuration.

So skipping the first part of the installation, here's what actually needs doing (quoted from the old post):

---------

We'll need to:

  • Ensure the module is loaded when Ubuntu boots.
  • Tell the acerhk module to enable the wireless both when the laptop is turned on and when it is resumed.
The easiest way to have the module load when Ubuntu loads is to add it to /etc/modules:
sudo sh -c "echo acerhk >> /etc/modules"
Now we're going to make a little script for turning on the wireless. Open up the text editor at Applications > Accessories > Text Editor. Create your script as follows:
#!/bin/bash
echo 1 > /proc/driver/acerhk/wirelessled
Save it into a useful location with an appropriate name. I'm going to name it wifi and save it into my home directory.

Now ensure that the script is executable:
cd ~
chmod +x wifi
Then we need to copy the script to the two locations that will have it being executed on boot and resume.
sudo cp ~/wifi /etc/acpi/resume.d/
sudo cp ~/wifi /etc/init.d/
Finally, activate your startup script with the following command (assuming you are in the same directory as your script):
sudo update-rc.d /etc/init.d/wifi defaults
 Phew! We're done. Reboot the laptop and hopefully your wireless is working!

-----

22 April 2007

Acerhk and Ubuntu


UPDATE: Some of these steps are no longer necessary on newer versions of Ubuntu. Check out my new post for the info.

With the new release of Ubuntu now available I raced ahead and installed it on my laptop. Of course no major upgrade goes without a hiccup and this one was no exception - my wireless networking stopped going. This wasn't entirely unexpected because I had to install a kernel module to get it going under edgy so I did that again under Feisty. Hopefully one day this will be installed by default in Ubuntu but we'll see. For now, if you're one of those unlucky soles with a laptop requiring acerhk to get the wireless going, check out these instructions - once you know and understand it, it's actually not that hard.

First you need the sources for the acerhk module. There's a couple of ways and places you can get this, but the easiest by far is to use this deb.

After you've downloaded the deb, double click to install. This part's easy! You'll just need to make sure you're connected to the net (presumably by wired network) for it to download some required dependencies. What this does is copy the source code for the module over to the required places.

Now we're going to use a very convenient program made for Debian called module-assistant. To install this, you can either use the command line or synaptic package manager. You'll need to have the multiverse enabled. (Not sure what this means or how to do it? Check out the Ubuntu Help Documentation)

Open up a terminal by going to Applications > Accessories > Terminal. First, make sure your repositories are up to date:

sudo apt-get update
Enter your password when asked. Now we need to install the module-assistant:
sudo apt-get install module-assistant
Open up the module-assistant by typing:
sudo m-a
You'll see a helpful blue and red screen. First, we need to prepare the assistant for installing modules, so select PREPARE and wait for it to finish. After that, select UPDATE.

Now we'll tell it to install the module. Select SELECT to see the list of modules, find acerhk and press space bar. Then tab to OK and press enter. Select BUILD and then select INSTALL. You've now installed the acerhk module! Exit the module assistant by pressing Esc repeatedly until you're back at the command line.

Now we need to make sure the module is loaded at the appropriate time and the wireless network enabled. We'll need to:
  • Ensure the module is loaded when Ubuntu boots.
  • Tell the acerhk module to enable the wireless both when the laptop is turned on and when it is resumed.
The easiest way to have the module load when Ubuntu loads is to add it to /etc/modules:
sudo echo acerhk >> /etc/modules
Now we're going to make a little script for turning on the wireless. Open up the text editor at Applications > Accessories > Text Editor. Create your script as follows:
#!/bin/bash
echo 1 > /proc/driver/acerhk/wirelessled
Save it into a useful location with an appropriate name. I'm going to name it wifi and save it into my home directory.

Now ensure that the script is executable:
cd ~
chmod +x wifi
Then we need to copy the script to the two locations that will have it being executed on boot and resume.
sudo cp ~/wifi /etc/acpi/resume.d/
sudo cp ~/wifi /etc/init.d/
Phew! We're done. Reboot the laptop and hopefully your wireless is working! When the next Ubuntu version roles around all you should need to do is the module assistant build and install for the acerhk module.

07 April 2007

What's the best cross-platform filesystem?

Good question. It's something that I've been thinking about and something that for a while annoyed the hell out of me. Realistically there are three operating systems that someone (or at least a tech-geek) might have on their system - Windows, Linux (of some variety) and Mac OS X (apple-labelled or otherwise) and the ideal filesystem is one that works properly on all three.

By doing this it makes it much easier to realistically use your music, documents etc properly and successfully on all three. As an example, I might have 3 primary partitions, - one for each of the operating systems - and then a logical partition for documents (plus another for linux swap). Of course this will work equally well with another drive acting as the documents repository (something that I'm planning to do shortly as a multitude of home videos, photos, music and podcasts threaten to completely fill my current drive).

So let's survey the contenders.

FAT32
Advantages:

  • Works natively and perfectly in all three operating systems.
Disadvantages:
  • No journalling.
  • Relatively low maximum partition size (2 Terabytes - not attainable yet but will be).
  • Inefficient at large partition sizes.
  • Maximum file size limited at 4GB.
NTFS
Advantages:

  • Works natively and perfectly in Windows.
  • Other operating systems support read support natively.
  • Robust and journalled.
  • Very high limits on maximum partition size
  • Very high limits on maximum file size.
  • Generally efficient at large partition sizes.
Disadvantages:
  • Requires third party software to allow for write support on Linux and Mac OS X.
  • Slower on Linux and Mac OS X because of the use of FUSE.
  • Proprietary filesystem patented, and at the whim of, Microsoft.
Ext3
Advantages:

  • Works natively and perfectly on Linux.
  • Generally fast, journalled filesystem.
  • High file and partition size limits.
Disadvantages:
  • Requires third party software to allow for any access under Windows or Mac OS X.
  • Third party software tends only to support ext2 resulting in extra file system checks (and these are slow).
HFS+
Advantages:
  • Works natively and perfectly on Mac OS X.
  • Works natively and perfectly on Linux (without journalling)
  • Generally fast, journalled file system (but journalling must be disabled for Linux)
  • High file and partition size limit
Disadvantages:
  • Requires third party software to allow for any access under Windows.
  • Linux access requires disabling journalling.
  • Free HFSExplorer is not integrated into the Windows explorer.
  • Commercial MacDrive (with full Windows explorer integration) is not free of charge.

One important point to note is that until not so long ago NTFS write access was just impossible outside of Windows but thanks to the fine NTFS-3G project that limitation is now not an issue.

So what's the verdict? Well, only last year I couldn't possibly imagine myself saying this but for me the answer is NTFS. Pretty much all the NTFS features of importance are supported by the aforementioned NTFS-3G project while ext3 features only limited support due to only ext2 support with most options on the other operating systems. Needless to say, FAT32 is something I ruled out because I constantly hit upon the 4GB limit - though I must add that for the longest time (i.e. before NTFS-3G) this was the filesystem of choice for me. HFS+ is ruled out due to its commericial software requirement on Windows (although if you are comfortable using it without Explorer integration or paying for the software, then it may be an option for you, especially if OS X is your primary OS).

As mentioned Windows of course features native support for NTFS (how could it not!) but for Linux and Mac OS X a little work will be required. The great thing about NTFS-3G and linux of course is that in the future it will probably find its way into the kernel, or if not then at least into many distros. This hopefully will mean that no extra work is required! [Update: As of Ubuntu 7.10, NTFS write support is enabled by default.]

For now though there is stuff to be done but it's not hard. I followed the instructions over at the Ubuntu Forums. Mac OS X installation instructions may be found at Mac OS X NTFS-3G's unofficial homepage and is made possible by the fortunate and timely release of Google's MacFUSE project.

The end result? Beautiful cross-platform bliss as I can read, write and modify to my heart's content whichever OS I happened to have booted. The one problem with FUSE hinted at earlier is because it's a user-space system it runs a little slower than a natively supported file system. However given that the solution is (IMHO) so much better than FAT32 and will probably get better in the future I think it's just fine.

Happy filesysteming!

P.S. If you read this and find something grossly wrong then let me know.

Update: Thanks to commenter Derek for suggesting HFS - I have added my thoughts to this post.

06 April 2007

Ubuntu - it's the little things that count

I'm a big fan of good usability design. This is something that I think the Ubuntu guys do really well - they take a step back and look at things from the average point of view and try to come up with ways to make things better. Take the Slick Boot specification that (sadly) won't be making its way into Feisty but will come around eventually I'm sure. An example of the user perspective from the full specification page:

Matthew's monitor takes a couple of seconds to switch between different
modes. The multiple mode switches in the current boot sequence make him
nervous.
Sadly there's one little thing that's been annoying me recently. My laptop has always been notoriously bad at sleeping no matter which operating system is having its go at it. Not to worry, I can just use hibernate instead and back when I used Windows this was fine. It works perfectly on Ubuntu too. But let me pretend for a second that I don't know what's going on here.
If you turn on a hibernated computer with Windows, here's what you might get:


It's a simple screen, sure but effective. It has text that tells the user what is happening. It has a progress bar.

Now let's compare that with what I see when I resume my laptop.


Hmmm. What's going on here? I've got a progress bar that's not moving at all. And I have an ugly white band across the screen that makes it seem as if something is broken. But no! Suddenly a flash occurs and my desktop is back.

Ubuntu did a great job with Usplash of making things look rosy to the average user. Usplash needs to be extended to hibernation too. Admittedly there is a specification that covers this. I just hope it gets implemented soon!