Diary of a geek

August 2005
Mon Tue Wed Thu Fri Sat Sun
29        

Andrew Pollock

Categories

Other people's blogs

Subscribe

RSS feed

Contact me

JavaScript required


Monday, 29 August 2005

Look Ma, I got me a USB key!

I finally got around to buying myself a USB key at the Computer Fair on the weekend, largely because some changes to my work environment were going to require that I start sneaker-netting files around a lot more, and also because I'd wanted one for a while.

I wanted to get a 1GB one, because I could stick a whole ISO image on it, as well as have a bit of room for playing around. I also wanted to be able to shove a Debian installation ISO of some sort on it, so I could boot from the key if I so desired.

So far, despite really clear instructions, I haven't had a lot of luck on the booting front, and I discovered today that Windows seems to only show the first partition of the key, which is a bit limiting. That said, it certainly came in handy today.

Last week I got a new desktop workstation, because my work laptop was being reimaged with the new corporate SOE, and was to be solely used for accessing the corporate VPN. The desktop was to do actual work on on the client's management LAN. The workstation was some sort of Dell (can't remember the exact model), and it came with two 17" LCD flat panels. I decided to dual boot it between Windows XP and Debian, with the intention of spending most of the time in Linux if I could manage it.

The one downside: no Internet access from this management LAN, hence the USB key.

I did a base installation with the first Sarge CD, and then did some nasty hackery to do the rest sneakernet style, ferrying files between my laptop on the (very slow) corporate VPN with Internet access, and the desktop. It worked fairly well. I wrote a little shell script called offline-apt-get, which basically just spat out the URLs of the files it needed to download, and I redirected this to a file, and then ran a wget --input-file on this file on my laptop, and then copied all the .debs retrieved into /var/cache/apt/archives, and proceeded to apt-get install as normal. apt-get updateing was achieved in a similar manner, except I copied the relevant Packages files into /var/lib/apt/lists with the appropriate names to match the entries in my sources.list.

So I ended up a sources.list that mentioned externally unreachable Debian mirrors just like a normal install would, and just a bit more manual labour in terms of fetching files.

For the record, the offline-apt-get script just looked like:

apt-get -y -qq --print-uris $* | awk '{ print $1 }' | sed "s/'//g"

[05:26] [tech] [permalink]