Tuesday, September 19, 2006
Monday, September 11, 2006
Tuesday, September 05, 2006
Partitioning USB Drive from Linux
USB drive is indeed can be partitioned.
What you need to do is:
1. Unmount USB drive,
2. Disable auto-mounting
3. gparted /dev/sda
As I haven't been able to tame the automounting feature of Kubuntu, I used
Gparted-Live and partitioned from there. When I partitioned my USB drive in
Kubuntu, it persistently automounted the first partition (sda1) after it had
been created, even the whole partitioning process hadn't been finished yet.
Thus, it's the value of having a pocket-CD of Gparted-Live everywhere you go.
Now I have a 128MiB USB pen-drive partitioned into 80s MiB FAT16 and 30s MiB EXT2
And...
250 GiB USB Harddrive partitioned into 40s GiB FAT32, and two 100s GiB EXT3
Now ... I am backing-up everything :-D
Wednesday, August 30, 2006
Managing Wireless Equipment (802.11x) using ap-utils
Being maintaining snmp-based nms for months, I've just found this tool few
hours ago. With ap-utils, I can manage my SmartBridge devices natively from
Linux. Ironically, I've been struggling with wine for years just to configure
my WiFi equipment, and even installing windows 98 via Qemu just to have the
wireless configuration software installed.
To install it in Ubuntu :
sudo apt-get install ap-utils
then
ap-config
The menu inside ap-utils is self-explanatory.
If only this tools can manage other proprietary wi-fi devices, (alvarion,
canopy, trango, etc) it will be much better.
Tuesday, August 08, 2006
QEMU in Ubuntu Dapper
In Ubuntu 6.06, you can have the version 0.8.0 packaged in the universe repo.
To use it, just install it using apt-get (or synaptic if you prefer):
$ sudo apt-get install qemu
then create the virtual hard drive using qemu-img
$ qemu-img create mydisk 3G
to install an OS into your emulated hard drive (using CD-ROM installer)
$ qemu -hda mydisk -cdrom /dev/cdrom -boot d
Qemu can be emulating at higher speed when it uses its accelerator module named Kqemu. However Kqemu is a proprietary software (although it'll cost 0 in price). To install the accelerator, you can use the method posted here
Unbloggable Months
I lost my desire to write these two months.
Mostly due to:
- FIFA World Cup '06 Germany
- (Somehow single) Parenting
Thursday, June 08, 2006
Linux Only
Yup, I tried to boot Belenix (Solaris-based) and PC-BSD (FreeBSD-based).
Both kernel got panic and dumped.
It seems that Linux is the only "free" kernel that will boot up my transmeta box.
(My Sempron 2100+ box has no problem at all)
Linux rules :-D
"Crippled" Repo
I did not include main/debian-installer in my debmirror script!
Thus, the repository is only good for installing packages into up & running Ubuntu system.
With less than 3 GB disk space remaining, I don't think I can afford to add main/debian-installer into my local repo.
Thus, having CD-installer ready is a must.
Friday, May 12, 2006
Proxy Traceroute
To keep myself from hammering down my laptop, I create shell script to do the task using elinks and sed. Here is my code:
#!/bin/sh
elinks -dump --no-references --no-numbering \ "http://www.nwtools.com/default.asp?prog=trace&host=$1"|sed '1,21d'|sed -n -e :a -e '1,7!{P;N;D;};N;ba'
I saved the script as proxytrace.sh and using it with the traceroute target as the only parameter.
example:
$ sh proxytrace.sh www.blahblahblah.com
or
$ sh proxytrace.sh 123.234.123.234
This way is much faster, really.
Thursday, May 04, 2006
Intransitive Trust
In those ol' days...there were Windows NT4.
I remember the pain of setting every domain to trust each other as the trust relationship between domain is one way and intransitive.
To get every domain connected in a sane way is a great challenge.
Especially if you put different version of windows into.
That memory suddenly came to mind...
As I feel so miserable when I've got so little trust from someone I love, while she got mine, fully.
Perhaps, I need to be wiretapped, equipped with gps, and monitored 24/7 as well?!
This is ridiculous and draining my sanity.
*Taking deep breath, holding it for several seconds, and release it slowly...repeated 3x*
Hello World! :-)
Thursday, April 20, 2006
A Geek's Bedroom
Tuesday, April 04, 2006
Another Google April Fools' Joke
I am always fascinated by their April1st Jokes
Just now they launched Google Romance
Just check it at http://www.google.com/romance/
Have fun
Thursday, March 23, 2006
My sysadmin toolbox
Inspired by linux.com :-)
For my day to day network administration, I use these apps frequently:
ssh,telnet,bash,coreutils,rsync,scp,elinks,wget,nano....if you don't know what
are these apps for, then probably you could skip this
*cough*article*cough* :-)
For serial console access, I use minicom. I love configuring my huawei box
with minicom using transparent konsole, it's so damn pretty.
For quick traffic monitoring via snmp poll, I use ifstat. If only I could
figure out how to parse the capture result into rrd files, I would make it
even more useful.
For more comperehensive network provisioning, JFFNMS is what I use. I just
wonder how to reduce its resource usage. I'll probably give nagios a shot
someday.
The others will be most of what GNOME & KDE offers....
100.000 km milestone
The odometer of my motorbike has just passed 100.000 kms milestone :-)
The odometer itself, however, consists of 5 digit only,
hence, its returned to ZERO :-D
Time to sell the bike eh?
j/k
Friday, March 17, 2006
Merah Putih
What makes a nation, nation?
no...I think the question should be ...
What keeps a nation, nation?
...
Are we really still a nation... or perhaps... we never was...?!
Aliases
Going into bash, aliases make my life easier, really!
I kept adding these aliases in wherever .bashrc I have
someone@somewhere:~$ alias
alias acs='apt-cache search'
alias acso='apt-cache show'
alias dusk='du -s -k -c * | sort -rn'
alias greph='history | grep '
alias ls='ls --color=auto'
alias nsl='netstat -alnp --protocol=inet | grep -v CLOSE_WAIT | cut -c-6,21-94
| tail +2'
alias sadug='sudo apt-get dist-upgrade'
alias sapi='sudo apt-get install'
alias sapu='sudo apt-get update'
alias sapup='sudo apt-get upgrade'
someone@somewhere:~$
As you can see... it's very ubuntu, right? :-)
I think I need to add some more...
Any idea ?
Wednesday, March 08, 2006
Messing up with debmirror
DEBMIRROR(1) User Contributed Perl Documentation DEBMIRROR(1)
NAME
debmirror - Debian partial mirror script, with ftp, http, hftp or rsync
and package pool support
SYNOPSIS
debmirror [options] mirrordir
DESCRIPTION
This program downloads and maintains a partial local Debian mirror. It
can mirror any combination of architectures, distributions, and sec‐
tions. Files are transferred by ftp, and package pools are fully sup‐
ported. It also does locking and updates trace files.
To support package pools, this program mirrors in three steps.
1. download Packages and Sources files
First it downloads all Packages and Sources files for the subset of
Debian it was instructed to get.
2. clean up unknown files
Any files and directories on the local mirror that are not in the
list are removed.
3. download everything else
The Packages and Sources files are scanned, to build up a list of
all the files they refer to. A few other miscellaneous files are
added to the list. Then the program makes sure that each file in
the list is present on the local mirror and is up-to-date, using
file size (and optionally md5sum) checks. Any necessary files are
downloaded.
I had never paid attention step two before I tried to add breezy-updates and breezy-security, into my existing Ubuntu Breezy repository. I executed debmirror without putting breezy in the dist parameter (instead, only breezy-updates and breezy-security), hence, I lost 11 Gigs of data.
Mental note: RTFM RTFM RTFM
Tuesday, February 28, 2006
Scripting Addiction
I even try to automate anything I usually do by scripting it.
Hmm... should I dive into python and made my own NMS?
I'm quite dissappointed with JFFNMS performance, btw.
Probably, I should take a look at ifstat source code and learn from it, and then make my own lightweight network monitoring system....
Hmm... scripting is really really really addictive....
Friday, February 17, 2006
A week with Fedora Core 4
My PC, however, is running Kubuntu Dapper Drake, and with spare hdc (after cleaning up the pre-existing Ubuntu Breezy Badger) I decided to try another distro that is not debian-based.
Going into RPM world, Fedora is my first choice.
My first experience with GNU/Linux is with Red Hat 5 several years ago. Being a newbie, that was an unpleasant experience. I knew nothing about UNIX-like environment, getting annoyed with RH5 hardware detection, especially in Multimedia & Printing support, I finally mess with X and cannot log into GDM until one day my cousin did some fiddling with configuration files and fixed my X issue.
With those unpleasant memory, I begin installing FC-4.
Installation is graphical and intuitive. During the installation, I chose to manually partition my hard disk and customizing packages selection. I didn't found synaptic nor adept there, but hey, this was the time to use yum, right?
The installation ended with grub installation. Here, I made a mistake. I overwrote my Ubuntu's grub in MBR with Fedora's one. As Fedora did not recognize my Ubuntu installation, after reboot, I presented with no option to log into Ubuntu unless I manually edited the Grub.
The bootsplash is nice although not as informative as (K)Ubuntu's, and after passing my username & password into GDM, I was presented with GNOME 2.10. I had to say I much prefer the brown one than that bluecurve+clearlooks combo though :-)
After playing around for a while (and tasting Fedora's KDE 3.4) I started using yum.
I was thinking yum update is the equivalent of apt-get update when I noticed that it actually updated the system. I found that command is similar with apt-get update followed with apt-get upgrade.
As with apt, a proxy-server in the middle of the way messed up with yum. In the case of my Debian-based system, I changed the sources.list to make apt use ftp instead of http connection. In yum, I found it a bit tricky as it use mirrorlist. By default Fedora's yum using a mirror list to reach its mirror, defined in /etc/yum.repos.d/fedora*.repo (This is a good method, I wonder if Debianistas would adopt this). Since I couldn't find a way to tell yum to use ftp instead http, I created a directory named yum.custom.repo, copied the original .repo files there, made a script to grab those mirrorlist, and created the list locally.
cat fedora.repo|grep mirrorlist|sed -e 's/mirrorlist=//' -e 's/$releasever/4/'|wget -i - -O -|grep ftp|sed 's/http:/ftp:/' >fedora.mirrorlist
cat fedora-extras.repo|grep mirrorlist|sed -e 's/mirrorlist=//' -e 's/$releasever/4/'|wget -i - -O -|grep ftp|sed 's/http:/ftp:/' >fedora-extras.mirrorlist
cat fedora-updates.repo|grep mirrorlist|sed -e 's/mirrorlist=//' -e 's/$releasever/4/'|wget -i - -O -|grep ftp|sed 's/http:/ftp:/' >fedora-updates.mirrorlist
cat fedora-updates-testing.repo|grep mirrorlist|sed -e 's/mirrorlist=//' -e 's/$releasever/4/'|wget -i - -O -|grep ftp|sed 's/http:/ftp:/' >fedora-updates-testing.mirrorlist
cat fedora-devel.repo|grep mirrorlist|sed -e 's/mirrorlist=//' -e 's/$releasever/4/'|wget -i - -O -|grep ftp|sed 's/http:/ftp:/' >fedora-devel.mirrorlist
cat fedora-extras-devel.repo|grep mirrorlist|sed -e 's/mirrorlist=//' -e 's/$releasever/4/'|wget -i - -O -|grep ftp|sed 's/http:/ftp:/' >fedora-extras-devel.mirrorlist
Then I just edited the mirrorlist option in .repo files at /etc/yum.repos.d to point into those mirror list, e.g:
[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=file:///etc/yum.custom.repo/fedora.mirrorlist
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
After yum update completed, I was left with a very up-to-date Fedora system, with surprisingly: a well-working KDE 3.5.
So far, I enjoyed my Fedora experience, and kept it in my system.
I still have space in my hard disk.
So... what will it be : Open SUSE, Mandriva, Gentoo or Slackware?
Tuesday, February 14, 2006
Merge PDF files with pdftk
First, I installed pdftk
# apt-get install pdftk
Then, I merged the files into a single file
$ pdftk file1.pdf file2.pdf file3.pdf cat output file123.pdf
When the files to be merged is a lot, I edited the file list in a text editor (or, when I am in a good mood, using ls & awk & sed) then combine it with the script found here
$ cat stdin_pdf.sh
#!/bin/sh
# combine PDFs; pass filenames in on stdin;
# pass output to stdout
read input_filenames
pdftk $input_filenames cat output -
$ cat filelist|./stdin_pdf.sh>mergedfile.pdf
So far, I am satisfied with the result.
However, I am still looking for the method to modify the hyperlink to suit the new file, since the previously scattered files actually hyperlinked to each other. RTFM is in progress :-)