Rough Book

random musings of just another computer nerd

Tag: networking

GitHub broke my scp

I set up git on my FreeBSD box so that I can commit my code to GitHub. Today I tried to scp some stuff over and I was met with this rather unhelpful message:

[email protected] ~/Projects/code
$ scp -r [email protected]:~/code/agnostic .
Password:
ps: Process environment requires procfs(5)
Initializing new SSH agent...

[email protected] ~/Projects/code
$

I fixed the procfs problem by adding the following to my /etc/fstab:

proc                    /proc           procfs  rw              0       0
linproc                 /compat/linux/proc      linprocfs       rw      0       0

and then running:

[email protected] ~
$ sudo mount /compat/linux/proc

[email protected] ~
$ sudo mount /proc  

So I try to scp again and I get:

[email protected] ~/Projects/code
$ scp -r [email protected]:~/code/agnostic .
Password:
Initializing new SSH agent...

[email protected] ~/Projects/code
$

WTF? Then I remembered making some changes to my .bashrc to be able to commit to github:

function start_agent {
  echo "Initializing new SSH agent..."
  /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
  echo succeeded
  chmod 600 "${SSH_ENV}"
  . "${SSH_ENV}" > /dev/null
  /usr/bin/ssh-add;
}

# Source SSH settings, if applicable
if [ -f "${SSH_ENV}" ]; then
  . "${SSH_ENV}" > /dev/null
  #ps ${SSH_AGENT_PID} doesn't work under cywgin
  ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
    start_agent;
  }
else
  start_agent;
fi

I pulled all that out of my .bashrc and made a separate shell script for it. After I did that, scp started working again. I had no idea that calling scp would actually run .bashrc

Flu shot and bizarre network issues

This last weekend I had drill and the medics gave us the seasonal-flu mist-vaccine. It’s the one where they squirt gooey, inactive virus up your nose. I’ve had the vaccine before without any adverse side-effects. Yeah, not this time. I got the shot on Saturday and I was fine on Sunday. Not so on Monday. I woke up a few times in the middle of the night with a bit of a fever, but I figured that it would just go away. Yeah, didn’t happen. On Monday morning I felt like I had been run over by a semi. My throat felt like I had swallowed bits of broken glass. Needless to say, I didn’t go to work. I was bedridden most of the day, but towards the end I felt a little better. I tried to get a little work done but I wasn’t too successful since I had a hard time concentrating.
Read the rest of this entry »

Qwest charges a “setup fee” for static IP’s

Two weeks ago, I finally got my DSL upgrade from a measly 3Mbps to a whopping (for me) 12Mbps. I have been on 3Mbps since 2004, and the difference is amazing. I’m able to stream HD quality stuff from Netflix all the time! Qwest set me up with an Actiontec Q1000 router/modem, which as far as routers go, is not that great. But it does the job… somewhat. My previous modem (also from Qwest) would let me grab multiple IP’s from Qwest if I had it plugged into a switch (every machine that was plugged into that switch got an IP from Qwest’s pool). However, the Actiontec is different. Since it’s a router, it basically just enables DHCP and gives you an address. This was a problem for me because I have three machines that face the outside world and I use DynDNS so that I can access them. The router does some port-mapping, but that wasn’t an option. Since my website was my top priority, I set it up in a DMZ and figured that I could access the other two machines through my webserver, so no big deal. But yeah, didn’t work completely. DynDNS uses the modem’s IP for my webserver. I can access my website without any problem, from the outside world. But if I try to get to it from within my network, I end up at the Actiontec’s configuration page. Stupid. So eventually I just decided to get some static IP’s. The price was pretty reasonable: a block of 8 for $14.99 a month. Then I saw the setup fee: $50. Seriously? FIFTY dollars to set up a block of IP addresses? Read the rest of this entry »

Wallpaper

I added another wallpaper of Shakira. I have no life. It is official. I hope I get that job I applied for… It’s Web Development with PHP and MySQL… along with working on UNIX machines and network stuff. Fun stuff…

smbfs

Sharity-Lite stopped working… No, wait… Actually it might have been my Windows machine. Ever since I installed that piece-of-crap Xilix ISE and ModelSim software my computer has been acting weird. It wouldn’t authenticate requests from Sharity-Light. The only way I could mount drives was if I enable simple file sharing. I couldn’t have that… I wanted it to be exclusive… It used to work before, but for some reason, now it doesn’t. That’s when I discovered SMBFS. It’s pretty neat. Mounts Windows shares really well! That and CUPS works really nicely with my HP Deskjet 812C, which is now connected to my FreeBSD machine. God I’m such a nerd!

CUPS working

Got CUPS working. I really should document my work… smb://[email protected]/HPDeskjet812C… Anyways, all I have left to do is set up the colour scheme and stuff like that… of KDE… and install Mozilla again… Fun… Fun…

Samba

Got samba working on my FreeBSD machine. Now I can access NFS shares from my XP box.

Fixed Sharity Light Problem

Fixed the problem. I had (wrongly) set the hostname for my XP box as 10.0.0.1. D’OH! It should have been 10.0.0.2. Works perfectly now!

Horrible

How hard can installing a new OS get? Pretty damn hard. It took three hard disks and two other OS’es to get it right. Huh what? Yeah you heard me… I wanted switch from Windows XP Home to Windows XP Professional. So I pull out a pre-activated copy (muhaha) that my buddy gave me a year ago and start installing it. I selected the “Update” option. Call it intuition. But after using computers for more than 12 years, I have an idea when things are about to go wrong. Sure enough, it did. I can probably illustrate this better in a more logical format:

Problem

XP installation starts, runs for a while and then crashes with a blue screen. I rebooted and tried to install again. Same problem. Did this three times. No difference.

Solution

Forget about installing XP professional. See if you can use the Alienware recovery CD and get XP Home back.

New Problem

CD won’t boot for some bizarre reason. Later I found out that the machine had a problem recognizing signals from the USB Keyboard. The strange thing was that it would recognize the F2 keystroke for the BIOS setup, but wouldn’t recognize anything after that. It would say “Press any key to boot from CD…”, I’d press any key and nothing would happen. XP Installer would boot up (and crash).

Solution

Remove hard drives from the boot sequence. I’ll see if I can force it to boot from the CD.

Bigger Problems

Boot failure. Also, after restoring the boot sequence, it says the OS is corrupted. I still can’t boot from the Alienware Master CD.

Solution

Try to boot up with FreeBSD CD. It worked! I installed FreeBSD on the 20Gb hard drive. Tried to boot up, but kept locating the 75Gb hard drive. Switched boot sequences. It worked! Mounted the 75 Gb as an nfs mount using mount_ntfs. Tried to move everything to /. Said it ran out of space. That didn’t make sense! I knew there was a whole lot of space left on the 20 Gb. Then I realized that / was on a different partition and that I should install it on /usr. Did that. Pulled out hard drive, put it into my FreeBSD machine (I could have left it in there and just transfered it using another mount_ntfs after I wiped out the 75 Gb and installed XP Professional… but it was 3 am and this didn’t occur to me). XP Installs fine. So now I set up the network and set up a shared dir on the XP box. I try to mount it from the FreeBSD box using sharity light. It dies. Then I figured out I had changed the machine name. Tried it again with the new machine name – it worked! Then I mount the 20 Gb. I go to /usr on the 20 Gb to get my files…

Really Big Problem

I can’t find my files!! ls on /usr gives absolutely nothing!

Solution

Then suddenly I had an epiphany… I was mounting /dev/ad1s1. This means drive 1, slice 1 as FreeBSD organizes the drive into partitions, and different dirs are mapped to different partitions. I try to mount /dev/ad1 directly and it gives me a superblock error. So then I try /dev/ad1s2 – same problem. So I goto /dev and list all ad1 devices. I see a bunch of /dev/ad1s1a, /dev/ad1s1b and so on… So I tried mounting those and eventually found all the rescued files. Then I transferred everything over the home network to my XP shared dir. Problem solved! I have XP Professional and everything works fine… well almost. The BIOS and XP can see my 20 Gb hard drive, but it doesn’t assign it a drive letter… I formatted it (using FreeBSD so that might be a problem… except I don’t think so, because I just zapped all the partitions), but it still doesn’t see it… I’ll have to figure out how to fix it. Also, Qwest is sending me a Cisco 678. Then I can buy some static IP’s and set up my webserver… finally! Ahhh… This was a very trying experience, but I learnt a lot…

I rule!

It works!! It works!! The machine wasn’t able to resolve IP addresses. So I added the IP of the nameserver (that I got from my WinXP box my using nslookup) to /etc/resolv.conf and now it works. =D

I’m sooo happy!!

All original content on these pages is fingerprinted and certified by Digiprove
%d bloggers like this: