A Project Blog

iPod Mini Disassembly

by @ January 13, 2007. Filed under devices

My poor iPod Mini’s hard drive died a couple days ago, which left me without a means to play MP3s while walking around. Since I haven’t yet purchased a headphone adapter for my phone, I started googling and discovered I would be able to replace the dead hard drive with a standard compactflash card. I couldn’t wait for the card to arrive before taking it apart.

ipod mini

Update:

My 4 GB compactflash card arrived, I installed it in my iPod mini, crossed my fingers that I plugged it in correctly (top of the cf card faces away from the circuit board), and reassembled the thing. That was it, I plugged it into my computer and it after running the “restore” from iTunes it works! I now have a flash memory iPod mini :D

A Couple Ways to Run FSCK on Ubuntu

by @ November 19, 2006. Filed under file systems, howto

My server decided that an executable file didn’t really exist on the file system, or so I thought. Lack of sleep was the main problem, but here are some things I did to check my file system for errors. I setup this file system on a Ubuntu 6.06 AMD64 install with LVM, so everything is in LVM instead of standard partitions.

# sudo e2fsck -n /dev/mapper/Ubuntu-root

This was showing errors, but I ran it while the system was mounted and running, so there were open files, so this was normal. The -n kept e2fsck from attempting to fix anything, which was good because later I ran the command after booting from an Ubuntu LiveCD and found no errors.

Before booting from the LiveCD I tried to get the system to fix itself by running fsck on boot. Two methods I used to do this on Ubuntu were running these from the live system before rebooting, they both accomplish the same thing, so only one was really needed.

# sudo touch /forcefsck

# sudo tune2fs -C 40 /dev/mapper/Ubuntu-root

These appeared to have no affect, probably because the filesystem was fine, but I took down the system and ran fsck from a LiveCD instead. Of course, this wasn’t as simple as it should have been, the LiveCD did not detect my LVM volumes, so /dev/mapper/Ubuntu-root was missing. The fix was to install LVM2 and start it up.

# sudo apt-get install lvm2
# sudo /etc/init.d/lvm start

The /dev/mapper/ entries then appeared and I could run all the fscks I wanted. At this point my fsck checks were coming out clean, so file system corruption was not to blame.

Bug #59269 in lighttpd (Ubuntu): “lighttpd fails to restart during logrotate script”

by @ November 4, 2006. Filed under rails, server

I had my first Ubuntu bug report confirmed and fixed by the Ubuntu team. The bug I encountered kept Lighty from coming back up when being restarted. Since the default logrotate scripts had Lighty restarting every night, this bug hit my Rails apps quite often. Extending the logrotate script’s rotate frequency helped, and I was about to install Monnit, but now it looks like I can skip that knowing the restart bug has been fixed. Hooray for well managed open source projects.

makezine.com: Dual Booting Linux and Windows XP

by @ October 20, 2006. Filed under websites

I just discovered that one of my websites made the printed version of Make Magazine. In issue 6, on page 124, there is a link to frozentech.com/content/livecd.php. This marks the first time I’ve been in print!

Other big firsts include being on the radio, mentioned by Leo Laporte (!) (first hour, at 20:30), being included in a presentation at LinuxWorld, and being on Slashdot, Digg, IBM Developerworks, and SecurityFocus.

Windows Explorer List-style File Browsing in Linux

by @ October 14, 2006. Filed under links, software

I believe my quest for the perfect GUI file manager in Linux has been fulfilled after I stumbled across a file manager named Thunar while playing with XFCE on my Ubuntu laptop. My most missed feature from browsing Windows file systems has been the “List” view. It’s is, very simply, columns of file names, with nothing else. The main file browsers of Gnome and KDE, Nautlius and Konqueror, suprisingly cannot do this, and while they come close with a lot of customization, they do not mimic Windows Explorer perfectly. Nautilus like to wrap really long file name, or only do one file per line, and Konqueror likes to add “…” to the end of long filenames, which makes it less than useful.

Thunar does both these things, and does this very quickly. Here’s a pic of what I’m so excited about (right click and hit “view image” to see the full sized pic):

thunar.png

Ruby on Rails on Ubuntu Edgy

by @ September 30, 2006. Filed under howto, rails

I updated my laptop to Ubuntu 6.10 Beta (Edgy Eft) and it’s working great. So far I’ve had less problems than the beta of Dapper, but it has only been two day. My first experience off the tested path of synaptic packages is ruby on rails. Edgy comes with a rails package, but like Dapper, no gems. So here is the install of gems, and the rails from withing gems, on Ubuntu 6.10 Edgy Eft.

# sudo apt-get install ruby ruby1.8-dev irb rdoc
# wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
# tar xvfz rubygems-0.9.0.tgz
# cd rubygems-0.9.0
# sudo ruby setup.rb
# sudo gem install rails

I did get an rdoc error, but everything else installed fine, so I ignored it and continued on. This error is fixed by adding rdoc to the apt-get command above. It is here for historical purposes, and perhaps will help someone.

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load — rdoc/rdoc (LoadError)

Other Notes:

Roll your own servers with Netcat

by @ September 30, 2006. Filed under links

Lifehacker has a primer on Netcat, one useful utility which I don’t use nearly enough. Most stuff shown can be done with SSH, nmap, and telnet, but the author makes the point that netcat is on everything. So if you’re ever stuck without SSH, Netcat will be there. And if you haven’t setup passwordless logins for SSH yet, it’ll be quicker for many tasks than having to transfer keys around beforehand.

Subversion Primer

by @ September 26, 2006. Filed under howto

This is a guide for a single user to setup a barebones SVN repository quickly and without any extra confusing instructions.

The following steps will show how to 1.setup a repository for a project, 2. import files into the repo, 3. pull them out into a different folder, and 4. submit changes back to the repo. Before starting, make sure you have subversion installed (sudo apt-get install subversion) on all the computers you will be using. For this howto I’ll be using the server “closetbox” and the client “icebox”. Both are running Ubuntu Linux.

  1. Create an SVN repository for a project on the server.

nick@closetbox:# sudo mkdir /var/svn
nick@closetbox:# sudo svnadmin create /var/svn/frozenindustries
nick@closetbox:# sudo chmod 770 /var/svn/frozenindustries
nick@closetbox:# sudo chown nick:nick /var/svn/frozenindustries

  1. Import files into the repository. I’m going to send over a wordpress blog which is sitting in a folder called “htdocs” on my desktop. This is only done once, after this files are updated using “ci”.

nick@icebox:# svn import -m “look, i’m importing” htdocs/ svn+ssh://closetbox/var/svn/frozenindustries/trunk

  1. Get your data back out of SVN an put it in a folder on the client where you’ll work on it.

nick@icebox:# svn co svn+ssh://closetbox/var/svn/frozenindustries/trunk fi/

  1. After making changes to files in fi, send the changes back to the server. SVN knows which server you checked out from by saving data in a .svn folder. It’ll pop open your default text editor to show the changes. Since we’re trying to be as simple as possible, just assume everything is correct, quit the text editor, and say “c)ontinue”

nick@icebox:# svn ci fi/

That’s it. Repeat steps 3 and 4 to grab copies of you project and submit changes.

Add a Drive to an LVM Volume

by @ September 25, 2006. Filed under file systems, howto

This guide shows how to add a drive to an existing LVM volume.

  1. Erase the partition table on drive /dev/hdd and create the Physical volume

# dd if=/dev/zero of=/dev/hdd bs=1024k count=1
# pvcreate /dev/hdd

  1. Look at the current volume group, for fun

# sudo vgdisplay -A

— Volume group —
VG Name disks
System ID
Format lvm2
Metadata Areas 7
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 7
Act PV 7
VG Size 859.70 GB
PE Size 4.00 MB
Total PE 220084
Alloc PE / Size 220084 / 859.70 GB
Free PE / Size 0 / 0

VG UUID N4TcI6-DIRS-3edy-FAa0-tdUL-MTSX-bs2lJE

  1. Add the Physical Volume to the existing Volume Group, which I creatively named “disks”

# sudo vgextend disks /dev/hdd

  1. Look at the current Volume Group again, my how it has grown

# sudo vgdisplay -A

— Volume group —
-snip-
VG Size 1.11 TB
PE Size 4.00 MB
Total PE 291625
Alloc PE / Size 220084 / 859.70 GB
Free PE / Size 71541 / 279.46 GB

  1. Extend the Logical Volume, this time named “backup”, use the free extents reported by vgdisplay

# sudo lvextend -l+71541 /dev/disks/backup

Extending logical volume backup to 1.11 TB
Logical volume backup successfully resized

  1. And then look at vgdisplay again, whee

# sudo vgdisplay -A

— Volume group —
-snip-
VG Size 1.11 TB
PE Size 4.00 MB
Total PE 291625
Alloc PE / Size 291625 / 1.11 TB
Free PE / Size 0 / 0

  1. Now the final and most exciting step, expanding the filesystem. You’re using XFS right? And here’s a surprise, it should be mounted when you resize it. xfs_growfs will automatically resize the XFS filesystem to use all the available free space, and do it in less than a second.

# sudo xfs_growfs /backup

Control Multiple Terminals Simultaneously

by @ September 21, 2006. Filed under howto

A small part of my job requires keeping eight Ubuntu desktops updated. While it’s easy to add the commands to update them to cron, I’d rather watch the updates occur in front of me in case something goes wrong. That’s where Keyboardcast comes in. Keyboardcast will take over or open as many Gnome Terminals as you’d like, and lets you enter text into all of them at once. It will also take over other windows, which may be useful for something, perhaps as keeping a log of all the commands you’ve entered in a text editor.

The benefit of using Keyboardcast is that it is quick to connect to multiple machines. It’s included in the Ubuntu Universe repository, and after a “sudo apt-get install keyboardcast”, anyone can control a group of computers easily. Here are the steps:

  1. Start Keyboardcast

keyboardcast.png

  1. Click Spawn and enter the command and arguments to use. Normally just changing the arguments to the correct hostnames is all that is needed to get started. More arguments, such as different users at different computers can be added. Although if you’re using SSH with different users, you’ll want to use passwordless logins to skip entering different password.

options.png

  1. After clicking OK terminals will open. Click where it says “type here…” in the small Keyboardcast window and start typing. Typing will show up in each terminal letter by letter.

terms.png
Having multiple terminals visible all the the same time makes watching for errors easy. If there is an error, it will on be the term which looks different. By setting up a new profile in Gnome Terminal called “keyboardcast”, you can change the window and font size of the terminals which are automatically opened by Keyboardcast.

Other Options for Controlling Multiple Terminals

Cluster SSH (cssh)

Cluster SSH came out before Keyboardcast and works in a very similar manner. There is a small window to enter text, and it uses multiple xterms by default instead of Gnome Terminals. Multiple computers can be scripted to open at the command line.

Konsole

Konsole is the default terminal for KDE and allows sending text to multiple tabs at once. Once open, hit View, then “send input to all sessions”. To see results, you’ll need to switch between tabs.

multi-gnome-terminal

MGT allows connecting multiple tabs together with tabs similarly to Konsole. Hit File, then “All bonded”.

Tentakel

Tentakel is unique from the other options because it has the ability to display data from multiple hosts all in the same terminal window. It makes a good solution if X is not available.

More:

pconsole 

« Previous Page« Previous
Next »Next Page »

Copyright ©2005-2007 Nicholas Brand. All rights reserved.
powered by WordPress.

categories:

links:

blogroll:

search:

archives:

July 2010
M T W T F S S
« Jan    
 1234
567891011
12131415161718
19202122232425
262728293031  

other:

computers:

  • backupbox
  • closetbox (server)
  • routerbox
  • htpc
  • netbook
  • mini
  • shuttle
  • icebox (desktop)
  • thinkpad
  • other devices:

  • nokia 770
  • personal:

    Digg
    del.icio.us
    Twitter
    Amazon Wishlist
    Last.FM

    19 queries. 0.179 seconds