Notatypewriter's Blog

Umm… what?

Posts Tagged ‘linux

Installing Sun Java, Eclipse, and Android SDK on Ubuntu 10.04

leave a comment »

Ever since Ubuntu (and Debian) removed Sun Java from their repos, the official instructions have been out of date. (Additionally, Debian’s and Ubuntu’s wikis about installing Sun Java have become out of date.) Google knows about this since I’ve seen the issue brought up on their mailing lists, but they’ve never updated the documentation. It is yet another reason why I feel Google does not care so much about third party developers, but c’est la vie.

Additionally, the Google release cycle moves much faster than Debian’s. Ubuntu also has trouble keeping large packages like Eclipse up to date, so it’s not always certain that the version of Eclipse available in your package manager will be the version by the ADT Plugin. For example, the version of Eclipse in Natty (11.04) was 3.5, which was originally released in 2009. Google still advises developers to use Ubuntu Lucid 10.04 even with all these outdated packages. (Anyways, Linux package management doesn’t fit with today’s model of desktop computing.)

Read the rest of this entry »

Advertisements

Written by notatypewriter

2012 April 15 at 11:49 am

Posted in Nerding out

Tagged with , , , ,

Things I learned today: apt, cron, and unattended-upgrades

leave a comment »

Today, I noticed my dad’s desktop was not updating Flash, Chrome, Java, and other high-risk items, which was odd because I use unattended-upgrades on that computer. The last time I logged in was a few months ago, so… yeah. Pretty bad. For example, Flash version was at 10.3.181.14 and the current version is 10.3.181.34. Chrome was at version 11.0.696.68-r84545 (released 2011 May 13) and the current stable version is 13.0.782.107-r94237 (released 2011 August 2). The installed Java was 6.24 and the current version is 6.26. So, security holes galore.

Read the rest of this entry »

Written by notatypewriter

2011 August 4 at 11:36 pm

Sector read error during RAID resync

leave a comment »

I run a 4-drive RAID 10. Basically this means data is duplicated and then striped. Each drive is 2 TB so I get 4 TB of usable space. Theoretically the RAID can survive up to two drive failures, as long as those drives didn’t make up half of the array and it’s duplicate.

I shipped this collection of drives via USPS during my move from college to my apartment. The box arrived looking pretty beat up and, even though I thought I had packed everything well, many of the drives had circuit board damage, physical interface damage, and one had platter damage (something sounded loose inside the drive).

Two of the four drives in the array showed no visible damage, so I hoped this constituted the full array. It did, two replacement drives from Newegg arrived, and I began the resync.

Then I get a sector read failure on one of the original two drives. FFFFFFFUUUUUUUUUUUU.

Resync stops and the array is basically considered dead. My computer is still up, so I try to login at the console and I get a ext4 read error instead. (This occurred because all of my binaries and configs for this system lived on the RAID.) This is really bad news. I boot a live CD and the RAID refuses to assemble.

Here’s how I got my RAID back.

First, I let Western Digital’s Data Lifeguard tool on the Ultimate Boot CD remap the sector and recover whatever it could. It said it was successful.

Then, I booted into an Ubuntu 10.04 live distribution. I forced mdadm to assemble the array using:

mdadm --assemble --run <uuid of array>

Then added the two drives from Newegg and let the resync finish.

After the resync finished, I let fsck run over the filesystems on the RAID, fix a lot of orphaned inode errors, and everything seems to work flawlessly now.

Needless to say, I got really lucky

Written by notatypewriter

2011 July 16 at 9:23 pm

Posted in Nerding out

Tagged with

Huh?! I didn’t run out of disk space…

with one comment

Windows destroyed my partition table a couple weeks ago, so I had to reinstall Ubuntu and recreate my somewhat complicated dm-crypt+LVM partition layout. This gave me an opportunity to reformat my partitions.

The Ubuntu (and Debian) alternate installer presents the user with a choice for usage scenarios: standard, news, largefile, and largefile4. These let the user choose how many inodes to create for that partition, which limits how much space is used by inodes. Each inode is 256 bytes. But since ext{2,3,4} uses one inode per file or directory, it also puts an upper limit on the number of files in the filesystem.

Usually, the larger your files, the fewer inodes you want to create. If you have large files, you’ll run out of space before you run out of inodes, so you want more space and fewer inodes.

I chose largefile4. I was copying some of my backed-up data back onto the partition when I got an error “no space left on device.” I was pretty confused. I was only copying 8.2 GiB of stuff onto a 82 GiB partition. Turns out it was because I ran out of inodes. The largefile4 option created only 21141 free inodes and I had 24319 files in this set of data. The largefile4 option was obviously a bad idea. This data was mostly jpegs, so the file sizes were much too small to take advantage of the fewer inodes.

After reformatting each filesystem, I ran tune2fs to list the number of inodes available for use (Free inodes value). You can see the ratios used by looking in /etc/mke2fs.conf. Here were the results for the same partition (containing 21657600 4096-byte blocks for a total size of 82 GiB):

largefile4: 21141 = 5 MiB = ~0% usage
largefile: 84597 = 20 MiB =  ~0% usage
defaults: 5414901 = 1322 MiB = 1% usage
news: 21659637 = 5288 MiB = 6% usage

I haven’t picked which one to use yet, but it’s down to largefile and defaults. 1322 MiB is almost a whole movie file. Or I could always specify an inode_ratio in between…

UPDATE: I settled on an inode_ratio of 262144 which gives me 338421 free inodes, which is about 80 MiB. Very little usage yet lots of files. 🙂

Written by notatypewriter

2011 May 18 at 7:07 pm

Posted in Nerding out

Tagged with , , , , ,

Debian Squeeze and Jetway NF76-N1GL-LF and Jetway ADPE4S daughterboard Experiences

leave a comment »

For a NAS I’m building, I got a Jetway NF76-N1GL-LF motherboard with a ADPE4S daughterboard that adds an additional 4 SATA ports. I wanted a VIA processor to take advantage of Padlock while keeping power consumption low.

I chose to throw on Debian Squeeze x86_64 even though it’s in beta so I could use ext4. Squeeze uses kernel version 2.6.32.5.

Turns out it doesn’t boot on my processor. In order to boot I had to update to BIOS version A06 and use idle=halt boot parameter. See the Red Hat bugzilla and the LKML.

Additionally, the pata_marvell driver that Debian loads to handle the Marvell 88SE6145 chipset on the ADPE4S daughterboard, based on what I’ve read, seems like it was written for PATA and not for SATA. In order to get this hardware to work, I had to blacklist the pata_marvell driver and set an option for the ahci driver to enable support for the Marvell chipset. See the Debian wiki.

Padlock acceleration doesn’t seem to work. When I dd /dev/zero to an encrypted partition it still generated a huge amount of CPU usage and hdparm speeds didn’t seem all that different when I unloaded padlock_aes. I couldn’t test using OpenSSL because Debian’s version of OpenSSL on x86_64 didn’t compile in support for the Padlock device. Whatever.

Written by notatypewriter

2011 January 12 at 7:16 pm

Posted in Nerding out

Tagged with , ,

Ubuntu Lucid Lynx on a T61p Install Notes

leave a comment »

Lucid Lynx Release Notes

Turn off Synaptic install recommends.

Partition setup: Two encrypted physical volumes using dm-crypt, then LVM using those two PVs with several LVs containing several ext4 partitions, each mounted with several options. TODO: try using LVM, then encrypt the resulting LV, then partition the encrypted device as usual

Grub2 got installed to /dev/sda, which was my Ultrabay removable hard drive. Had to install Grub2 to /dev/sdb with sudo grub-install –root-directory=/ /dev/sdb

Switched to Human theme by installing human-theme. (Both the Light and Dark themes are extremely ugly. The lack of shadows between windows means each windows’ title bars blend into each other, making it difficult to discern which title bar belongs to which window. Dark red on black is impossible to read on a low brightness LCD screen.)

Install Nvidia binary drivers, which exposes a problem in the Plymouth boot screen being of extremely low resolution. Several solutions at Ubuntu forums. Solution #35 happened to work.

GOTCHA: The text based address bar is missing in Nautilus. It’s hidden behind a Crtl+L, kind of like in Chrome. I like it. See this post.

Boot options: nospash and turn off quiet.

Enable Metacity compositing and disable Compiz

TODO: Test 802.11n with WPA2-AES and stability, and if necessary, install backports

Right Alt key does not work in Firefox or for bringing up the application launcher. solution at Ubuntu forums.

Install Gnome Do. Installed Cairo Dock instead. Gnome-Do and Docky was impossible to figure out.

Restore previous settings and programs: Pidgin (+profile), SMplayer, Firefox (+profiles), Chromium (+profile), byobu …

Set ntp to ntp.net.cmu.edu

Fuck vim-tiny. Get real vim.

Missing icons in menus. I have no clue why they did this. Those icons were much easier to remember than words. Solution

Enable Control+Alt+Backspace.

Enable notifications of updates

Might be experiencing this issue of dropped USB mouse inputs.

Written by notatypewriter

2010 May 25 at 12:27 am

Posted in Thoughts

Tagged with , , , ,

%d bloggers like this: