Ocean Mist

« Older Entries Newer Entries » Subscribe to Latest Posts

22 Jun 2008

It’s the source, not the destination….

Posted by astromme. No Comments

Well, I’ve been able to narrow down the cause for the reboots (or at least one cause, I’m hoping that it’s the only thing wrong) to a specific folder in my data from the source drive. Weird. It’s time to look at some backups to see if it happens there. Otherwise, I’m not sure what could be the problem. Maybe bad sectors? (Time for a manual fsck and smart analysis) Or just a corrupted filesystem.

Anyways, it makes me feel somewhat better at least that the problem directory is only the album “Paper Walls” by Yellowcard.

Tags: , , ,

22 Jun 2008

Hard Drives and Spontaneous Reboots

Posted by astromme. No Comments

I haven’t had much luck with hard drives in the past few weeks. After having a 500gb drive die on me while I was in Norway, I now have a computer that loves to spontaneously reboot whenever I write to 30% of an IDE drive.

I first noticed the latter problem when I was investigating a software based RAID1 (mirrored) solution. Originally the raid was successfully created and I was able to transfer 80GB (These are 120GB drives, so well over 50% of the drive) of data over. Then I wanted to simulate device failure and raid1 rebuilding.

mdadm --fail /dev/sdb1
mdadm --remove /dev/sdb1

Then, /proc/mdstat showed a degraded RAID1 array (as it should),

md0 : active raid1 sdc1[0]
117242240 blocks [2/1] [U_]

Then I tried to re-add the device,

mdadm /dev/md0 --add /dev/sdb1

Checking /proc/mdstat again showed linux happily rebuilding the raid. I come back after 20 minutes to check /proc/mdstat only to find that the computer has restarted itself in the mean time and the raid didn’t get rebuilt.

So, I try again, wondering what could be the matter, this time watching /proc/mdstat. At 30-some% suddenly I get a beep, some sort of ata error (it flashes by for less than a second) and the computer promptly restarts itself.

Great, I think, do I have a bad drive? Better to find out now rather than after storing crucial data on it (and spending the time to get it all set up). Out of curiosity, I reformat the drive as ext3 and write to the blocks (from the filesystem rather than on a device level):

dd if=/dev/zero of=/mnt/sdb1

When I return in an hour, this has completed successfully. Quite odd. I forget about the raid array and am busy with other work for a few days.

Yesterday, I returned to the test computer to investigate rdiff-backup as a backup solution. (Note: I really like the idea of rdiff-backup, and I’m inclined to write a kio-slave for it to be used for recovery easily from kde) I start the rdiff-backup of the 80GB of data and let it run overnight. This morning I find out that it rebooted itself less than 30 minutes after I started the backup, at least according to uptime. I then realize that I’m using the flaky drive/ide chipset/whatever is the matter that I had RAID problems with earlier.

My next line of work is to remove the drive (IDE), put in a 250GB (SATA) and try the same thing. I have a worrying feeling that it’s the chipset. The source drive for this backup is on SATA and the destination was on IDE. This caused reboots for both a raid setup and a rdiff-backup setup. However, using the same drive with dd and /dev/zero did NOT cause a reboot. Also, I can read the data from the SATA drive just fine. (Or can I? I should try a cp /data /dev/null).

5 Jun 2008

Blog Cleanup

Posted by astromme. No Comments

I made sure that all of my Norway travel was correctly categorized and tagged. You can check out the Norway-specific parts of this blog by using this link: http://blog.chatonka.com/category/travel/norway-travel/

I’ve still got some final thoughts to put up, but that’ll have to wait for now.

28 May 2008

Home Again

Posted by astromme. No Comments

After two trains, two planes and a car ride that routed us around multiple accidents in the metro area, I am finally home. It’s hard to believe that I started traveling from Trondheim almost 30 hours ago. I still have some things to post to this blog however, so it’s not goodbye yet!

27 May 2008

Camera Obscura 2.0

Posted by astromme. No Comments

I did manage to get a ‘tour’ of the camera obscura. Even though it was late in the evening (8PM) we could still see objects; most things were fairly sharp and clear. I managed to get some excellent (well, hopefully, I haven’t seen them on a big screen yet) photographs of the lens-assisted portion. The pinhole portion was just too dark for the camera to correctly capture, and I didn’t have a tripod with me.

We’re going to leave for the train at 15:00, less than 2 hours from now (oh look, it’s 1337 time now). From that time I’m not sure if I will be able to get any sort of internet until I arrive in Minneapolis. That could mean more than 24 hours of offline time. Yikes!

I’ll try and write some more before I have to leave to go to the train. We’ve checked out from the hotel and are sitting in the lobby area right now. Hopefully we can snag some waffles before we leave for the train station.

26 May 2008

Camera Obscura

Posted by astromme. No Comments

Well, I’m in Trondheim now. My train ride went really smoothly. I was able to see the camera obscura but it’s only open to the public on the weekends. I’m emailing the professor and tour coordinator, hopefully I can find a way to see the inside.

I’m going to the University now. It’s still raining =/. Bye for now! I’ll post pictures, I promise.

26 May 2008

Langtred

Posted by astromme. No Comments

(Sunday, May 25 21:50) Comfy, Wishing-I-didn’t-have-to-sleep

Wishing-I-didn’t-have-to-sleep is one word, right? Ok, maybe I cheated a little, but that just means that English now needs a single word that means Wishing-I-didn’t-have-to-sleep. I’ll call id langtred. Why? No clue. For some reason languishing came into my head and I felt that I needed to come up with a word that didn’t already exist. Why do I feel this way you say? That’s a good question. And it’s actually linked to the other word. Because I’m so comfy right now, and also because I feel like I’m having a lot of fun, I really don’t want to have to leave this train for a few hours. And I know that the moment I fall asleep I’ll already be morning, time to get off and start the day.

The story leading up to the train is a little more interesting, and it climaxed in a crazy 10 minutes where I wasn’t sure that we were both going to make it onto the train. Anyways, that comes later, don’t worry. Oh, and ‘we’? My dad has joined me for the last few days of my trip; the difference in price was negligible and I thought it would be fun to travel with him before I go off to college this fall.

We started today in Svolvaer, way up in the Lofoton islands. After having two days of biking, walking and relaxing due to a mix up with the kayaks and then an accident involving broken ribs for our guide, we were ready to move on to Bodo. Unfortunately, things never go smoothly. We checked out of the hotel at 12:00, expecting to stay in the hotel until 2 or 3 before taking a cab to the airport. It was during this time that nature decided to give us rain. This rain steadily got worse until we boarded the plane and broke though for a few short minutes. And when I say ‘a few short minutes’, I mean that almost entirely literally. Our flight time was around 30 minutes in an turboprop plane. Wow, it was such a cool plane, and I have a bunch of photos on my phone camera and video camera. The Svolvaer airport was tiny, one runway, one gate, 2 people manning a single x-ray scanner, a single flight attendant and only about 11 rows of 2×2 seats on the plane itself. Landing in Bodo, we realized that this was actually a much bigger town. The 17+ airport gates prooved this. But I think that there’s only around 50,000 people in Bodo. Anyways, it was still raining when we got in.

We thought the maelstrom wasn’t going to be in effect while we were there because we had missed the high tide. So, we took our time in the airport, buying a hot dog, a salad and some pizza for reasonably good prices. Reasonable in this case means “$5 for the hot dog, $8 for the pizza slice, and $12 for the small salad and a little thing of bread”. Trust me, it was better than eating just about anywhere else. We feel that our stores (including 750g of trail mix called go’dag) will last us until at least midday tomorrow. I worked on Motion (a KDE4/C++ project involving stepcore) for an hour. Dad then went around talking to people, and we realized that the best time to visit the maelstrom happened both on tide in and tide out, which meant that we could go and see it at 19:48 today! We quickly discovered that a car could be rented for 800NOK, which was much better than the 1600NOK that we were thinking of yesterday. And even better, the National car rental guy said that we could leave the car at the train station. So, with high spirits, we dashed off in the manual transmission car.

Wow, manual transmission. It was a flex fuel ford focus (say that 10 times fast), very basic, probably $20,000 or less as new in the US. Apparently it costs $50,000 here. Yikes. After driving the 33 km on coastline roads in roughly 35 minutes, we finally got to this gigantic bridge. And don’t worry, I have lots of photos of this part. But there was no moving water, no nothing. We turned off to the left at a sign that we thought meant the sightseeing location, it was named Saltstraumen or something, I need to check on that. Anyways, that side road brought us to this funny little restaurant on the edge of a cliff. I could see the main bridge from there, but no fast moving water. It was pouring rain, and I didn’t know what to do. Finally I got out and wandered down the rocks to a guy who was fishing. That’s a whole entire blog post by itself.

He was Swedish, and spoke roughly 8 words of English. I smelled alcohol on his breath, and I was surprised that it wasn’t more prominent, considering that he was out in the pouring rain without a hat or even rain jacket. And he was fishing. Wow. He managed to partially understand the timetable I had, and finally told me that tomorrow morning at 7:00 was the only time to see it. I could see plain as day that there was something tonight as well, but oh well, it was mostly in English anyways. I thanked him and went back to the car. Turns out he wasn’t finished. He came up to us again and started yacking at us through the passenger side car window. We heard about his brother who worked for this singer, his ideas behind Manhattan, New York, and other things American (and German, for some reason. He initially thought I was German).

Once he was finished for the second time, we drove around some more for another 20 minutes. By this time it was getting very close to the 19:48 time that the maelstrom was supposed to be in full effect. As a last ditch effort we drove down as far as we could to the base of the bridge, walking the rest of the way to the rocks. And, amazingly, we saw it! It was like this river of water or lava within the river itself. On the sides were mini (and not so mini) whirlpools, and everything looked very powerful. The water in the middle was moving out to sea very very fast, and it proved for really good footage on the video camera. And I was freezing. Did I mention that it was still pouring? Yes, and I’m amazed that the camera still works.

So then we drove back, fretting a little bit about time on the way, back to the train station. Upon arriving, we once again were reminded that nothing ever goes as planned. The ticketmaster who we were supposed to give the car keys to wasn’t there. Great, now what. Somehow, I ended up outside of our sleeper room with all of the luggage while dad jumped in a cab to try and make it to the car rental office and back before our train left in 20 minutes. Of course, I made him take his phone, just in case. It turned out that he was able to make it back with nearly 10 minutes to spare, but that was just fine in my eyes. Remind me in the future to not try that again.

So now we’re on the train. and I feel comfortable and langtred. Andrew Stromme, Over and out.

P.S. – I just realized that this post took me 1/2 hour to write. It’s over 1200 words, which means I’m typing at a (long term) 40 words per minute. Not bad, not bad at all!

25 May 2008

Lookalikes

Posted by astromme. No Comments

(boohoo. I had a full post written and my computer decided to crash =/)

I’m amazed by the number of people who look like other I know back at home.

So far I’ve seen:

1 Dave Searl
1 Allie Sipkins
1 Shelby the dog

I saw “Dave” when I was at the Svalbard airport. He looked so similar that even after my double take I had to walk over to see closer and I almost asked if he _was_ Dave, sildenafil otc usa. He even had the same little goatee and other facial hair. I wished that I could have gotten a picture, but, alas, it was time to board the plane.

Yesterday in Svolvaer Allie was walking out of the supermarket where we buy our lunch and dinner.

And Shelby, Peter’s dog was sitting out in front of my hotel. I did manage to get a picture of him =). Look for that on flicker later.

23 May 2008

Using CPU Transparency with Scratchbox

Posted by astromme. 1 Comment

Configuring CPU Transparency (sbrsh) in Scratchbox

Since I’ve always had an enormous amount of difficulty in setting up a remote shell (sbrsh) in scratchbox, hopefully this guide will spare others from the frustration.
In this guide I assume:

  • You are using Scratchbox 1 (Meaning you have a /scratchbox and you don’t use ‘sb2′ to compile)
  • You are using Ubuntu (Debian will probably still work, and other distros have a good chance as well, I just haven’t confirmed anything)
  • You have a n800 with root access. This can be done either through the R&D mode or a package that lets you ‘sudo su’.
  • You are using USB networking (I’ll show you how to set it up in a bit). Without USB networking (so over wifi) I found everything to be terribly slow. Meaning on the order of tens of magnitudes slower than normal speeds. Even with usb networking it is still dog slow. But, it is true ‘emulation’ in the fact that everything is running on your tablet.

Conventions:

${VARIABLE_NAME} is a variable. You should replace it when you type in commands or edit configuration files.
${TABLET_HOSTNAME} – means an address that you can access your tablet from. I ended up using the ip (192.168.2.15 by default with usb networking)
${DEVMACHINE_HOSTNAME} – means an address that you can access your development box (that has scratchbox) from. I ended up using computername.local as it worked from my tablet. Test if yours works by ssh’ing into your tablet and running ‘ssh ${DEVMACHINE_HOSTNAME}’.
${USER} – Your username.
${UID} – Your user id (type ‘id’ to find out)
${GID} – Your group id (type  ‘id’ to find out)
italicized text – indicates what you enter into a shell prompt or text file.

Configure USB Networking:

Use the maemo-pc-connectivity package. It makes USB networking dead simple. On your tablet, install maemo-pc-connectivity.install (TinyURL Link: http://tinyurl.com/5rkqx2). This provides a control panel applet USB Networking for setting up USB networking. The applet is configured to use static IP address 192.168.2.15 for the tablet and 192.168.2.14 for the host. I will use these addresses throughout the guide.

“By default, the USB connection provides USB mass storage access to the memory card, and it needs to be switched to USB networking. The control panel applet USB Networking allows to change to USB networking mode, but the applet has a few quirks:
When USB networking is in use, USB cable disconnections are not properly detected by Linux HAL.
Any memory card mounts are unmounted while USB cable connection is detected, also when in USB networking mode.”
“Does not integrate with Internet Connectivity Daemon, other than providing a dummy entry.
Not possible to use USB networking with Hildon applications that use Internet Connectivity, such as browser, due to missing name resoving. USB networking uses static IP address and cannot have information about DNS, except when manually configured, thus DNS name resolving doesn’t work.
Multiple default routes might appear in the routing table if many networking connections are in place.”

Prepare your N800:

Install Software:

(I’m copying this from the sdk+ page. It worked perfectly for me)

Run task-sbrshd.install (TinyURL link: http://tinyurl.com/5yhlpj) on your N8X0 to install the required packages using the Application Manager. This will install the following packages on Internet Tablet:

libfuse2
fuse-modules-rx-34
fuse-utils
libblkid1
libuuid1
mount-full
ssh
sshfs
sbrshd

Create Scratchbox User:

To be able to ssh to your tablet and use sbrsh you need to have a user on your tablet with the same username as the scratchbox user on your development machine.

$ groupadd -g ${GID} ${USER}
$ useradd -u ${UID} -g ${USER} -d /home/${USER} -s /bin/sh ${USER}
$ mkdir /home/${USER}
$ chown ${USER}:${USER} /home/${USER}

Set up Paswordless Authentication:

Because sbrsh needs to mount filesystems on your tablet from your development box, all via ssh, it needs to be able to log into your development machine. On your tablet, perform the following:

su – ${USER}

ssh-keygen -t rsa

After a few moments (it may be a minute or more, the nokia tablets are quite slow compared to modern computers) it will respond with a few notices, including a line about a public key in ~/.ssh/id_rsa.pub. You need to copy the contents of this file into your the file ~/.ssh/authorized_keys on your development machine. You can test to see if it works by first logging into your tablet via ssh and then trying ‘ssh ${DEVMACHINE_HOSTNAME}’. If you get a shell (‘${USER}@~ $‘ ) you are good to go. You might have to accept the fingerprint of your development machine, that’s ok. It’s a one time process.

You will have to do this again for your dev machine, but it’s easier due to ssh-copy-id. Again create a key with ‘ssh-keygen -t rsa’ but now copy it to your tablet with ‘ssh-copy-id ${USER}@{TABLET_HOSTNAME}’. You may have needed to set up a password for the user account on your tablet so that you can log in as it directly.

Configure sbrshd on Internet Tablet:

Scratchbox remote shell is meant to be used only on trusted networks. NFS SECURITY IS ONLY BASED ON YOUR NETWORK SECURITY.

“Edit /etc/default/sbrshd on Internet Tablet to enable sbrshd. Change ENABLE option to true and MOUNT_BIN and UMOUNT_BIN to point in util-linux versions of mount and umount:

ENABLE=true
MOUNT_BIN=/bin/mount.full
UMOUNT_BIN=/bin/umount.full

sbrshd will only accept connections from an IP listed in /etc/sbrshd.conf. Add your development machine’s IP as a trusted host to this file, one IP address per line. In my configuration, I have the following line:

192.168.2.14

Start fuse and sbrshd on Internet Tablet:

~ $ /etc/init.d/fuse start
Starting filesystem in userspace: fuse.
~ $ /etc/init.d/sbrshd start
Starting sbrshd: done.

Prepare your development computer:

Install Software:

Ensure that you have the newest release of scratchbox-devkit-cputransp. As of this writing it is 1.0.7. To get this using the debian packages I had to modify my sources.list slightly. In the file /etc/apt/sources.list.d/maemo4.0_scratchbox.list I needed

deb http://scratchbox.org/debian/ apophis main

When I used the Nokia SDK installer it used the stable repo instead of the apophis, which only had scratchbox-devkit-cputransp release 1.0.1.

To install the required packages for Scratchbox 1:

sudo apt-get install scratchbox-devkit-cputransp

Configure sbrsh:

The sbrsh configuration file lists the nfs mounts that your tablet will use to set up its transparent filesystem. The format of ~/.sbrsh file:

# Format:
#
# <na
me>  <hostname>[:<port>]
#     nfs|bind|sshfs  <filesystem>  <mountpoint>  [<options>]
#     …

Edit the configuration file /scratchbox/users/${USER}/targets/CHINOOK_ARMEL.sbrsh :

sshfs-target ${TABLET_HOSTNAME}
ssh     ${USER}@${DEVMACHINE_HOSTNAME}:/scratchbox/users/${USER}/targets/CHINOOK_ARMEL/ / rw,nonempty,allow_other
ssh     ${USER}@${DEVMACHINE_HOSTNAME}:/scratchbox/users/${USER}/home/${USER}/ /home/${USER} rw,nonempty,allow_other
bind    /tmp                            /tmp
bind    /dev                            /dev
bind    /dev/pts                        /dev/pts
bind    /proc                           /proc
bind    /sys                            /sys

Edit CHINOOK_ARMEL target configuration in /scratchbox/users/${USER}/targets/CHINOOK_ARMEL.config .

Enable sbrsh by commenting out the existing SBOX_CPUTRANSPARENCY_METHOD= and adding:
SBOX_CPUTRANSPARENCY_METHOD=/scratchbox/devkits/cputransp/bin/sbrsh

Test your setup:

Try running ‘sbrsh /bin/sh’ from your normal development machine. You don’t need to be in the scratchbox environment. If you get another shell, you are good to go. It will probably feel really slow (slower than a ssh connection across the internet) but it will be in an armel environment, and that’s what matters =).

If you’re having trouble….

sbrsh server: Can’t execute command: /bin/sh (Permission denied)

“In this case, the issue is likely not that there is an access error or that permissions are wrong. Instead, this may be the result of a failure to run chroot command on the target – which would happen if you’re missing a mount for root / mount is in your .sbrsh and the sandbox mode is enabled (this is the default).”

Changelog:
  • Fixed second set of links. There was an extraneous “(” at the beginning that made them loop.
  • Added missing info on ssh-copy-id
Resources:

http://www.scratchbox.org/documentation/docbook/installdoc.html#sbrsh

http://www.scratchbox.org/documentation/general/tutorials/explained.html

http://maemo-sdk.garage.maemo.org/sbrsh-sshfs.html

Tags: , ,

22 May 2008

Arriving in Svolvaer

Posted by astromme. No Comments

I’m amazed. I think that Svolvaer is a tourist town, and I certainly never expected that. Within a few minutes of getting off of the bus in the downtown area three out of the five people I passed on on the street were speaking English. To further emphasize, hotels lined the piers and there was even a little camera shop that seemed to thoroughly cater to tourists.

My first room at the Rica hotel had a magnificent view of the parking lot and surrounding drudgery. That didn’t last long. Luckily they had more rooms open and I’m currently residing in smallish room with a beautiful (this time I mean it) view of the harbor and beyond.

It looks like my main meal of the day is going to be breakfast, mainly because it comes with the hotel. Eating out, or even from the grocery store, is prohibitively expensive. At any local shop or restaurant, a bottle of water is $5. A candy bar or chocolate bar is $2-3, a small sandwich is also $5 (a larger is $12-15), a hot dog (with bread) is $5-7 in a gas station or on a street corner, and a ‘normal’ meal for dinner is upwards of $30 for one person. I managed to find a grocery store with somewhat cheaper prices but that means water for $2.50 instead of $5.

So, I eat a good hearty breakfast and snack on these granola things, all while trying to spend a reasonable amount on my meal for the day. It’s working out.