.mrt memo

tail -f /dev/mind > blog

Posts Tagged ‘howto

Eric S. Raymondi Hacker-HOWTO

without comments

Eric S. Raymond on häkkerimaailmas kahtlemata tuntud nimi ja tema kirjateosed on rangelt soovituslikud lugemised igale tõsisemalt “asjaga” tegelevale inimesele avardamaks maailmapilti ning mõttemaailma. ESR on kahtlemata üks neist “tipphäkkeritest”, kellest ta ise HOWTO-s kirjutab, mistõttu on ta kahtlemata õige mees pealkirjas mainitud kirjatükki kirjutama.

Üldjuhul mõeldakse häkkerist (kõige kitsamas tähenduses) kui programmeerijast, aga häkkerlust võib vaadelda ka laiemalt.

Ma usun, et häkkerlikke põhimõtteid/suhtumist saab edukalt rakendada ka muudes eluvaldkondades, lihtsalt oskused on teised. See osa HOWTOst, kus räägitakse programmeerimisest, tuleb asendada vastava eluvaldkonna loova ja manipuleeriva tegevusega.

Ja lõpetuseks ma arvan, et taoline HOWTO kuluks ära tegelikult misiganes elualal. Abistav, otsekohene, läbinisti aus. Täpselt nagu häkkerikultuurile omane.

Mis oleks Sinu elus teistmoodi läinud, kui Sa oleksid lugenud enne misiganes eriala õpetavasse asutusse astumist lugenud läbi kõikide huvipakkuvate erialade ausad ja otsekohesed HOWTO-d?

Written by dotmrt

2009/11/23 at 02:07:44

Posted in howto, it, kool

Tagged with , , ,

Estobuntu ja KDE 4.1

without comments

Nagu valatult ilmus mõni aeg tagasi KDE 4.1, mille paigaldamine *buntule on eriti lihtne. Kaasa aitas siin mõne kekkamine, kui ilus ja kiire KDE4 ikka on ja puha. Seega tegudele!

Lisa /etc/apt/sources.list-i järgmine repo:

deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu hardy main

Seejärel uuenda pakkide puhvrit ja installi vajalik (mõnes kohas soovitati lihtsalt dist-upgrade, kuid mul mingil põhjusel jäi niiviisi suuremosa asju installimata):

sudo apt-get update
sudo apt-get install kubuntu-kde4-desktop
sudo apt-get install kdepim-kde4
sudo apt-get dist-upgrade

Nüüd saad sisse logides valida sessiooniks KDE4 vanema KDE3.5 asemel.

Muidu asi töötab, Compiz/Xgl-iga muide palju kiiremini kui KDE 3.5 (netis surfates jäi mulje, et süüdi on ATI driverid), kuid pisut häirib Katapulti mitte töötamine. Kes ei tea, siis tegemist oli programmijupiga, mis KDE3 all Alt+Space peale programmi nime lubas trükkida ja siis niimoodi K-menüüst kirjet otsis, et Enter vajutades siis otsitu kiirelt käivitada. Aga natuke leevendab olukorda uus K-menüü süsteem, mis sarnaneb OpenSUSE menüüsüsteemile, kuhu samuti võid trükkida programmi nime tema kiiremaks käivitamiseks. Katapult lihtsalt avanes juba kiirelt ühe klahvikombinatsiooniga, kuid Kickerit pead avama hiirega. Aga eks saab sellestki hiljem üle.

Eks alguses tundu kõik pisut võõrastav. Eriti kogu see widgetite süsteem, plasmoidid jms, kuid juba praegu on KDE 4.1 minu arvates piisavalt stabiilne tema kasutamiseks, rääkimata sellest, et teda jõudsalt arendatakse. KDE 4.1 on värske, kiire ja stabiilne.

Linke

Written by dotmrt

2008/08/01 at 00:13:27

Posted in estonia, it, linux, ubuntu

Tagged with , , , , , ,

Estobuntu 8.01 uuendamine Hardy-ks (8.04)

with 4 comments

Eestlaste oma Linuxi mugandus – Estobuntu – on vinge asi oma Kõu, ID-kaardi ja eestikeele toega, kuid seal on Firefox 2.0 ja muu vanem tarkvara. Samas on asi eesti keelne ja töötab.

Kuid tahaksin siiski kasutada igatsugu tarkvaradest viimast versiooni, mistõttu otsustasin upgradeda asja Ubuntu Hardy Heroni repode tasemele, kus on Firefox 3.0, KDE4 pakid jms. See käib õnneks suht lihtsalt. Nimelt /etc/apt/sources.lists failis vaja asendada “gutsy” stringiga “hardy” (välja arvatud Estobuntu repositoorium, millel on vaid gutsy kataloog praegu).

Uuendamise protseduur

Uuendamise käigus näitab ta et oma 800+ pakki on uuendada vaja ja asub kraami alla tirima isukalt.

sudo cp /etc/apt/sources.lists /etc/apt/sources.lists.backup
kdesudo kate /etc/apt/sources.lists
sudo apt-get update
sudo apt-get dist-upgrade
shutdown -r now

Distro upgrade ajal tekkis minul probleem “locales”, “language-support-writing-et” ja “language-support-translations-en” pakkidega, mille puhul jäi dpkg ootama mingi tegevuse taha, mis lõppeda ei tahtnud.

Hädast aitas välja see, kui ma hakkasin tapma maha neid protsesse, mis tegelesid nende pakkide paigale sättimisega. Peale seda sai dist-upgrade-ga tehtav tegevuste jada edasi minna:

ps -ef | grep dpkg

Sealt siis protsessi ID ja

kill -6 <PID>

Üks võimalus on ka teha

sudo dpkg -r locales

ja siis pärast rebooti “locales” pakk paika installida. Ei ole vaja karta, et Estobuntu ilma selleta üles ei boodi. Tuleb üles ja seejärel on võimalus locales pakk uuesti installida.

sudo apt-get install locales
sudo apt-get autoremove

Pärast uuendust

  • Töötab Kõu.
  • Firefox ei ole enam tõlgitud, kuna vastavad pluginad ei ühildu tulirebase kolmanda versiooniga.
  • ID-kaardi autentimine (PIN1) töötab veatult – proovisin Omnikey 1021 lugejaga. Sisenesin hansa.ee-sse ja emta.ee-sse probleemideta.
  • ID-kaardi allkirjastamist (PIN2) tahtsin proovida https://digidoc.sk.ee -s, kuid sain dokumendi allkirjastamise peale teate “Teie arvutisse in vaja installeerida PKCS#11 ohjurprogramm!”, millepeale loobusin

Tegelikult ma ID-kaarti elektroonselt üldse ei kasuta enam, kuna mulle meeldib palju rohkem mobiili-ID, kuid huvi pärast proovisin ära. Pmst on minu jaoks olulisim omadus Kõu, mis võiks kõmada probleemivabalt. See, et eesti keel Tulirebasest ära kadus on ka nohu minu jaoks. Samas on selge, et Estobuntut ei saa sellisel kujul Hardy (8.04) repode peale viia, sest eesmärk on ju eestikeelne distro.

Digiallkirjastamist ma võibolla lihtsalt ei osanud testida korralikult ja see Digidoci veebirakendus ongi pisut vigane. Samas mulle meenub Sertifitseerimiskeskuse digitaalse identiteedi konverentsil kuuldu, et käimas olla miski riigihange, mis pidada Linuxi ja Maci tuge parandama. Räägiti Digidoci uuest formaadist ja Linuxi kliendist, seega “kui asi ei peagi nii töötama”, on vast ainus võimalus lihtsalt oodata.

Written by dotmrt

2008/07/30 at 01:22:06

ThinkPad T60 dual boot – Windows XP & Linux (Estobuntu)

without comments

Another post for the users of ThinkPads. This time on dual booting with Windows XP, because it’s not that straightforward the way I did it.

Just for intormation – Estobuntu is an Estonian conversion of Kubuntu 7.10 with support to Estonian ID-card in Firefox 2, “Kõu” wireless internet connection covering almost all of Estonia and it’s meant to be used in Estonian. But the information below is applicable to any Linux you try to install onto your ThinkPad.

Outline

The objective was to dualboot XP and Estobuntu without harming the ThinkVantage maintenance partition from where you can restore and recover your system. If you don’t care about that, then there is no need to waste 5G-s of HD-space. Install XP and then Linux as with any other PC. But I wanted to preserve the 5G maintenance partition, because it appears Lenovo has some utilities like fingerprint enrolling and such available only in Windows. So if for nothing else, you should leave XP only for that reason.

And of course – I strongly suggest you make a backup of your installation after you get your XP up and running with your apps. ThinkVantage Rescue and Recovery has the facilities to do it, so why not use it? I had a bad experience with DVD-s (3 altogether – 1 for RnR partition recovery and 2 for my Windows installation recovery) so I would suggest a USB drive. The latter worked for me rather good and I was able to restore my system from it.

Some searching revealed some posts warning not to install GRUB boot loader on the usual place in MBR, but instead using WinXP’s boot loader to load Linux. So below I’ll give some links and quick memo of the installation. I also expect you know your own setup a bit, so you can replace /dev/sda (SCSI device) with /dev/hda (IDE device) or hd0,1 with hd1,3 where you see necessary – I’ll just write a short memo of the installation here. More information behind the links.

Probably it would be wise for you to read a nice post by Life is a Venture, who gives the warning about maintenance partition and points to some good howto’s. I’ll bring out some main point below.

Howto

You have Windows XP installed and backed up.

Boot into Linux livecd

First thing to do is to backup your MBR as described here. /dev/sda is your WinXP harddrive.

sudo dd if=/dev/sda of=MBRbackup.img bs=446 count=1

Next you install Linux as usual, begin with resizing the XP partition and move on to slicing yourself some Linux partitions. Only pay attention that you don’t install GRUB onto your MBR. Also don’t install it in (hd0,0) or (hd0,1) which respectively are your Windows XP partition and Lenovo maintenance partition. For example I installed GRUB on “/dev/sda4” aka “(hd0,3)” – where I installed my Linux. (hd0,2) is my Swap partition. You need to look for some advanced conf options in your Linux installer to install the GRUB into the right place.

After partitioning you need to take the first 512 Bytes aka the bootloader you just installed and make it available for WinXP bootloader. I used the LiveCD environment to copy the resulting bin-file to my USB stick and then booted to XP. More thorough description found here.

sudo dd if=/dev/sda4 of=/media/disk/estobuntu.bin bs=512 count=1

Reboot into Windows.

In XP copy estobuntu.bin to C:\. Then go to Control Panel – System – Advanced – Startup and Recovery – Edit. Notepad opens and you can add the following line into the end:

C:\estobuntu.bin=”Estobuntu”

As you can guess, the first is your first 512 bytes from the Linux partition. Between the quotes is the name appearing in the WinXP bootloader.

Now you can reboot and get into your fresh installation of Linux through Windows bootloader.

Links to more thorough articles:

Further study

  • A recovery install of XP from maintenance partition would destroy the Linux install – perhaps there is a way to avoid that?
  • Perpahs there is a way for GRUB to work with maintenance partition and the ThinkVantage blue button? I can see the maintenance partition in my GRUB and boot into the maintenance partition from there, so I’m not exactly sure if the fuss of NOT installing GRUB onto MBR has anything to it.

Written by dotmrt

2008/07/30 at 01:20:19

Wifi-Router firmware – Tomato on Buffalo WHR-HP-54G

with one comment

So you’ve got a Wifi-router. That don’t impress me much.
In fact, nobody could give a rats ass and less notice of the brick you have under the table/hanging from the wall/on the floor. When somebody comes to visit you, the only concern is “have got wifi?”

I’ve had my Buffalo AP for ages by now (speaking in tech it’s about 2+ years) and one day (well, it was yesterday) I found that there are loads of “3rd party firmware” out there for these little cheap boxes. The most popular to modders is the Linksys WRT54G series (nowdays WRT54GL – “L” standing for Linux), but Buffalo WHR-54G series seems to be also popular.

Not to get into too much detail, then couple of great guys have written their own firmware and put it up for others to download and install. Usually this modding changes the admin console and unlocks some “restricted” features you may have not been aware of. I don’t want to brake the law here in Estonia, but it seems that Buffalo’s “HP” aka “High Power” might very well be able to exceed the regulations in this part of the world when correctly set up. But that’s for another time.

The procedure – tftp

So I thought, why not to do something I really don’t need and what might utterly destroy my router and installed Tomato Firmware on my Buffalo WHR-HP-54g. They’ve got great wiki which provided me all the information I can cope with right now, but to make the long story short, I’ll memorize it here as you need to do exactly as the manual says:

  • install Trivial File Transfer Protocol if not already installed – tftp (ubuntu package)
  • download the latest firmware
  • plug your computer via wired connection to the router
  • find the reset button on the bottom of the WHR and hold it for at least 30 seconst, the diagnostics led will blink
  • then unplug it for 10 secs
  • after plugging it in, set your IP to static in the 192.168.11.2 and gateway 192.168.11.1
  • in one terminal window “ping 192.168.11.1″ continually
  • unplug the router and see how ping timeouts
  • open second terminal and write following commands
  1. tftp
  2. binary
  3. rexmt 1
  4. trace
  5. connect 192.168.11.1 (Even though the router is still powered down, tftp doesn’t actually “connect” when you execute. So relax)
  6. put tomato.trx
  • Do not press enter yet on the last command
  • Plug the router in again and be ALERT for the first ping
  • When ping gets it’s first response, push enter in the tftp window (you’ll see data transfer “sent DATA <block=5425, 512 bytes>” “received ACK <block=5425>”…)
  • when done wait for at least 2 minutes, then unplug the router for 10 seconds and after plugging in, you should be ready
  • Your “refreshed” router is now 192.168.1.1 with default user/pass being root/admin. Log into admin console and change it – http://192.168.1.1/

I suggest you read the Wiki for more thorough guide.

Loads of mods out there

That’s the procedure to follow when you want to flash your router. Some possible firmware to check out (got them from Tomato wiki):

  • dd-wrt – probably the most famous one. “Supported hardware” list is quite impressive.
  • FreeWRT – supports some Linksys, Asus and Netgear boxes
  • Tarifa – seems to be exclusively for WRT54GL
  • OpenWRT – not very user friendly, but boasts a packaging system to manage software installed and also is named to be the “leanest and meanest” of all router firmware. Also the “supported hardware” list is quite long.
  • X-WRT – project to make a decent webUI for OpenWRT
  • Tomato – based on formes HyperWRT project with nice clean and 21st century webUI using AJAX and SVG

All are based on Linux in some way or the other, to my knowledge.

Also I learned a new term – “to brick“, you have just brick’d your router. Means you have just managed to do something wrong and your router is nothing more than a brick. Fubar, so to speak. (Although I found some advice on de-bricking your box, not that I needed it, yet.)

Final thoughts

Finally, I need to say, that I really had no real need to do all this. I just thought it would be cool to see statistics about my router clients, their net usage and such little stuff which Tomato provides with nice AJAX interface. Also there are some little things you might think are quite logical, but big manufacturers just don’t care. Like when you need to define a channel to use, it would be logical to scan the vicinity for other networks and then assign the channel. You can do that directly in Tomato’s UI. There are such little things all around.

But I know 3rd party firmware to be actually really useful for Wireless Repeaters, Wireless Distribution System and Wireless EThernet/Ethernet Bridge or whatever term you can find, which basically let you enhance your IEEE 802.11 network’s range with additional routers. I got lost searching for differences between those terms, but it seems in one case you MUST have different channels and you CAN have different SSID’s and such. Didn’t go further from there.

Further study:

  • is there some difference in WPA/WPA2 encryption support in different repeating/bridgeing ways (WDS,WET) (some tutorials I found mentioned WEP – don’t really understand if they are imbecilles or perpahs just WPA is not supported and they wanted to market the firmware bridging possebilities as “sure, we have encryption”)
  • are both routers still functioning as AP-s also when using WDS and/or WET (found some controversy on that)
  • is there difference in datagram forwarding between WDS and WET (all forwarded vs only those datagrams forwarded which destinations reside in the view of that router)
  • what are the methods used by available commercial repeaters sold in the stores
  • find some cool projects done with 3rd party firmware for routers
  • some feature difference table of all the firmwares would be helpful

PS

I discovered, that Buffalo is actually selling their WHR-HP-54G with DD-WRT preinstalled (link), which is kinda cool.

Written by dotmrt

2008/07/03 at 23:17:46

Posted in it, linux

Tagged with , , , , , , , ,

Hardware diagnostics on Linux

with 2 comments

Something from the topic of “Things you can’t do in Windows”.

Hypothetical scenario: you have a new machine and new installation of Windows XP, but no hardware is recognized. It barely display’s you a really small resolution picture.
Another scenario: you cant look into your box, but you have to get the specs somehow.

Now on Windows you would probably try something like SiSoftware Sandra, but it seems to recognize only the drivers that are installed in your system. Not the hardware itself. That is almost completely useless. Well I am not aware of any better means to accomplish this task in Windows than to reboot into Linux (whether its a live cd or installed dual boot system, doesn’t really matter) and explore your system with some of the following commands:

  • lspci
  • cat /proc/cpuinfo
  • lsusb
  • cat /proc/scsi/scsi
  • ls /dev (if using udev)
  • dmesg|less

Via Slashdot.

Written by dotmrt

2008/04/26 at 07:25:45

Posted in howto, it, linux, windows

Tagged with , , ,

How to get Ubuntu version and nickname

without comments

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 7.10
Release:        7.10
Codename:       gutsy

As you can see, it also mentions that annoying codename that I keep forgetting. Now I’ll hope I’ll remember that command.

Written by dotmrt

2008/03/26 at 20:03:17

Posted in ubuntu

Tagged with , , , ,