Tag-Archive for » vout «

Thursday, November 12th, 2009 | otè:

If you ever find yourself updating a single application in Arch Linux (a very bad idea, btw) and it upgrades readline you might end up seeing an error along the lines of:
/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
Hopefully you still have a bash prompt open and you haven’t closed them all. If you still can, immediately run the following:
pacman -S bash
else you won’t be able to run bash any more because bash would still be linking to the old version of readline.

Epitou, in future, don’t run
pacman -Sy application
(python in my case)
instead, run:
pacman -Syu
which will ensure that all applications are upgraded.

Personally, I think that bash should have had a dependency set saying that it required the old specific version of readline and the same for the new bash, requiring the new version of readline. Regardless, rather play it safe. 😉

Friday, September 11th, 2009 | otè:

Peace in the land of USB

Under a *nix operating system, having multiple partitions on a USB drive isn’t rocket science, it just works. Nan ka mwen an, my USB drive has two partitions because the first partition is a bootable Arch Linux installer.

I have Windows on a desktop at homemostly for gamingand many of my colleagues use it too. Since Windows doesn’t do very well with non-Windows partitions I figured I could create a FAT32 partition on the memory stick after the bootable Arch Linux partition. FAT32 is almost ubiquitous and is usable on every common desktop operating system in the world.


Unfortunately it doesn’t work straight off the bat. Apparently, Microsoft in their infinite wisdom decided that memory sticks are supposed to have one (and only one) partition. In reality Windows finds the first partition and then ignores any others that happen to be set up:

Please Format

Err, no, I do not want you to format my Arch Linux installation partition

The trick to getting it working is to fool Windows into thinking the device is pa a regular USB memory stick but perhaps a solid-state hard disk which happens to be connected via USB. Yes I know, this is seriously stupid that Windows behaves this way. A solid-state hard disk is just a whopping big (and fast) memory stick after all!

I found a few sources on how to do this however I still had to figure out some things on my own. Specifically, the guides I found either skipped some steps or didn’t provide enough information on where to download the driver package.

This procedure involves manually changing hardware drivers and installingnon-signeddriversnot intended for your hardware”. I know someone is going to break their system and blame me so I say now that I take no responsibility for any damage you may do to your Windows system as a result of this. Read that again. 😛


remove the highlighted text

click for larger version

Download and unzip the driver, originally created by Hitachi, isit la. Open the cfadisk.inf file in notepad (or your favourite plaintext editor), and find the section labeled [cfadisk_device]. Remove the section highlighted on the right:

Minimize (don’t close) the editor and go to your desktop iconsright-click on My Computer and select Properties. Select the hardware tab and then select [Device Manager]:

System Properties

Find the device underDisk drives”, right-click your memory stick and select Properties:

Device Manager

Click the Details tab and in the dropdown box on that page, selectHardware Ids”. Click the first line in the list of Hardware IDs and press Ctrl+C to copy the name:

USB Hardware Ids

Don’t close this dialog, go back to notepad (which was minimised) and paste the hardware ID into where the previous content was removed.

Changes pasted into notepad

Save the file in notepad and go back to the device’s property dialog window. Click theDrivertab and click the [Update Driver…] button. In the windows that pop up, selectNo, not this time”; [Next] -> “Install from a list or a specific location (Advanced)”; [Next] -> “Don’t search. I will choose the driver to install.”; [Next] -> [Have Disk…].

Unsigned Drivers - Click Continue Anyway

Browse to the folder where you have saved the modified cfadisk.inf file. Click [OK]. You will find

there is a Hitachi Microdrive driver listed. Select this and click [Next]. When the warning

appears, click [Yes]. Another warning will pop up regarding a similar issue (these are theunsigned” ak “not intended for your hardwarewarnings I mentioned earlier). Click [Continue Anyway]:

At this point I recommend closing all the dialog boxes related to the setup. Finally, remove and re-insert the memory stick into your USB port and you should find that the extra partitions on the stick are accessible. In the worst-case scenario, you might still need to partition the disk however the hard part is over. 🙂

Sunday, April 26th, 2009 | otè:

Trust me. We’re still dealing with regexesjust in a roundabout (and vaguely practical) way. This is a pretty comprehensive listing of how to go about flushing DNS caches while using regexes to show where similar methods deviate.

Why do we want to clear DNS caches exactly?

There are a number of reasons to clear DNS caches, though I believe these are the most common:

  • An intranet service has an private (internal) IP address when on the company network but it has a public IP address for outside access. When you try to access that service from outside after accessing it from inside, there’s a chance that you would have cached the private (inaccessible) IP. A good long-term solution is to make the service inaccessible except via VPN. A simpler solution is to leave work at work. 😛
  • An internet service or web site changes their DNS settings and your desktop/laptop is looking at theoldsetting. In this case, the new setting has not yet propagated. Hosting Admins come across this case very often.
  • Privacy: If someone can track your DNS history then it wouldn’t be too hard to figure out which web sites you’ve been viewing. Though the individual pages you’ve viewed can’t be tracked in this way, the hostnames, tankou “dogma.swiftspirit.co.za” oswa “google.comwill be in the DNS cache, gen anpil chans nan lòd la ou premye jwenn aksè chak sit. Gen fason pi bon fè menm si sa a. Yon egzanp se sèvi ak yon rezo Tor pou tout demann dns.

Flushing Windows’ dns kachèt, soti nan èd memwa lòd:

Prèv sijere ke yo anvan Windows 2000, Windows OS a pa t 'kachèt dns rezilta. Nan ipkonfig lòd, kouri soti nan èd memwa nan lòd, te bay kèk kontwòl sou kachèt a dns ak li te rete apeprè menm bagay la tou depi.

Pou li ale nan èd memwa a si lè l sèvi avèk Vista kòm ki pa Admin: Head Start -> pwogram -> Pwodwi pou Telefòn -> Dwa-klike sou “Kòmand rapid” -> Kouri kòm administratè

Sinon: Head Start -> Ryon -> [km ] -> [ OK ]

ipkonfig / flushdns

Flush the DNS Resolver Cache in Windows

Li posib tou klè kachèt la nan Windows pa rekòmanse nan “dns Kliyan” oswa “Dnscache” sèvis.

Flushing Mac OS X dns kachèt, soti nan èd memwa koki:

depi Mac OS X, Apple Macnan yo te kouri yon UNIX ki baze sou, POSIX-konfòme, sistèm opere ki baze sou Lòt etap, tèt li orijinal ki gen Kòd soti nan frizbs ak NetBSD. Mac OS X itilizasyon lookupd oswa dscacheutil jere kachèt a dns, depann sou vèsyon an.

Pou li ale nan èd memwa a: Aplikasyon -> itilite -> tèminal

(lookupd|dscacheutil) -flushcache

Ki sa ki gen nou isit la? Tankou pou chak pati 1, nan ba vètikal endike ke swa “lookupd” OSWA “dscacheutil” yo akseptab. Nan parantèz endike ke nan ba vètikal sèlman aplike nan la “lookupd|dscacheutil” pòsyon nan ekspresyon an. Se konsa, nan ” -flushcache” se pa si ou vle, epi yo dwe enkli nan lòd la yo nan lòd pou li nan travay. Remake byen ke kòmandman sa yo pwodwi pa gen okenn pwodiksyon sòf si gen yon erè.

Sèvi ak dscacheutil si w ap itilize Mac OS X 10.5 (leyopa) oswa pita.

Mac OS X:

lookupd -flushcache

Mac OS X leyopa:

dscacheutil -flushcache

Use dscacheutil to flush the cache in Mac OS X Leopard

Genyen tou se yon zouti entèfas, dns Flusher, ki otomatikman sèvi ak lòd ki kòrèk la ki disponib.

Flushing Linux / UNIX’ dns kachèt, soti nan èd memwa koki:

N.B. Si ou pa deja gen swa mare (ak caching Passage pèmèt), ns, oswa dsmask enstale ak kouri sou * ou nix ki baze sou Desktop / sèvè, ou yo se pwobableman pa caching dns nan tout ak pa gen anyen yo kole. Nan ka sa a ou pral itilize sèvè dns ou pou chak demann sou sit, pwobableman ralanti eksperyans entènèt ou *. Si se konsa, Mwen rekòmande omwen ns enstale kòm li se pi fasil a yo mete kanpe. **

Flòch kachèt ns la

Menm jan ak yo lòd, ki Mac OS, sa a pwodui absoliman okenn pwodiksyon sòf si gen yon erè:

(|sudo )(|/Uzr / sben /)ns -i gen tout pouvwa a
  • sèvi ak sudo si ou pa deja rasin otreman seleksyon an premye a se vid.
  • Espesifye / Uzr / sben / si ns se pa deja nan la “chemen”. Si distribisyon ou ns nan yon kote ki etranj, jwenn li premye:
jwenn -r bin / ns $

Remake pi wo a “bin / ns $” se tèt li yon ekspresyon regilye. 🙂

Lè l sèvi avèk ns, invalid a “gen tout pouvwa a” cache, louvri sesyon an kòm yon itilizatè:
sudo ns gen tout pouvwa a -i
Lè l sèvi avèk ns, invalid a “gen tout pouvwa a” cache, louvri sesyon an kòm rasin:
ns -i gen tout pouvwa a
Lè l sèvi avèk ns, invalid a “gen tout pouvwa a” cache, louvri sesyon an kòm rasin, espesifye chemen an plen:
/Uzr / sben / ns -i gen tout pouvwa a

Flòch kachèt mare nan

Kachèt kole mare nan, nou bay yon lòd atravè rndc. Sèvi ak sudo si ou pa deja rasin:

(|sudo )rndc kole

Rekòmanse sèvis sa yo cacheing tou travay!

Men ki jan yo rekòmanse swa nan damon yo caching:

(|sudo )(sèvis |/elatriye /(rc\.d|rc\.d/init\.d|init\.d)/)(mare|dsmask|ns) rekòmanse

Sa a kòmanse jwenn difisil nan li. *** Chans mwen te eksplike an detay:

  • Menm jan ak yo lòd, ki anvan yo, sèvi ak sudo si ou pa deja rasin.
  • Seleksyon an dezyèm gen opsyon a an premye “sèvis “. Sa a aplike sitou nan Wouj Hat / CentOS ak sistèm Fedora.
  • Nan “/elatriye /(rc\.d|rc\.d/init\.d|init\.d)/” bezwen yo dwe elaji pi lwen. Sa a se pou pifò lòt sistèm. Anjeneral, the rc.d is for if you’re using a BSD-style init system (for example: Arch Linux, frizbs, or OpenBSD). The best way to know for sure which command to use is to ‘locatethe correct nscd or dsmask chemen. Most Unix flavours, even Solaris, use nscd:
locate -r \.d/nscd$ ; locate -r \.d/dnsmasq$ ; locate -r \.d/rndc$
  • The last choice is between “mare”, “ns”, ak “dsmask”. This depends entirely on which is installed and in use.
  • The last of the pattern, ” rekòmanse”, is the instruction given to the daemon’s control script.

Arch, using dnsmasq, restarting the cache daemon, louvri sesyon an kòm rasin:

/etc/rc.d/dnsmasq restart

Arch, using nscd, restarting the cache daemon, logged in as user:

sudo /etc/rc.d/nscd restart

CentOS / Red Hat, using nscd, restarting the daemon, as root:

service nscd restart


Flush Mozilla Firefox’s internal DNS cache:

Mozilla Firefox keeps its own DNS cache for performance. Firefox 2 would cache only 20 entries for up to 60 seconds. The default setting as of Firefox 3 appears to be 512 entries for up to 60 minutes which seems much more reasonable for every-day browsing. If your desktop has a built-in cache (which most now do) then the cache here is actually redundant. I’m not aware of any other browsers that implement DNS caching.

I’ve found a few solutions for when you need to clear the cache. It seems there are many ways to do this however these are the easiest, which I’ve put into order of preference.:

  1. Install the Firefox DNS Flusher Addonprovides a button to flush the cache.
  2. Install the DNS Cache Addonprovides a toggle which disables or enables the DNS cache.
  3. Clear Cache (clears browser cache as well as DNS Cache): Select Tools -> Clear Private Data; Deselect all checkboxes except for Cache; Click [ Clear Private Data Now ].
  4. Manually do what DNS Cache does: set the following 2 about:config optionsnetwork.dnsCacheExpiration” ak “network.dnsCacheEntries” to 0 and then back to the default.

I had a bad cached record and I cleared my browser’s cache. But its still giving me the wrong info. What gives?

Because of how DNS propagation works, you preferably need to flush the DNS on all DNS hosts between yourself and theauthoritivehost, starting with the host closest to the authoritive host (furthest away from your browser).

As an example, if you have a router that is caching DNS, reset the router’s cache before restarting the DNS cache of your operating system, and only then should you clear the cache in Firefox. The reason is that even if you only clear your OS and Firefox’s caches, your desktop is still going to ask the router for its bad record anyway.

What if my DNS server is a server on the net outside my control?

You could try temporarily using a different nameserver, possibly even a publicly open server. OpenDNS shows some good information on how to do this. If you’d like, you should also be able to get relevant information from your own ISP regarding their resolving DNS servers. A local example (South Africa) is SAIX which lists their resolving DNS servers.

* Likely the reason why Firefox has a DNS cache built-in ****
** “((pakman|yogout) -S|emerge|(yum|aptitude|apt-get) install) ns” and then ensure that the service is added to the startup scripts. Refer to your distribution’s installation documentation.
*** I’m looking for a syntax highlighting plugin that can work with regex
**** I’ve read statements that restarting the network(ing|) service also clears the DNS cache however I haven’t seen any evidence that this is true. If anyone has a example where this is true, please provide me with the details.
Wednesday, April 22nd, 2009 | otè:

Arch Linux’s installation process is documented on the Arch wiki. I recommend that persons new to Arch try the excellent Beginner’s Guide instead of the Official Arch Linux Install Guide. Though both wiki entries cover similar ground, the Beginner’s Guide gives a lot more relevant information for those new to the system. The Beginner’s Guide is aimed at desktop installation and, as I’m installing a server, I won’t be going through the installation of the graphical environment at all. Assuming that you’re following my installation, assume that I’ve followed the Beginner’s Guide right up to and including the installation of sudo. I installed the ssh daemon afterwards rather than during the initial setup however.

A few small recommendations and notes regarding installation:

  • If you can, consider using a USB memory stick for the installer and keep it handy for future installations.
  • I keep a copy of my localrepositoryof installed applications on my installer memory stick. Once installation is finished I save a bit of download and update time by copying this to the new server’s /var/cache/pacman/pkg/ folder. The repository on my desktop is typically 1.7GB
  • For the rc.conf, South African-appropriate regional settings are:
  • I’ve set up the network very simply, according to the guide, and will be expanding on the network setup in a later post.
  • As it is for a server, my non-privileged user on the server is only part of 3 groups: wheel (for sudo), storage, and users. A desktop user will likely be in many more groups.

I prefer using an application called yogout instead of Arch’s default package manager. Yaourt has the exact same usage syntax as pacman except that it supports a few extra options. It is actually a wrapper application in that it, in turn, uses pacman. Importantly, yaourt supports installation of applications from Arch’s AUR. Nan AUR is a repository of installation scripts built by Arch users for Arch users to easily install applications that are not officially supported by the main Arch repositories. Yaourt can download and install applications from AUR or the main repositories with the same command, treating the AUR asjust another repository”. Pacman unfortunately does not support this.

Again, the installation is covered in the wiki. I recommend the easy route mentioned in the wiki if you’re new at Arch. Its too much too soon to do it the hard way (also mentioned in the wiki entry).

When done, update your system by issuing the single command:

yaourt -Syu


pacman -Syu

and follow the given recommendations.

Wednesday, March 25th, 2009 | otè:

I finally got Ignite RealtimeNan Spark to work. I don’t particularly like Sparkits a necessity though and I’m sure others have had trouble with it.

As some readers might be aware, I’m using 64-bit Arch Linux. Spark runs on top of a JRE, independent of the base platform. Therefore, this shouldn’t be an issue. Sepandan, Spark appears to come bundled with a 32-bit JRE.

After a lot of hassle, I eventually figured all I had to do was obscure or remove (rename or delete) the bundled JRE. This way, Spark’s startup script wouldn’t find the bundled JRE and it would be forced to search for the one built into the system. I had previously installed openjdk, an open source JRE from Arch’s [siplemantè] repository.

There also happens to be a minor bug in the startup script in that its looking for a folder called “fenèt” when there’s clearly no such folder except one named “Linux”. Go figure.

Anyway, here’s the gist of the installation if you’re doing it manually on 64bit ak you already have a JRE (such as openjdk) installed for your system:

mkdir -p ~/src
cd ~/src
wget http://download.igniterealtime.org/spark/spark_2_5_8.tar.gz
tar -zxvf spark_2_5_8.tar.gz
mv Spark/jre Spark/jre.not
sed -i 's/\/lib\/windows/\/lib\/linux/g' Spark/Spark
sudo mkdir -p /opt
sudo mv Spark /opt