2008-04-24

Adventures in Open Source (Part 2)

Welcome to Part 2 of Adventures in Open Source!

This post is continuation on the previous article Adventures in Open Source (Part 1). In this post I will give you even more Tips, Tricks and useful information about Linux open source applications and their uses.

dellBiosUpdate
As the name suggests, dellBiosUpdate (which is provided by libsmbios) is tool for updating a Dell BIOS in linux. This came about because one day, I noticed an unanswered and unread post on forums.gentoo.org titled Dell BIOS update: extract_hdr, and I decided to investigate/research this because I also wanted to know if it was possible to flash your BIOS under Linux. I then found out (Thanks to the likes of the the Gentoo unofficial wiki post, HOWTO Dell BIOS Upgrade) that I don't even need M$DOS to flash the BIOS on my M1730!


quagmire ~ #modprobe dell_rbu
quagmire ~ # dellBiosUpdate -t -f system_bios_ven_0x1028_dev_0x01f7_version_a06/bios.hdr
BIOS file matches this system and is newer.
quagmire ~ # dellBiosUpdate -u -f system_bios_ven_0x1028_dev_0x01f7_version_a06/bios.hdr
Supported RBU type for this system: (MONOLITHIC, PACKET)
Using RBU v2 driver. Initializing Driver.
Setting RBU type in v2 driver to: PACKET
writing (4096) to file: /sys/devices/platform/dell_rbu/packet_size
Writing RBU data (4096bytes/dot):
........................................................................................
........................................................................................
........................................................................................
........................................................................................
........................................................................................
........................................................................................
.............
Done writing packet data.
Activate CMOS bit to notify BIOS that update is ready on next boot.
Update staged sucessfully. BIOS update will occur on next reboot.
quagmire ~ # rmmod dell_rbu

After doing the above, It occured to me that this process is somewhat the same as when you flash in windows, as the bios data is written to a special section of the bios or EEPROM, then a "bios update" flag is set so that the system will immediately start the flash process upon reboot. Nifty eh?


SCP (SSH)
I learned that it is possible to transfer files (and folders) to/from a remote path that has one or more spaces in it!

You need to enclose the entirety of the remote hosts argument in quotes and put escape sequences into it. For example:
scp -r "/media/sdd/2008-semester1/csg2207/Unit Schedule" "remotehost:~/UNI/2008-semester1/csg2207/Unit\ Schedule"


Gentoolkit (eclean-dist)
eclean-dist (a wrapper for eclean distfiles), is a tool provided by app-portage/gentoolkit that provides easy distfile cleaning (deleting)

After searching for a solution (thanks to the powers of google), I found that the Gentoo tool exists already. It seems to do an intelligent job at checking against installed packages and removing old distfiles (or tarballs). Pretty neat :)


rsync
That's right. rsync! I haven't done much research into the differences between cvs and rsync, but it seems to be a much easier to use alternative for synchronisation of file trees (UNI, savegames, software repositories, music, movies etc.) and using openssl (ssh) as a transport mechanism with almost no effort!

Here's an example (or proof) of me synchronising a folder of uni unit to my file server:

dean@quagmire ~ $ rsync -uav /media/UNI/2008-semester1/csg2207/ dean@192.168.1.2:~/UNI/2008-semester1/csg2207
Password:
building file list ... done
Assessments/assignment2/contrib/
Assessments/assignment2/contrib/delete.me
Assessments/assignment2/tmp/
Assessments/assignment2/tmp/the sample of risk management.docx.exe
Unit Schedule/
Unit Schedule/delete.me

sent 17094 bytes received 104 bytes 6879.20 bytes/sec
total size is 45568991 speedup is 2649.67

NOTE: I have to reserve TrueCrypt for private data only, as TrueCrypt requires elevated privileges, which I don't have on most UNI computers :(


That's it for this edition! I hope this was as interesting to read as it was for me to research and discover how to use them! Feel free to drop me a line if you have any contributions or corrections. Next post irssi!

No comments:

 
Google+