06.09.09
Posted in Intermediate, Linux at 11:39 am by Techie
Most external drives are shipped with FAT32, which is great, until you come across files larger than 2 GB. The easiest way to get around this and maintain Windows compatibility is to reformat the drive to NTFS. Sure, you could do it in Windows, but what if you just happen to only have a Linux computer handy? Here’s how to do it in Ubuntu. These instructions are for an external drive, but should work for internal drives too. This will destroy any data on the drive. You’ve been warned!
First, you’re going to need the ability to create NTFS file systems, so install ntfsprogs:
sudo apt-get install ntfsprogs
Next, connect your external drive. In my case, I’m formatting a Western Digital WDElements 1 TB external USB hard drive. This auto-mounted for me at /media/Elements. If I run df -k I can see the drive to get the disk ID:
$ df -k
[...misc output...]
/dev/sdb1 976521568 128 976521440 1% /media/Elements
Ah, so it’s at /dev/sdb. First, we blow away the partition and re-create it as NTFS. Warning: you are going to be destroying all the data on the drive! Make sure you have the write drive designation, or you could lose data on your other drives!
$ sudo umount /dev/sdb1
$ sudo fdisk /dev/sdb
Options to select:
- ‘d’ to delete the partition
- ‘n’ to create a new partition
- ‘p’ for primary
- ‘1′ for partition number
- ‘Enter’ for first cylinder (default 1)
- ‘Enter’ for last cylinder (default of max size)
- ‘t’ for type
- ‘L’ to list codes, and enter code for HPFS/NTFS. In my case, it’s ‘7′
- ‘w’ to write changes to disk, and exit
sudo umount /dev/sdb1
In the last step, I unmount the partition, because Ubuntu auto-mounted it again for me. Now, we need to create the file system. There are two ways to go about it: the impatient way (Quick Format), or the better but much longer way (Full Format).
Quick Format
This just allocates the disk space, but doesn’t zero out the drive or check for bad sectors. This means it’ll take a few seconds.
sudo mkfs.ntfs -f /dev/sdb1
Full Format
If you’re much more concerned about data integrity and don’t mind waiting, do a full format. This may take a few hours to zero out a large drive!
sudo mkfs.ntfs /dev/sdb1
That’s it!
Some other caveats:
- NTFS is a journaling file system, which means changes may not be immediately applied. Always unmount a drive before disconnecting.
- If you’re extra paranoid, run a ’sync’ before you unmount the drive, to be sure that changes are written.
- Windows is also quite paranoid about this, so always safely unmount the drive before disconnecting. Otherwise, you may find you can’t access the drive at all under Linux, until you mount it under Windows first to recover the journal.
Permalink
04.08.09
Posted in Linux at 1:47 pm by Techie
Permalink
02.11.09
Posted in Uncategorized at 12:29 pm by Techie
Amazon provides a download for Intrepid Ibex, but it only works for 32-bit installs. What’s a 64-bitter to do? Fortunately, this has been solved by a few folks.
After you install, you have to click a link to tell Amazon that you have it installed, and it’ll probably try to open it in your web browser, and fail. Go to Edit, Preferences, Applications tab, and you should see an entry for AmazonMP3 download queue. Under Action, pull down the drop down and select “Use other…”, and browse to {{{/usr/bin/amazonmp3}}}. That should do it.
References:
Permalink
01.28.09
Posted in Error Messages, Intermediate, Linux at 2:59 pm by Techie
If you upgraded the perl module Compress::Zlib (or related), you may suddenly find CPAN stops working. You may start getting an error like the following:
Can't call method "value" on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm line 64.
As it turns out, there’s a whole slew of Compress::Zlib modules and IO::Compress modules that are all related. They are all packaged separately, and have the same version numbers. The problem happens if you upgrade one of the modules, without upgrading all of them.
The solution: make sure to upgrade all the modules to the same version at the same time. This means that if you’re using CPAN, you might have to install the remainder by hand. A good check to find what modules differ for you is to run dpkg -l | grep compress | grep perl, and make sure versions match up.
Permalink
12.20.08
Posted in Intermediate at 1:40 am by Techie
- Soft Reset: This just reboots your phone, useful if you want to clear out the programs running in the background. Hold down Call (green button) + Menu + Power/End (red button)
- Factory Reset: Restores your phone to factory default settings, deleting any data and applications on phone. Hold Home + Back + Power, then press the Call (green) button to confirm the reset.
I’ve heard that if you use the Back button to get out of applications, it actually shuts them down. That doesn’t seem to work for me, though. I’ve also heard that the new firmware (not yet released) will include a process manager, which should preclude the need to soft reset the phone.
Permalink
10.21.08
Posted in Review at 11:56 pm by Techie
The T-Mobile G1 was the first effort at a mass market phone built on the Google operating system Android. Combining slick (if not current) hardware from HTC, Google’s web applications, and this new open mobile OS, it was meant to give the iPhone some competition while changing the landscape of mobile application development. I received mine today, and spent some time getting some first impressions.
You have to tie the phone to a Google account, so when starting it up, the first thing you have to do is add your Google account. For those with Google Apps For Your Domain: relax, you can use your Google Apps email address with no problem. This has some other complications, which I’ll go over later. This is great in the sense that you can store your data “in the cloud”. It is terrifying in that it puts a large amount of your personal data in the cloud. That, and you’re storing your data with one vendor. That concern is more than just data resiliency; it’s the fact that you’re giving someone else control over your access to that data. There have already been horror stories of people getting locked out of their Google account, so this is not an irrational fear. Most people are probably willing to take this risk, or are taking this risk already.
If you’re a first timer, you’re also going to want to dive into settings, and enable the GPS. I don’t know why they ship with it off; I’m guessing that half the folks breaking out this phone are going to do what I did: open the Map application and hit “My Location”, then be frustrated when it doesn’t work. Once done, the GPS is actually reasonably accurate — while driving down the street, it kept track of where I was pretty closely.
The hardware itself isn’t winning any beauty contests. It’s twice as thick as an iPhone, and has the aesthetic sensibility of a first generation Zune engineer. Well, it’s not quite that bad, but it’s definitely lacking polish. I drained a battery pretty quickly through a few hours of constant usage. While I probably wouldn’t be using it that extensively on an ongoing basis, it did run out rather alarmingly fast. (Perhaps that’s why the GPS is off by default.) The trackball is a familiar interface for me, coming from a Blackberry Pearl. In fact, the four button organization with trackball in the center was very reminiscent of working with a Blackberry — perhaps they’re setting up Android as a Blackberry killer? I love the full qwerty keyboard, but they recessed the keys far too much, leaving the whole keyboard feeling flat. I would have preferred raised buttons, like a Treo. Everyone complains about the lack of a standard headset jack, so I’ll throw in my complaint regarding that as well. They did include a set of headphones, but they’re not great.
The camera is kind of bunk. While on paper it sounds good, in practice, it’s rather hard to half-depress the tiny shutter button, and when taking a picture, it takes a bit for it to actually snap. This probably takes great pictures of still scenes; anything with action is bound to be extremely blurry.
Technical specs have been covered in pretty good detail on other sites; I seem to have no problems getting a signal so far, and being in the Boston area, 3G coverage is pretty decent. I still lean towards using wifi, of course, as that’s just faster.
Software-wise, Android works reasonably well. It’s not quite as intuitive as it should be, but it responds pretty snappily. While I can see myself getting quite used to it, I can see a lot of frustration for folks who are not as technically inclined and aren’t patient. In this vein, I can’t recommend an Android-based phone over an iPhone yet — the latter is just going to be a less frustrating experience overall. Opening and shutting the screen causes the display to flip between portrait and landscape, and it does this flawlessly. I would start loading a web page and immediately flip open the keyboard, and it’d switch over without missing a beat. This was rather pleasantly surprising.
However, unlike the iPhone, Android doesn’t have as much integration with other applications. Take the Amazon MP3 integration, for example. This is analogous to the iPhone with the iTunes Music Store. However, this application is clearly distinct from the Music system. I can pull up Amazon MP3, browse tunes, and buy a tune. However, I can’t immediately play the tune after purchasing, without switching applications and manually finding the song. Something Google and third party developers will need to do is really examine the UI flow, and clean up things like this — I should be able to go from buying a song to playing in a smooth flow, without having to hunt and peck. Unfortunately, this is quite a bit more difficult because more companies are involved, not to mention (soon) multiple hardware vendors.
There’s always been a little bit of confusion between Google’s regular web applications and the ones they package together as Google Apps. For instance, I can set up my email address on Google Apps, then go to regular Gmail, and try to sign in with it. Rather than taking me to Google Apps email, though, it prompts me to set up a regular @gmail address. This is true of Google Calendar as well. This has been the case for a while, and they haven’t really fixed it. The reason I mention this is that the browser defaults to a Google page, with links to these items. These links won’t work properly for Google Apps addresses for just this reason. The applications on the phone work just fine; just the start page links won’t work properly, which is rather odd. This is just going to get more confusing as more web applications end up in Google Apps. Also, what’s with the omission of Google Docs?
The Gmail application works about as you’d expect. You can’t open attachments, which is quite astounding, but then again, they didn’t include native Google Docs support, so what would you open it in. It works reasonably well and is effective for email. The Mail client, on the other hand, isn’t so good. If you have a lot of IMAP folders, it’s going to be quite painful. URLs aren’t clickable, and you can’t copy / paste them. In essence, the Mail client is roughly functional, but in need of a lot of work — hopefully someone will develop a better one in the Marketplace.
This brings us to the applications. They’re just not up to snuff yet, but as the G1 isn’t technically supposed to get released quite yet, perhaps that’ll change this week. Some of them are cool, some are bloated, some just don’t quite work. There’s also only a few dozen, so you’ll be able to review all of them briefly, until the market gets flooded. This also means that the more esoteric apps you might be looking for (say, an SSH client?) won’t be available just yet. Some of them have odd quirks — such as not quite mapping your starting point for directions or locations properly, resulting in not very good results. Some fine tuning is obviously needed for many applications. On the other hand, some, like the Weather.com application, though simple, are extremely well done.
I think I side with many other reviewers in noting that this is a good first attempt, and a quite nice phone. However, it lacks the polish and usability of Apple’s iPhone, as well as that extra bit of effort to make sure all of the apps are sharp. On the other hand, there is huge potential here: the Android operating system is quite capable, a lot of hardware vendors are developing new phones, and there’s a lot of time until their release to work out all of the bugs. I’m quite satisfied with picking up this phone, but still wouldn’t recommend it for people at large: there’s too much that needs to be cleaned up, and it’s still not intuitive enough for non-technical folks to prevent frustration. However, being an open platform, perhaps that may change quickly. I can’t wait.
Permalink
10.18.08
Posted in Intermediate, Linux at 11:08 am by Techie
System administration doesn’t have to be all serious. You can have sudo insult your users who mis-enter their password, by adding ‘insults’ to the Defaults line. Enable it and see which users discover it first.
Reference: Ubuntu Unleashed: Enable Sudo insults for some laughs!
Permalink
09.05.08
Posted in Intermediate, Linux at 3:11 pm by Techie
Let’s say you have a bunch of hosts on example.com, such as mercury.example.com, venus.example.com, and jupiter.outerplanets.example.com. You spend a bunch of your time on the command line, so you want to be able to access them with just the short host name, i.e., you want to be able to just type ssh mercury and not worry about the domain.
If you happen to be on the same domain, e.g. on saturn.example.com, this usually works fine. What if you’re not? The usual answer is to edit your /etc/resolv.conf file, and edit your search domains like so:
search example.com outerplanets.example.com
This works great — you can even ssh jupiter and it’ll do the right thing. It will, that is, right until you DHCP up a new IP address, say on another Internet connection. Then it overwrites your search domains, and you have to re-edit the file. What’s a techie to do? Use dhclient.conf, of course!
On hardy, I edited the file /etc/dhcp3/dhclient.conf and added this line:
supersede domain-name "example.com outerplanets.example.com";
Then, I did an sudo /etc/init.d/dhcdbd force-reload to make the dhclient change. However, my connection still had the old network information. To fix that, I just stopped and started my connection like so:
sudo ifconfig eth0 down
sudo ifconfig eth0 up
Voila — my search domains work again, and will work the next time I DHCP up a new IP.
Permalink
09.04.08
Posted in Intermediate, Linux at 12:55 pm by Techie
How do you determine what version of a Perl module you have? If you have one module you want to check, you can call the VERSION parameter of the module. Let’s say you wanted to check the version of Test::Harness you had on your system. Run the following:
$ perl -MTest::Harness -le 'print Test::Harness->VERSION'
2.56
$
Seems simple enough. But what if we want to check all module versions, versus what was current on CPAN?
$ perl -MCPAN -e 'CPAN::Shell->r'
That’s not foolproof, as some modules don’t have version numbers, but should give you a good idea. It also has the bonus of providing you with information on how out of date you are with CPAN.
Permalink
08.14.08
Posted in Intermediate, Linux at 5:46 pm by Techie
You used to be able to use tzconfig to set the time zone in Ubuntu. With Hardy Heron you can no longer do this, so how do you do it? Simple:
sudo dpkg-reconfigure tzdata
Permalink
« Previous entries