Site NavigationDisclaimerCategoriesSyndicate This Blog |
Entries tagged as hintRelated tags administration article backup bios blog btrfs community conference configuration containers development distribution domain event free froscon installation linux lvm meeting mysql opensolaris opensource oracle oss otn presentation RPM seminar site news snapshots social solaris storage sysadmin thinkpad tools tweak ubuntu update utility virtualization workshop zfs cluster cms code collaborating compiling contributing drupal eclipse email engine falcon fisl forge groupware hosting interview java licensing linuxtag logging mailinglist netbeans opengis openoffice OSS osx packaging rpm sun suse twitter virtualbox web wiki windows writings bzr databases drizzle encryption gallery hardware innodb multimedia mylvmbackup news perl php pictures programming python slides snmp subversion travel university webinar betatest appliance cmake connector drivers gis gui internals plugins spatial studio xen Hardware baby fosdem opensqlcamp recording schwag award survey amoocon bindings bof book brazil camera captcha cebit codebits concert contributions deutsch doag documentation embedded git gsoc guug highavailability ioug jobs lamp languages life Linux linuxcon magazines mercurial ocfs2 openworld OS/2 oscon patches personal planetmysql porting proxy scm sfd spam streaming trademarks ukoug usergroup vacation video voting work flightgear simulation trackball intellij Site News hotplug oow review security shell VoIP bdb boox certification ebook epub errors manual Personal rss sqliteWednesday, June 4. 2014Updating the BIOS on my ThinkPad T440 without Windows or a DVD-DriveSince the beginning of this year, I'm a happy Lenovo ThinkPad T440 user. All components are supported on Linux (currently running Ubuntu 14.04 on it) — everything Just Worked "out of the box" after the installation. This has been my experience with all previous ThinkPad models so far (I also owned a T42, T60 and T420 before). The laptop came with Windows 8 pre-installed, which I found very confusing to use (I haven't had actively worked with Windows for quite some time). But since I replaced the built-in hard disk drive with an SSD anyway (a 500GB Samsung EVO 840), that problem was solved quite quickly. Installing Linux via an USB stick was a simple affair, it most cases you can simply download and dd the ISO image on the USB stick and select it as the boot device on the next reboot by pressing F12 at the right moment. However, not having Windows installed on another partition and not owning an external CD-ROM/DVD-drive, I now faced one problem: how to update the BIOS? Lenovo only provides a Windows-based tool and an ISO image that contains the BIOS update utility and the new firmware. However, this ISO-Image does not boot from an USB stick directly, so the dd method does not work. Fortunately, like many times before, the ThinkWiki came to the rescue — their page about BIOS update without optical disk gave me the right clues. I downloaded the ISO image containing the BIOS update from the Lenovo Support web site and plugged in an empty USB stick, which appeared as /dev/sdc in the device list (the T440 has a built-in 16GB SSD on /dev/sdb. The ISO image actually contains a (bootable) hard disk image, which can be dumped on an USB stick directly. To extract the image, I used geteltorito from the genisoimagepackage: $ geteltorito -o bios.img gjuj13us.iso Booting catalog starts at sector: 20 Manufacturer of CD: NERO BURNING ROM VER 12 Image architecture: x86 Boot media type is: harddisk El Torito image starts at sector 27 and has 32768 sector(s) of 512 Bytes Image has been written to file "bios.img". $ sudo dd if=bios.img of=/dev/sdc 32768+0 records in 32768+0 records out 16777216 bytes (17 MB) copied, 0,641393 s, 26,2 MB/s $ sudo fdisk -l /dev/sdc Disk /dev/sdc: 16.0 GB, 16013942784 bytes 64 heads, 32 sectors/track, 15272 cylinders, total 31277232 sectors Units = sectors of 1 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdc1 32 32767 16368 1 FAT12 There's my bootable USB stick. Rebooting the laptop and choosing the USB stick from the boot menu (F12) properly booted into the BIOS update utility and allowed me to update the BIOS to the latest version. No Windows required!
Posted by Lenz Grimmer
at
14:18
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: administration, bios, configuration, distribution, hint, installation, linux, opensource, OSS, thinkpad, tools, tweak, ubuntu, update, utility
Saturday, November 15. 2008Using a serial mouse via USB on OpenSolarisAs noted in my previous blog posting, I manged to revive my old Logitech TrackMan Marble FX on Linux (openSuSE 11.1b4), using a Serial-to-USB dongle with a Prolific PL2303 chip. But I also use OpenSolaris on my Laptop quite frequently (currently testing the upcoming 2008.11 release), so I investigated if it would be possible to enable the trackball there as well. Luckily, the Driver Manager listed the plugged in adapter and the correct driver (usbsprl) was loaded already. Now the real challenge was finding out which device node to use. Some research revealed that the driver actually comes with a manual page , which indicated that /dev/term/0 was the correct device name. Lo and behold, I copied the InputDevice section from my Linux xorg.conf file into the OpenSolaris one, replaced the Device parameter with the appropriate one and restarted the X server. Immediate success! Now I can enjoy using my most favourite input device on OpenSolaris as well. Thursday, November 13. 2008Reviving my old Logitech TrackMan Marble FXI am probably different than most users, but I am a a fan of unusual input devices. I prefer Laptops with trackpoints - I immediately disabled the touchpads on my Lenovo laptops (a T61 and T42) in the BIOS when I received them. My first Laptop (a Toshiba Portege 3440CT) didn't even have a touchpad to begin with. It's a pity that trackpoints seem to a dying breed. And I don't like using regular mice on my desktop, either! Actually, my most favourite input device is a trackball - I purchased a Logitech TrackMan Marble FX a long time ago, and used it for years. Then computers stopped having serial or PS/2 connectors, and I replaced the trackball with an USB mouse. I never really got the hang of using mice, but Logitech (or other vendors) somehow never came up with a suitable replacement model for the Marble FX with a USB port. I recently looked at the Logitech Trackman Optical, but was not convinced by the reviews I read, and the fact that it requires batteries (a trackball is a stationary device, so a cable does not really interfere here!). The Microsoft Trackball Explorer might have been an option, but it seems to be impossible to get nowadays. After experimenting with several mouse models (Cherry, Microsoft), I decided to revive the TrackMan Marble again. It comes with a PS/2-connector by default, so I first tried to connect it to my PC using a PS/2-to-USB converter dongle. This actually worked without any tweaking, but had two limitations: the fourth mouse button was not detected anymore (I could have lived with that) and the Trackball stopped responding after it had been idle for a while, requiring me to restart the X server to get it working again. So using the PS/2-to-USB dongle was ruled out and I tried an Serial-to-USB dongle instead: lenz@thebe:~> lsusb|grep Serial When plugged in, udev creates a new serial device /dev/ttyUSB0 which I needed to inform the X server about. Fortunately it's possible to define multiple input devices in the xorg.conf configuration file. Using the serial port actually had another advantage - I was able to add some trackball-specific tweaks that would have collided with the settings of the "regular" PS/2 mouse section that I needed for the builtin trackpoint of my Thinkpad. It required some tweaking and testing, but this is what I added to xorg.conf to be able to use the TrackMan Marble FX in addition to the builtin pointing device: Section "ServerLayout" You may wonder about the 8 mouse buttons, as the device only has four physical buttons. Interestingly, the fourth button on the TrackMan reported itself as "button 8" when I probed it with "xev", so I needed to make sure the server is aware of it. When pressed, the trackball now acts like a mouse wheel and allows me to quickly scroll across long documents - very handy! Now I just hope that the button switches in the TrackMan last for another while - until some vendor eventually comes up with a suitable replacement... Friday, July 4. 2008Some new MySQL nuggets from blogs.sun.com and elsewhereThankfully my RSS reader has builtin-search capability, so I can quickly skim the full RSS feed from blogs.sun.com for keywords of interest. I found the following articles quite helpful:
If you are would like to learn more on how to develop on NetBeans with using a MySQL Server and how to create web apps that use MySQL as a backend, take a look at these two tutorials: Over on the Novell Cool Solutions pages (which are powered by Drupal, by the way), I found this introduction on how to set up MySQL replication by Damian Myerscough. It walks you through the steps involved in setting up a classical master-slave replication setup.
Monday, April 28. 2008Running Drupal 6 on MySQL 6 using the Falcon Storage Engine
I will make a few assumptions here, in order to keep the instructions simple: a fresh OS install, no other MySQL databases or web services are running or have already been installed. Both MySQL and the web server are installed on the same host. You should be able to become root to install packages and to have access to the local file system and the system configuration. This article will explain how to install and configure Apache/PHP, MySQL 6.0 and Drupal 6.2. Continue reading "Running Drupal 6 on MySQL 6 using the Falcon Storage Engine"
Posted by Lenz Grimmer
in Linux, MySQL, OSS
at
17:22
| Comments (2)
| Trackbacks (0)
Defined tags for this entry: article, cms, community, configuration, drupal, engine, falcon, hint, installation, linux, mysql, oss, virtualization
Monday, March 10. 2008Embedding a MySQL Server in C/C++ or Java applicationsLast week at CeBit I once again had a conversation with an application developer that was not aware that it's possible to embed the MySQL Server inside an application instead of running it as a separate process. I experienced something similar at FOSDEM recently, while talking with the Amarok developers - how come that this feature is so little known? In fact, there are two possibilities for embedding MySQL (and both of them are licensed under the GPL): the first one is using the libmysqld embedded library, which is suitable if you are developing C/C++ applications:
Especially consider the last sentence - it's actually fairly easy to create an application that supports connecting to both an embedded or a standalone server instance! Here are some related links to get you going:
If you're a Java developer, you should consider taking a look at our Connector/MXJ product - this allows you to embed a MySQL server in your Java application:
Some related links to further information/help:
Does your application make use of an embedded MySQL Server already? Please let me know! I'd love to learn more about the use cases and experiences you have made.
Wednesday, February 6. 2008Linux tip: Automatically rotate/archive your fetchmail/procmail log filesWhen it comes to handling my work-related email, many people will probably conclude that I am an old fart in Linux terms: I still use the console-based Pine as my MUA of choice, as my fingers have been hardcoded to its key combinations over the years (my first encounter with Pine was around 1994 on a shared DEC Ultrix box in my university). So far, I have not found any other application that allows me to process email as quickly as by using this tool. I admit that I do use Thunderbird for my personal email, though, to gather experience with it (and to toy around with the various extensions, especially Nostalgy is a gift from heaven for people like me!). And of course because the mail volume there is less critical to cope with! But I am not going to start a holy war here - this article is supposed to explain how I have configured my mail setup to rotate the log files that keep track of all my incoming mails. Continue reading "Linux tip: Automatically rotate/archive your fetchmail/procmail log files" Tuesday, January 29. 2008Mini-tutorial about using the spatial extensions in MySQL 5.0While helping a user with some questions about the geospatial extensions of MySQL on the #mysql-dev IRC channel on Freenode, I stumbled over this blog: How to use MySQL Spatial Extensions. There currently is just one post, but it was exactly what we were looking for: "Using Circular Area Selection". Nice work! I hope the author will soon provide more examples of how to make use of this functionality. By the way, there is work in progress to improve the GIS functionality in MySQL - if you are looking for new GIS functions that do not use MBRs, take a look at our GIS feature preview on the MySQL Forge. We plan to publish a new set of preview binaries once the 5.1.23 release has been published and merged into this code base.
Saturday, January 19. 2008A hidden gem in the MySQL distribution: replaceSince the very early days, the MySQL distribution packages contain a very useful commandline-tool named replace. As the name implies, it can be used to replace strings in text files. From the documentation: The replace utility program changes strings in place in files or on the standard input. Invoke replace in one of the following ways: This comes in very handy, especially if you need to replace a similar text in a large number of files, or if you need to replace multiple different strings in a file at the same time! So next time you need to replace strings in text files, take a look at this hidden gem! Special characters in from string:
Monday, January 8. 2007How to compile MySQL with the Falcon Storage Engine from the BitKeeper source tree
Now that the source tree for the new Falcon Storage Engine is finally public, here's a quick HOWTO on how to compile the server from source. This procedure is described in more detail in the MySQL Manual. I assume you use Linux and have the required development toolchain installed.
You first should get the free BK client from http://www.bitmover.com/bk-client2.0.shar, unpack and install it: $ wget http://www.bitmover.com/bk-client2.0.shar --17:34:34-- http://www.bitmover.com/bk-client2.0.shar => `bk-client2.0.shar'Now that the BK client is installed, we can create a local clone of the Falcon development tree: $ bkf clone bk://mysql.bkbits.net/mysql-5.2-falcon mysql-5.2-falconThis will now perform a check out the most recent source tree from the mysql-5.2-falcon repository (~83 MB of source code). You can now enter the newly created directory and start the build: $ cd mysql-5.2-falconIf you have a x86_64 Linux system, use compile-amd64-debug-falcon instead. Depending on the performance of your system, this step will take a while, as it performs a full compile of the MySQL server and all related tools. Once the build completed with no errors, you can create a binary tarball distribution: ./scripts/make_binary_distributionThis should leave you with a tarball mysql-5.2.0-falcon-alpha-linux-i686.tar.gz that you can now install to, say, /usr/local: $ tar zxvf mysql-5.2.0-falcon-alpha-linux-i686.tar.gz -C /usr/localThe last command will install the privilege tables and start up the mysql server. You can now fire up the mysql client: $ ./bin/mysqlNow make sure that falcon has indeed been included: mysql> SHOW VARIABLES LIKE 'have_falcon';Looks good! Now it's time to actually create a table that uses the Falcon engine: mysql> use test;Congratulations, you are ready to further test and explore this new storage engine! Have fun with testing it - we would appreciate your feedback and experiences! Please share your impressions via the Falcon Forum or report bugs via our Bug Database. Make sure to read the bug reporting guidelines on the MySQL Forge Wiki first! UPDATE: The people at Bitkeeper updated the free BK client to version 2.0 after I wrote this. I updated the described procedure above accordingly. Currently, the repository seems to have a locking problem that only appears when using the free BK client. We are working with the BitKeeper team on resolving this issue. Thursday, November 30. 2006How to recover accidentally deleted MySQL database files
Recently I stumbled over a posting on the German MySQL Forum from a user that accidentally removed all table files from a MySQL Server's data directory with a misbehaving shell script. He was surprised to find out that the server happily continued to serve requests and his web site was still fully operational, even though /var/lib/mysql/<database> was completely emtpy! The reason for this in a nutshell: the rm command only removed the reference to the table files from the database directory, the files itself were not removed from the file system yet as the mysqld process still had the files opened. So as long as a process keeps a file open, the kernel will not release the disk space occupied by the file and it will remain intact, albeit no longer visible.
Of course, the user was now desperate to recover the deleted tables files and was asking for help. Fortunately the recovery in this case is pretty simple. You should first shut down your application to avoid further activitiy on the affected database. Important: you must not shut down the MySQL Server, as this would close the last open reference to the table files! Now you can simply use mysqldump --opt <database> > database.sql to perform an SQL dump of the deleted tables. As the MySQL server still can access the open table files, the dump will contain the entire content and can then be used to restore the database again. Now you should restart the MySQL server so it closes the still open file descriptors of the deleted tables files. Alternatively, you could use DROP TABLE <table> or DROP DATABASE <database> to properly remove the references, in case you don't want to shut down the entire server. Now you can restore your missing tables from the SQL dump as usual and can restart your application! Note that this trick only works on table files that were removed on the file system level, not after you used DROP TABLE/DATABASE, so it's not a magic undo function for these commands - only restoring from a recent backup (e.g. performed with mylvmbackup, hint, hint) will help in this case. In addition to that the MySQL server must have had opened the tables before. A freshly started MySQL server has not opened any table files apart from the ones in the mysql system database. By the way, there is a related article "Bring back deleted files with lsof" on Linux.com that covers the subject of recovering deleted (but still open) files on a more general level and also provides some more background information about the Linux internals. Worth a read! Monday, November 20. 2006Hot-swapping the CD-ROM drive in my Thinkpad T42 UltraBay with SUSE Linux 10.1
While browsing the fabolous ThinkWiki pages I stumbled over this little gem: the lt_hotswap kernel module finally allows me to eject the CD-ROM drive in my Thinkpad T42's UltraBay without having to shut down Linux first. This module makes sure that the device is properly unregistered from the kernel's device list. Now I can replace it with e.g. a second battery on the fly and don't have to shutdown the OS completely! The installation on my SUSE Linux 10.1 system was quite easy: after downloading the source tarball from the SourceForge.net download page I performed the following commands:
tar zxvf lt_hotswap-0.3.6.tar.gz You need to have the kernel-source package installed, as well as the gcc compiler, of course. Now when I eject the little lever that allows me to pull out the CD-ROM drive from the UltraBay, the following message appears in /var/log/messages: lt_hotswap: Requesting IDE eject! Now the CD-ROM drive can be safely pulled from the UltraBay and e.g. exchanged with an additional battery. Inserting the battery yields the following kernel message: kernel: ACPI: Battery Slot [BAT1] (battery present) The battery info also appears in /proc/acpi/battery and is fully operational. Unfortunately battery monitoring tools like KPowersave or gkrellm don't display the second battery, but at least the kernel is happily using it. I can remove the battery again, but this event does not seem to get registered properly - the second battery remains visible in /proc/acpi/battery, but shows zero capacity and the "present" state does not change. But at least replacing the CD-ROM drive with the battery now workes fine, which was my major concern. And it is still possible to re-insert the CD-ROM drive again: kernel: ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:pio, hdd:pio If you want to enable the lt_hotswap module at bootup, you need to add its name to the MODULES_LOADED_ON_BOOT variable in the /etc/sysconfig/kernel configuration file. If your Laptop uses an external docking station to host a CD-ROM drive, there are some good news for you: according to Andreas Jaeger's blog, the upcoming openSUSE 10.2 will actually provide a generic Dockutils framework that will support docking/undocking functionality for different laptops and vendors. It will be interesting to find out if this covers UltraBay devices as well. Wednesday, March 22. 2006Using a DVB-T USB stick on SUSE Linux 10.0
A few days ago I received a neat little gadget: a Yakumo QuickStick DVB-T, which allows me to watch TV via the USB-2 port on my Thinkpad. Amazon sold it for 52 EUR, so I could not resist, after making sure that it was listed in the list of supported devices on the very informative LinuxTV Wiki pages. All what was left to be done for me was to download the firmware and putting it into /lib/firmware. The driver and firmware were loaded automatically when I plugged in the device:
Mar 20 19:44:05 metis kernel: usb 1-4: new high speed USB device using ehci_hcd and address 8 Mar 20 19:44:05 metis kernel: dvb-usb: found a 'WideView WT-220U PenType Receiver (and clones)' in cold state, will try to load a firmware Mar 20 19:44:05 metis kernel: dvb-usb: downloading firmware from file 'dvb-usb-wt220u-01.fw' to the 'Cypress FX2' Mar 20 19:44:05 metis kernel: dvb-usb: WideView WT-220U PenType Receiver (and clones) successfully initialized and connected. Mar 20 19:44:07 metis kernel: usb 1-4: USB disconnect, address 8 Mar 20 19:44:07 metis kernel: dvb-usb: generic DVB-USB module successfully deinitialized and disconnected. Mar 20 19:44:08 metis kernel: usb 1-4: new high speed USB device using ehci_hcd and address 9 Mar 20 19:44:08 metis kernel: dvb-usb: found a 'WideView WT-220U PenType Receiver (and clones)' in warm state. Mar 20 19:44:08 metis kernel: dvb-usb: will use the device's hardware PID filter (table count: 15). Mar 20 19:44:08 metis kernel: DVB: registering new adapter (WideView WT-220U PenType Receiver (and clones)). Mar 20 19:44:08 metis kernel: DVB: registering frontend 0 (WideView USB DVB-T)... Mar 20 19:44:08 metis kernel: dvb-usb: schedule remote query interval to 300 msecs. Mar 20 19:44:08 metis kernel: dvb-usb: WideView WT-220U PenType Receiver (and clones) successfully initialized and connected.Now I fired up the KDE video player Kaffeine 0.7.1 and configured it to scan for available channels. That's all there was to it! I am positively surprised. Friday, March 10. 2006OpenOffice.org presentation hint: one bullet at a time
I have been struggling with that for ages: how can I configure my slides to not display all bullet points at once when I switch to the next slide, but rather display one at a time?
I prefer not not distract my audience by having them read through the entire slide in advance instead of listening to me still elaborating on the previous bullet points. Some Google research finally pointed me to this article, which also mentions how to accomplish this:
(Page 1 of 1, totaling 14 entries)
|
QuicksearchCalendar
Show tagged entriesCreative Commons |