Samsung Galaxy S, pt. 3, My Favorite Applications

Ok, so you have your phone rooted, updated and lag-fixed. You want some apps? Here are my picks:

  • Android Terminal Emulator (Well, it’s a terminal emulator)
  • Quadrant (For benchmarking and cock-measuring contests)
  • IMDB (Because i love my movies)
  • Spotify (Great if you have the.. Unlimited? Premium? Whatever it’s called nowadays account)
  • XBMC remote (Control your XBMC media center on your phone!)
  • FMI Helsinki Testbed (great weather app for the Southern Finland area)
  • Market Access (allows me to pay for applications. Paid apps are not available in Finland officially)
  • Advanced Task Killer (kills apps left open in the background)
  • Facebook / Twitter / Other Web 2.0 Socialwhoring apps
  • Astro File Manager (Look at your filesystems. More functionality than the built in “My Files”)
  • Barcode Scanner (handles all kinds of barcodes and can do searches online)
  • Instant Heart Rate (This one was fun, measures heart rate using camera)
  • Droidopas (Helsinki area public transport guide, by my good friend Anteuz)

Samsung Galaxy S, pt.2 – Firmware Update & Lagfix

Short disclaimer: Flashing your phone may be illegal, immoral and may cause damage to your phone and/or soul. I take no responsibility for any actions you may or may not take. Proceed with caution, and remember, i don’t care if you brick your phone; even though that should be pretty hard to do!

So time for part two.

As of August 2010, The Samsung Galaxy S (European Model) ships with Android 2.1, also known as Eclaire. While it’s a pretty stable version of Android, where everything works sort of, it’s not very fast or optimized. 2.2 or Froyo, will bring out the heat, and make this into the fastest device on the market.

Want to acchieve this speed boost right now? Thought so. You can do it, with Android 2.1, by doing a few simple hacks:  Upgrade to a later build (unofficial), and install the One-Click Lagfix. I’ll try to explain both:

- The newer build of 2.1 (currently JM6 is the name assigned to the latest firmware) will improve some functionality, mostly not related to speed, but for instance GPS functionality. The builds are unofficial and come from..various sources. I won’t link to them here, as i’m unsure of their legality, but i can say that they work just fine. Paranoid users might want to skip this, as this would be the perfect slot to slide in malware or other nasties to peoples phones.

- The lagfix adresses one of the more serious issues with 2.1, namely performance. The Galaxy S phone uses an RFS filesystem on the internal flash memory, which is far from perfect or optimized for such a platform. The problem is visible as general sluggishnes, for instance while flipping from page to page, or doing things in quick succession. The lagfix creates an ext2 filesystem within a file inside the internal memory, and places system files there, which is clearly visible as a highly increased performance. No more sluggishness anywhere. Synthetic benchmarks, such as Quadrant show an increase of over 1000 points. But subjective usage improvements are, of course, most important. The lagfix used to be much more complicated (while not impossible) but is now available as an application in the Android Market, and offers “One-click” installing.

Firmware Update

Updating the firmware is not an easy process for JoeBob69, but for someone who has played with gadgets and computers for a while, it’s no trouble at all. The things you need to start updating your firmware are:

  1. An installation of Microsoft Windows (i have not tried this through wine, but it might work
  2. Samsung Kies, or just the driver for the phone. When you connect your phone with the provided  MicroUSB cable, Windows should detect the phone. This isn’t specifically needed for this phase, but you will need it for the lagfix.
  3. Odin 1.0. This is the actual firmware flashing program.
  4. The correct .pit file, which for the Galaxy S with 2.1 Android is the s1_odin_20100512.pit. Again, i won’t link to it, you can find it through google
  5. The firmware you want to install. The fastest one right now seems to be the 2.1 build JM5. The 2.2 builds are as of this time not yet good choices, and usually slow. Firmware packages need to contain three files (two in some cases, but i won’t go in on that issue here): CSC, Phone and Modem. They can be of different versions internally, for instance, my phone now has a JM6 Phone firmware, a JM1 modem and a JM3 CSC package.

Start out by setting your phone in download mode.

  1. Make any necessary backups. Your contacts, SMS messages and Emails will not survive. Stuff under /sdcard on the phone will most likely survive (pictures, media, etc.), but take precautions here. Smart people sync their stuff elsewhere, like Google. They already have everything they need about you, so don’t worry.
  2. Shut down the phone, and if you like, remove the sim card and any microSD card you might have inserted.
  3. Press down the Home key and the Volume Down button, then the power button.
  4. Phone should start to a black and yellow “Download” mode, with the classic Android mascot
  5. Start up Odin on your PC, but DO NOT hook up your phone yet.
  6. In Odin, select your pit file, and on the left side, check all three boxes (Re-partition, Auto-Reboot and F. Reset Time)
  7. At this point, hook up your phone, and wait for Odin to detect it. The status box should read “Device added!” or similar.
  8. Hit Start on the right side. Wait for the phone to reboot, and Odin reports PASS with green background.
  9. Remove the battery and disconnect the phone. Boot it up to Download-mode again, but don’t hook it up to your PC yet.
  10. Restart Odin, and this time don’t add the .pit file. Instead add the three firmware packages under Phone, Modem and CSC. They should be individual .tar packages. Don’t try to open them.
  11. Remove the checkmark from Re-partition, on the left, but leave the other two.
  12. Connect your phone and wait for it to be picked up by Odin.
  13. Hit Start, and wait for it to go to PASS, again.

Depending on the firmware you may have downloaded, you may get a funky language on your first boot. You can fix it with the following “Blind-Guide”:

  1. In the Home-screen, hit the left function key to get the menu up.
  2. Select Settings, which is the Gear-icon, in the bottom right corner of the menu.
  3. Select Locale and text, the icon is a grey box, with the capital letter A inside.
  4. Hit Select Local. This is the top item in the menu.
  5. You should now find your locale from the list.

You may also need to restore your backups, and your APN settings for mobile broadband and MMS. Follow operator directives for these, as they will probably be lost during the firmware update. Android 2.2 will fix this, allowing you to do updates Over the Air, without losing your stuff.

Lagfix

The lagfix, which is a must for any Samsung Galaxy S owner, has now been made very simple. Open up market, and search for Samsung Galaxy S. You should see the One Click Lagfix. Download and install. Start it up, and install ext2 tools, and then the lagfix. On-screen instructions are pretty self explanatory. You can also do some kind of rooting here, but i haven’t tried the functions. Reboot when asked or just let it do its thing.

What happens is, you’ll get an ext2 file system on a part of your internal memory (you can also use a fast microSD card, which, i’m told, improves performance even more), and stuff will be run from that. This is much faster, and i am sure you’ll notice the difference.

Can i break something?

Well, it’s unlikely. You can use Odin in every scenario i’ve read about to restore a working firmware on your phone. I have read of a few isolated cases where things went awry, but were still fixable through some hacks.

Everything described here should be pretty safe, but again, i’m not liable if you brick your phone. Proceed with caution and don’t forget common sense.

Benchmarking

A standard 2.1 off the shelf Galaxy S should get about 900 points in Quadrant ( a benchmark application you can find in the Market). After the firmware upgrade and lagfix, i’m getting around 2100 points. This is of course synthetic stuff, measuring CPU, I/O and Graphics performance. Quadrant Pro will show you more details about how the points are distributed and calculated. It seems to be very I/O focused, as the filesystem fix brings an improvement of over 1000 points.

On the other hand, you’ll be so pleased with your smooth flowing UI that you won’t really care.

Samsung Galaxy S, pt.1 – Rooting

So, i became a Droid of the Galactic Empire, and left the Cult of Steve; dumping my iPhone 3GS to some other poor sod at the office. A few weeks ago, i went out and got the Samsung Galaxy S; their current flagship model.

The specs of the phone are as follows:

  • 1,0 GHz “Hummingbird” processor (Arm Cortex A8 base)
  • 2,0GB ROM
  • 6,0GB Flash
  • 512MB RAM
  • microSDHC slot (up to 32GB)
  • 4,0″ Super-Amoled screen 480×800 resolution
  • All the standards in the way of wireless, 802.11n, BT, A-GPS, HSUPA (7,2Mbit/s mobile broadband)
  • MicroUSB out, with support for TV-out

Basically it has a lot more oomph than the computer i had 10 years ago, in terms of almost everything, storage, cpu, telecom, etc. Anyway. It’s a nice phone, and so far i’ve noticed very few things to complain about. My intention is not a review per se, there are tons of those which speak for themselves. I’m gonna try to write simple-as-possible instructions for doing things like firmware upgrades, lag-fixes and other nifty tricks, as well as listing handy applications from the Android Market.

rooting

rooting of the phone has been made fairly simple. it consists of three distinct steps:

  1. Copy update.zip (as is, do not extract) to the /sdcard folder on your phone
  2. Boot phone into recovery mode
  3. Apply update.zip and wait for phone to reboot

Steps are performed as follows.

1. Go to the Homescreen and press the menu button (left of the home key), -> Settings -> About Phone -> Usb Settings -> Mass storage
2. Hook up USB cable and install any drivers that might be prompted, or not. Your internal memory (/sdcard) should be mounted
3. Copy update.zip to the root of that folder
4. Disconnect USB cable, and shut down phone
5. Boot phone so that you first press the volume up key on the side of the phone, and the home button, and keep holding them down, while pressing the power button. Phone will boot into recovery mode. Release all buttons as soon as you see text scrolling by. This will come after the Samsung logo.
6. Using the volume up and down keys, select the menuitem called “Apply update.zip”, and press the Home key to confirm. Rooting will commence, and phone will reboot after it’s done.
7. You will have two new menu entries in your phone under the Applications menu: “Superuser permission” and “BusyBox Installer”.
8. Open up the BusyBox Installer and upgrade to the latest version, or do it through the Android Market.

You now have a rooted phone, which can access any part of the phone filesystem, and allows you to use su to gain superuser permissions to do whatever you want. Get a terminal app from the Market, or do whatever you please. You can’t really break it, since you can always use Odin to reflash the phone, should something go pear-shaped. I’ll cover this in my next post.

Edit: Small corrections in terminology, download mode -> recovery mode. Thanks Anteuz.

Assembly 2010, and some other updates

Assembly 2010 is over and done. Thursday through Sunday was spent at Hartwall Arena, the biggest hockey arena in Finland. Assembly is, to my knowledge, the biggest demo-scene party in the world. It’s also basically (and some would say today, more) a LAN party. Imagine 3000 geeks hauling their computers, audio gear and other doohickeys to a single location with near limitless bandwidth and power to make music, socialize, play games and above all else, watch demos and music produced by others; competing in different categories. These are collectively called compos, short for competitions.

*disclaimer* I’m not involved in the demo-scene, even though i greatly admire it. I also did not start computing with Charles Babbage in the late 1800′s, and am not familiar with most of the older hardware. Some terms might be wrong, because i simply don’t understand everything, but i try. *disclaimer*

The wildest part of the event are the compos. It’s a demo scene event, not a LAN party. There’s a separate event called Assembly Winter, which is focused on gaming. But still, i would say most attendees are there to play games. And while i did my fair share of gaming, demos are what i come there for. And my friends.

So what’s so special about demos, and what are they? Well, demos are interactive, or non-interactive multimedia presentations, that have to abide by certain guidelines. Some demos are called intros, and are shorter, and smaller in size than full demos. There are two kinds of intros at assembly, the 4K and the 64K intros. The K refers to Kilobytes, as that is the sizelimit for the compressed intro. Intro are all executable, so whatever you see and hear are created by the program as it is being run. It’s not a drawn animation or a set of ready made frames.

Now imagine 4KB. 4096 characters. Try to include music, moving graphics and text, and if you have any concept of memory, you will be blown away. My Suunto T3 digital watch has multiple times this amount of memory. Heck, your SIM card has more memory to use! Though, it has to be mentioned that libraries and such are not included in the compressed demo. With libraries included, the size is considerably larger, but.. still. They are awesome, and the people making them are total demi-gods at their craft.

The entries in general were good, and surprisingly plentiful. Quality was high in the 4k and 64K intros, while the demo category was a bit of a letdown, compared to the last two years, at least.

I met some great people. you know who you are. Met some current and ex-colleagues, most of whom hard at work organizing the whole thing for the rest of us. Thanks to you guys.

—-

Updates

—-

Jacob Appelbaum, whom i mentioned in the HOPE posts, was recently arrested arriving to the US. Interrogated, his laptop confiscated and then returned (because he refused to hand over encryption keys). So i guess, the FBI didn’t really like the stunt he pulled at HOPE. I’m not sure what the current situation is, but i hope he’s alright. He seemed like a nice fellow, who does not deserve to be persecuted.

In other news, the Pentagon has threatened Wikileaks. They are demanding they take down all the material stolen (they mean leaked by their own people), or else. I wonder what the fuck they are going to do about it, huh? Bomb every colocation center in the world? Well it wouldn’t be the first time you just shoot at everything to prove a point. But i double dare them to do anything. Wikileaks isn’t going anywhere, and since the materials are already on the tubes (the internet for the rest of you!), they are never ever coming back to them again. Removing wikileaks, though this will never happen, will change nothing. It will merely fuel the fire, and for every mirror taken down, five new ones will come out. The files are available as Torrents, and already on numerous other sites. “Taking back” or “returning” content does not work like the on the internets, guys. If person A steals a missile, you can demand to have it back. If person B copies files that you inadequately protected, and walks out with them, and posts them on the web, it is a copy, therefore un-returnable, especially when it’s been distributed.

So in conclusion, do not threaten people when you do not have the slightest fucking idea of what you are talking about. Second of all, secure your shit if you don’t want it to get out. Third of all, i hope you burn in hell for the stuff you’ve done all over the world. You do not run the world, even if you have all the bombs.

That is all.

The Next HOPE recap vol. 2

So what else could one say about The Next HOPE? Well, a few things to be sure.

Interesting talks i attended/filmed

As i was working with the AV volunteers, i couldn’t be in many places at once, at times. Sometimes, i would be filming a talk, even if it wasn’t the talk i wanted to see. But luckily, i didn’t go or film a single boring talk! Sure, some may have been closer to my heart than others, but let’s face it: we had some great speakers. Some of the talks i attended were the keynote on Friday by Dan Kaminsky (that guy is a fucking rockstar, and funny as hell on stage!), the GPS talk by Cheshire Catalyst, The Social Engineering panel with Emmanuel, Kevin Mitnick (got to exchange a few words with him as well; great guy!), Not-Kevin, Bernie S. and.. a social engineering dog? Anyway.

Other hot topics included the talk by Lazlow on.. well, media, radio, freedom and all manner of subjects. Also got the chance to talk to him, and he seemed like a really cool cat. I complimented him on his work in the GTA games, where he has been making and producing the different in-game radio-stations. The talk-radio ones (often hosted by him) are fucking hilarious, and have been my favorites in all the games so far.

Of course the big controversy was with the Saturday keynote, scheduled to be held by Julian Assange of Wikileaks. He, of course, did not show up, and in his place was Jacob Appelbaum, who, against all odds, pulled off a great keynote, finishing off with a viewing of the Collateral Murder video (that started part of the Wikileaks controversy in the first place). There were no cheers, no applause when the video ended. It’s some grim stuff, i tell you. Go watch it if you haven’t. You can find it on the webs.

This talk was very interesting not only due to it’s topic, but due to the fact that at least 3 federal officers in civilian clothing attended the conference/talk. Jacob started out by saying he doesn’t know where Julian is, or how to reach him, and that there would be no point in arresting him. Despite all this, measures were taken to ensure lulz and safe exit for Jacob. Decoy Jacob was deployed and actual Jacob made it out fine, and tweeted he was on the airplane to Europe only a few hours later. Hilarity ensued.

Another great talk was the one that dealt with Trolling and internet culture. It had examples of memes from 4chan, and stuff that ‘Anonymous’ has been doing. Including a mention of operation.. Slickpubes. The content of which was undescribed during the talk, but let’s just say it involved going to various bookstores in New York and placing pubic-hair inside various religious (mostly Scientology) books.

Spot the Fed, HOPE edition?

Well as I said, there were at least three federal agents assigned to the conference. I personally saw at least one, or that i am fairly sure fits the bill. He stood out quite clearly, and picked his seating position quite precariously, as to view the entire room. He was also not interested in any of the talks, and wore iPod earbuds all the time. His clothes were so untarnished, they could have been bought that same morning at Macy’s. Also, the biceps on that guy was something a geek can only dream of.

Other volunteers reported seeing three “obvious FBI agents” during the Wikileaks keynote, and i was told later that three people were also seen following decoy Jason down to the lobby, until they noticed the ploy and split off. I can’t verify the validity of this, but, i have no reason to distrust my fellow volunteers.

Stuff i bought

During the conference, i spent most my money (actually, during the entire vacation i suppose) on conference merchandise. The things i bought include:

  • The Book of PF (OpenBSD packet filter bible)
  • The three Wizzywig comic-books by Ed Piskor (signed too!)
  • A Manga physics book for a friend
  • Several T-Shirts
  • a black 2600 mug
  • some back issues i missed because my subscription ended
  • ….and a crapload of cool stickers, some of which adorn my Thinkpad X41 at this very moment!

Conclusion

In all, i had one heck of a time, and i can’t wait to get back. Sadly, HOPE is only held every two years, and next time might have to be somewhere else, seeing as Hotel Penn is probably getting torn down. There was a petition being signed at the conference, and i hope many people did, to save the hotel. But seeing as the owner of the hotel is also somehow involved with the development company that wants to build the 67 story office building, the future of Hotel Pennsylvania is looking grim indeed.

But then, we’re hackers. Hackers always find a way to make things work, and with the people i saw; attendees, organizers and volunteers alike, i am certain that HOPE will rise again.

Next year though, i might be going to Germany, seeing as the CCC folks host their thing sometime in the summer…….

The Next HOPE recap

The Next HOPE, Hackers on Planet Earth, held in New York, at the Hotel Pennsylvania Jul 16-18th. HOPE is a bi-annual conference, which concentrates on technology and other subjects (..everything?) that interests the hacker mind. This year’s event was my first, and my first time in the United States. I’ll try to sum up, in fairly chronological order what happened during the last week.

I flew to New York via Amsterdam, on KLM / Delta. Security was a main concern from the get-go. To start off, you had to fill out a form on the web, where you basically state that you are a good person, and not up to bad things. Or that you were involved in Nazi activity during the second World War. Normal questions such as that. Completing the form gives you a 12 month permit to travel to the USA; this does not however stop them from turning you back if they don’t like you for any reason. ESTA is something that Visa Waiver countries have to fill out these days. No I-94 forms though, which makes traveling a bit easier, i suppose, since you don’t have to physically fill in forms, and keep part of it for flying back…

The ride to Amsterdam was largely uneventful, but in Amsterdam, security was ramped up. First you had to pass regular Airport Security, to get into Terminal .. C? to fly to the US in the first place. When I got to the gate, there was a secondary security checkpoint, set up just for that gate. Each traveling party is asked individually to come talk to an official about who you are, who packed your bags and where you are going. Kind of a personal interview. After that, you’re taken through a standard security checkpoint, though everyone was frisked and patted through, no matter what the metal detector said. Some people had their carry-on bags opened and checked separately.

The interesting part about this security checkpoint was the fact that they had two of the full-body scanners present. They were not used however, which was curious. Two phone-booth sized things in the middle of the floor, which could be closed around a passenger, and supposedly, used to “nude-scan” a person. It would have been nice to see that in action.

So, get on the plane in Amsterdam (767-300ER), and during the 8 hour flight, you fill in the US Customs form, which declares what you are bringing (and leaving) in the US, whether you are carrying samples of biological material, whether you’ve had contact with farm animals (yeah, right), and such questions. The form was collected by customs agents at the airport when you arrive.

We flew into Newark. Upon landing, we were taken through a security checkpoint, and then sent to queue for the actual Border Control checkpoints. Here, we are once again asked the same questions (Who are you, why are you here..), and then given the final go-ahead to step on US soil. They had ominous looking “Screening rooms” for people who looked suspicious, or who just wanted to have their assholes probed, i guess. Didn’t see anyone get taken in there, but i did see Border Patrol agents, or whoever, DHS-people looking at travelers, supposedly for signs of nervousness etc.

Take the Airtrain (a monorail system) to a train station, and then the NJ Transit train into Penn Station. 15 dollars for the entire trip, which wasn’t bad at all. Trains were fairly clean and air-conditioned, which was nice, because the heat was nigh unbearable.

At Penn Station, we had at least three different agencies at work, all with different uniforms, weaponry and bad-assery. The Department of Homeland Security had these bad-ass looking guys in tan BDU’s, thigh-holsters for their pistols and sunglasses inside. The National Guard had standard beige camo, and assault rifles. NYPD had their guys in blue and whatnot, and i think the Transportation Security Administration had some officers as well, though not armed. There were “soldiers” everywhere. I felt like, if i was running for some reason, i would just have been shot.. No incidents to report though.

There were signs everywhere at Penn Station, in the style of “See something suspicious? Report it”, with pictures of “abandoned bags” and other such horror. Just felt like they were creating an atmosphere of fear, instead of an atmosphere of security.

Hotel Pennsylvania was at the corner of 33rd street and 7th avenue, opposite Penn Station / Madison Square Garden. A central location in midtown Manhattan, with easy access to all areas of New York, either walking, by buss or by subway. Everything seemed to flow through midtown. The Empire State Building was a few blocks away, and so was Time Square.

The Hotel had an offer for conference visitors, which made the place even cheaper, and for midtown Manhattan, 129 dollars per night *is* cheap. The rooms were pretty basic, some would even say run down. Paint had chipped on many walls. There was a disgusting black splotch of mold on the roof (probably below the A/C device in the room above), and a missing lock (i mean there was no lock, no mechanism, and the handle was lose) in the bathroom door. The good things were: Clean and comfortable bed, hot shower, working A/C and a working TV. I was pleased, and after i got off the initial shock, i had a pleasant stay. Hotel personel was nice and polite, and the services of the hotel in general were good.

The Conference

The conference started in earnest on Friday. I however, decided to take the elevator up to the 18th floor, where the main speaking areas were, and sign up for some volunteer work. I walked up to the desk, “manned” by Lindsay (Nick Farr’s right arm during the conference), and signed up to do some AV work. I took the elevator down to the Mezzanine level, where the Vendor and workshop areas were going to be, and started helping out by unloading trucks and carrying stuff. Later that evening, we put down some (read: a lot!) of cable for speakers, video, light and whatnot. By the end of Thursday, things were looking awesome and we were ready to start the conference the following morning! We had lots of people “from different walks of life” helping out with all kinds of stuff. As for the AV and lighting stuff, guys from Carnegie Mellon university (college?) were present to co-ordinate stuff, and they had lent/rented most of the equipment from different places. I met loads of interesting people during the volunteer work, including Lindsay, Nick Farr, Rudy, Daydreamer, Slowpoke, Kelly, and loooads of other people whom i can’t even start naming here, due to the sheer volume.

Volunteering was a great job, as you got to see the inner workings of the conference, meet people, and see the hotel “backstage”. As a hacker, seeing how something works is always interesting. Helping out and learning new things in the process is even better! I learned a whole bunch about AV-tech, and ended up doing a bunch of the video work. In all, i clocked in nearly 30 hours of volunteer work, most of that spent either building or tearing down the conference, and the rest video-taping the different talks. They will all be online later at the HOPE website, at http://www.hope.net.

In all, there were close to 100 talks, running on four different tracks, in four different rooms, all named after significant inventors and innovators in the technical field: Bell, Tesla, Lovelace and Morse. There was no way to see them all, as they ran in parallel, but that’s why there will be audio and video (some of it filmed by me! so when it sucks, you know who to blame :) ).

The Mezzanine level had the vendor and workshop areas, as well as the “administrative” areas, such as the Information desk, the Security desk, and the noc NOC. You could try out Segways, solder some stuff in the hackerspace area, grab a Club Mate or just chill out on the hammocks. Later in the evening, there were some “chiptune” concerts and movies being shown. You could learn how to lockpick, buy some books, pick up cool stickers or just talk to people. Just sitting down on Saturday evening with some people, i had an 8 hour discussion about all kinds of issues ranging from the Metrocard system in Finland, to politics to mandatory military service. These were people i didn’t know from before! Spontaneous contact with nice people was… nice. Just sit down, and start talking.

Oh boy… there is so much to say..  I’ll probably split this post into two or more pieces. Too much to say. Still jet-lagged, and tired from the whole ordeal.

Lab .. and life-updates

So as many of you have heard, my wife of 6 wonderful (no sarcasm here.) years has left me. She moved out yesterday, and left me here in this god damn 4 room apartment alone. This means, it’s time to look for a new place to live (still in progress), and do some redecorating. The lab will undergo extensive rework, and i’ll try to pull a “Didak” and document the process here. My old corner-desk is going to B, and i’ve already bought a 160cm x 80 cm desk for my lab. I’m also replacing my 2×22″ screens with one FullHD 24″ screen (one to start off, more later), and possibly an Ergotron LX arm for the screen. Those are really hard (or slow) to come by here in Finland, so we’ll have to see about that.

So what i’ve bought so far is the Galant desk (man i feel like watching Fight Club again…), with T-shaped legs from IKEA – 169€, and a BenQ G2420HDBL screen from Jimm’s PC-Store – 188€.

Pics will come later today as i get some help to move stuff around. I hope i can get cables done in a smooth operating fashion. No more tangles on the floor, thanks.

Guff about Grub 2 – Changing default boot target

Grub 2 (btw, why is it called that since the version reports as 1.97 or something?) has a fucked up way of doing things. A grand example of engineers designing something for themselves. Changing default boot target in Grub 1 was as easy as editing menu.lst, but this is not the case with Grub 2. Here, it’s a mish-mash, a hodge-podge, of different files that rely on each other, and are mudged together by various scripts to make a working grub boot menu.

Without further ado, to change the default boot target in Grub, i.e. get Windows to boot as default, or a specific kernel version (if you have many installed) would be done like this:

Open up a terminal, and open up the file /boot/grub/grub.cfg. My file looks like this:

[...the header is here, but omitted....]

### BEGIN /etc/grub.d/10_linux ###
menuentry “Ubuntu, Linux 2.6.31-19-generic-pae” {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd1,1)
search –no-floppy –fs-uuid –set c3ebcb50-f07e-4985-9734-471bb5c607da
linux   /boot/vmlinuz-2.6.31-19-generic-pae root=UUID=c3ebcb50-f07e-4985-9734-471bb5c607da ro   quiet splash
initrd  /boot/initrd.img-2.6.31-19-generic-pae
}
menuentry “Ubuntu, Linux 2.6.31-19-generic-pae (recovery mode)” {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd1,1)
search –no-floppy –fs-uuid –set c3ebcb50-f07e-4985-9734-471bb5c607da
linux   /boot/vmlinuz-2.6.31-19-generic-pae root=UUID=c3ebcb50-f07e-4985-9734-471bb5c607da ro single
initrd  /boot/initrd.img-2.6.31-19-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry “Memory test (memtest86+)” {
linux16 /boot/memtest86+.bin
}
menuentry “Memory test (memtest86+, serial console 115200)” {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry “Windows 7 (loader) (on /dev/sda1)” {
insmod ntfs
set root=(hd0,1)
search –no-floppy –fs-uuid –set 561ed31d1ed2f4c9
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the ‘exec tail’ line above.
### END /etc/grub.d/40_custom ###

What you want to look at here is the name of the menu entry you wish to boot as default. In my example, we’ll use Windows 7. The relevant bit is in red.

Select and copy the relevant section, that is, whatever follows menuentry, and inside ” “, whatever the entry you want to boot as default.

Close the file without saving any changes, and open up (as sudo) the /etc/default/grub

In the beginning of the file, there’s a line that looks like:  GRUB_DEFAULT=0

The interwebs are full of instructions on changing the number to something other than 0, where 0 corresponds to the first entry in the grub.cfg file we looked at earlier. This will work just fine if you never ever install a new kernel, a second or third OS, or do any changing what so ever to your grub configuration. Why i like to use the actual menuentry name is that that will not change, unless you want to change it.

Paste in what you copied from grub.cfg replacing the 0. My new entry now looks like: GRUB_DEFAULT=”Windows 7 (loader) (on /dev/sda1)”

It’s very important to remember the quotes, because otherwise the next step will fail, since it doesn’t understand a line that ends with a parenthesis ).

Save and close the /etc/default/grub file, and run the following command: sudo update-grub

This will parse the /etc/default/grub file, and generate a new /boot/grub/grub.cfg file which controls the actual menu (you could call this the old menu.lst, but one you can’t edit by hand without fucking everything up).

If no errors are printed, you are good to go. Run sudo reboot or use the gui to reboot the computer. Your new default entry should now be highlighted in the grub menu, and if you don’t touch anything, should boot.

HTPC 2010 – The Install

The Install

Time for the install. Nothing spectacular here. I booted the thing off a USB-drive i created using unetbootin 3.93, with a Ubuntu 9.10 (32-bit) iso slapped on there.  There was some issues booting from the stick, because i couldn’t get to any kind of boot menu (F12 didn’t take me anywhere), so i had to take a look at the BIOS. The setup was a bit different from what i’m  used to, namely, the usb drive is detected as a hard drive, and not as a removable or separate device. So, to start off, i had to set the hard-disk to boot as the first device, and then set the order of the hard disks, so that the “primary” hard disk was the USB-drive, and the secondary drive was the internal 250 GB drive. After this, the boot worked just fine. After the installation was done, removing the USB drive bumped the 250GB to the primary drive.

Other things that need to be noted in the BIOS are: Setting your graphics memory to 512 (or whatever your max is). This will ensure flawless HD playback. Default is usually 64 or 128 or something, which isn’t enough. Also make sure you have all the necessary audio and video ports enabled.

The Ubuntu installation was quick and painless. I chose to use the entire 250GB drive, and let Ubuntu do it’s magic on it. Nothing special during the install.

After the installation, only a few packages are needed. The commands that i ran, in order:

apt-get upate && upgrade

apt-get install nvidia-glx-185

This updates the repositories, upgrades existing packages, and installs the nvidia hardware driver. You can also use the Administration -> Hardware Drivers, which at the time of this writing, installs the 185 driver.

Note! I had some problems with the latest 195 driver. After installing it, there were some dpkg errors that prevented the installation from finishing properly. After this, graphics were fucked, and i couldn’t start x. When i did get the driver installed, and everything seemed to work, i was completely unable to play any HD quality .mkv files. XBMC would crash to the desktop. Also, trying to play them in VLC for instanec, resulted in equally disasterous problems. So unless you are having problems with your ION and the default 185 drivers, don’t upgrade.

After this i pretty much followed the linux installation guide of XBMC in their wiki. Roughly the installation is:

  • add the correct repositories
  • run apt-get update
  • run apt-get install xbmc
  • configure sound
  • configure xbmc
  • done.

The setup i had was: Run video through VGA (i have only one HDMI in my current TV), and audio through spdif to my amplifier. This was a fairly easy thing to set up, though the audio was a bit problematic, as i will describe a bit later.

Connecting the VGA got me a good picture right away with native resolution (1366×768), whereas through the HDMI it got detected as 1280×720, which is incorrect. And the picture wasn’t scaling correctly either, so i figure i would have needed to add some modelines to my xorg.conf. More about this later when i get my new Tv and hook up using HDMI.

About the audio

Getting audio to work was a bit problematic. In XBMC go to System -> Settings -> System, and then to the audio output tab. There, you need to check that you have your amplifier or TV set to support DTS and AC3 audio (if it does), and that you are outputting digital audio. For me, i had to set the audio output device to custom, and the device to plug:dmixer, and the passthrough device to IEC958 to get everything working. Changes to your .asoundrc in your profile root was also necessary, to make it understand the plug:dmixer device.

If you don’t make the above changes, you will find that only surround movies (DTS and the likes) will work. The rest, say shittier mp3 audio movies will not play anything, or even display a “incorrect audio device” message. Which is odd, because you kind of expect it to be the other way around, that the complicated DTS and other encoded sound would not work.

First off, find out which device you want to be using, by running the command aplay -l in your terminal. Look at the card number, and the device number, and see which output you want. In my case, it was the spdif, which was card 0, device 1. In alsa speak, this equals hw0,1

The contents of my .asoundrc file, which is placed in the root of my profile is as follows:

pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,1"
        period_time 0
        period_size 1024
        buffer_size 8192
        #periods 128
        #rate 44100
        rate 48000
     }
     bindings {
        0 0
        1 1
     }
}

The bold line over there is the important one, and the only one you possibly need to change. Save the file, reboot the computer to be sure.

Now sound should work in any media files, regardless of the encoding.

Customizations i used in XBMC was the Rapier skin, basically. I stream media from my other machine through gbit lan, which works fine with any type of media.  I used a standard samba share for this, and no issues have cropped up so far.

I could write a bunch on scraping and other XBMC stuff, but they are so well documented in their wiki that i won’t bother. Just remember, the backspace key takes you back one level, and the c-key gives you the “right-click” context menu on any item (like a movie or folder). That is all.

References:

http://wiki.xbmc.org/?title=XBMC_for_Linux_specific_FAQ#S.2FPDIF_out_for_both_analog_and_digital_audio

http://wiki.xbmc.org/index.php?title=Installing_XBMC_for_Linux

http://wiki.xbmc.org/index.php?title=HOW-TO_install_and_switch_between_skins_in_XBMC

http://xbmc.org/skins/

HTPC 2010 – The Build

The build

I got word from Jimm’s Pc-Store that half of my parts had arived. The rest i would buy from Verkkokauppa.com because they had it in stock. I ended up getting a 250 gig hard drive for 39 bucks, simply because the cf solution was not immediately available (not in stock), and it would have cost nearly three times as much. Otherwise the parts list in the first post holds true.

I started by skimming the manuals of the case and the motherboard, and then started taking the case apart to prepare for installation. I had to remove the top cover, obviously, and also add and remove some of the internal cables according to my needs.

All the parts in one pile!

This is what the case looks like on the inside. Note the power supply, or actually just the distribution-point. The powersupply is actually that transformer-brick next to the case there. There is a 24-pin atx, 4pin 12v extra power, cables for floppy, molex, and sata, which are fairly modular, i.e. you can chose not to connect the molex cables if you don’t need them, like me. The case has a rubber-padded spot for the hard drive, on the bottom left in the picture. This should (and did) eliminate most of the vibration caused by the movement. The case also has front panel audio, usb and firewire, as well as a memory card reader. Sadly, the motherboard i got only had one internal usb, so it was a choice between the two front panel usb ports, or the memory card reader. I chose the usb ports, because it’s a handy way to hook up external hard drives and media players. Ofcourse, one can just switch the cable, and use one of the external usb ports to hook up the memory-card reader.

Cables for power and hdd led, as well as the power-switch are also included. Cable management turned out to be a bit hard: the 24-pin atx power cable is very very thick and stiff and needs to be forced down quite a lot to get the top cover back on.

The case, opened

power supply

The "Power Supply"

After this, it was time to put in the Asus motherboard, the hard drive, and hook up all the necessary cables. I forgot to take a pic of the innards with all the parts connected, but i’ll do that today. Here’s a picture of the motherboard, pretty handy-looking huh?

motherboard

The Asus Motherboard

So when everything was connected, it was time to put the case back together, and prepare for installation. The plan is to install Ubuntu 9.10, with XBMC 9.11.  A few more pics of the ready build. Note the fucking awesome blue led, without which, this build would be like, less cool.

Done!

Done!

A view from the top