created the following files:
loadavgchecker.sh
messages
- Mike
VMware Workstation 8 and VMware Player 4 only support kernels up to 3.0. Any later requires patching of the VMware modules.
Patch for VMware Workstation 8.0.1
Patch for VMware Workstation 8.0.2
$ cd /tmp
$ wget tarball_from_above
$ tar xvf vmware8*linux32fix.tar.gz
$ cd 3.2/
$ sudo ./patch-modules.sh
Make various modifications to partition table entries.
Each command is either a boolean option, in which case it must be followed with '+' or '-' (with no intervening space) to enable or disable that option, or else it takes a value in the form 'command=value'.
Currently, parttool is only useful on DOS partition tables (also known as Master Boot Record, or MBR). On these partition tables, the following commands are available:
When enabled, this hides the selected partition by setting the hidden bit in its partition type code; when disabled, unhides the selected partition by clearing this bit. This is useful only when booting DOS or Wwindows and multiple primary FAT partitions exist in one disk. See also DOS/Windows.
- 'boot' (boolean)
- When enabled, this makes the selected partition be the active (bootable) partition on its disk, clearing the active flag on all other partitions. This command is limited to primary partitions.
- 'type' (value)
- Change the type of an existing partition. The value must be a number in the range 0-0xFF (prefix with '0x' to enter it in hexadecimal).
- 'hidden' (boolean)
Plays a tune
If the argument is a file name (see File name syntax), play the tune recorded in it. The file format is first the tempo as an unsigned 32bit little-endian number, then pairs of unsigned 16bit little-endian numbers for pitch and duration pairs.
If the arguments are a series of numbers, play the inline tune.
The tempo is the base for all note durations. 60 gives a 1-second base, 120 gives a half-second base, etc. Pitches are Hz. Set pitch to 0 to produce a rest.
And one of my favorites:
Do nothing, successfully. This is mainly useful in control constructs such as
ifandwhile(see Shell-like scripting).
So it looks like the developers of GRUB have a bit of a sense of humor and a serious side.
- Mike
http://www.gnu.org/software/grub/
http://www.gnu.org/software/grub/manual/
chmod, install, and mkdir now preserve a directory's set-user-ID and set-group-ID bits unless you explicitly request otherwise. E.g., `chmod 755 DIR' and `chmod u=rwx,go=rx DIR' now preserve DIR's set-user-ID and set-group-ID bits instead of clearing them, and similarly for `mkdir -m 755 DIR' and `mkdir -m u=rwx,go=rx DIR'. To clear the bits, mention them explicitly in a symbolic mode, e.g., `mkdir -m u=rwx,go=rx,-s DIR'. To set them, mention them explicitly in either a symbolic or a numeric mode, e.g., `mkdir -m 2755 DIR', `mkdir -m u=rwx,go=rx,g+s' DIR. This change is for convenience on systems where these bits inherit from parents. Unfortunately other operating systems are not consistent here, and portable scripts cannot assume the bits are set, cleared, or preserved, even when the bits are explicitly mentioned. For example, OpenBSD 3.9 `mkdir -m 777 D' preserves D's setgid bit but `chmod 777 D' clears it. Conversely, Solaris 10 `mkdir -m 777 D', `mkdir -m g-s D', and `chmod 0777 D' all preserve D's setgid bit, and you must use something like `chmod g-s D' to clear it.
The RHEL6.1 beta was released today. At Guru Labs we have to stay on top of the latest changes so that our Linux training has full coverage. I read the release notes and the following items stood out to me.
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<Proxy *> AddDefaultCharset Off Order deny,allow Allow from all </Proxy> ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/
For about 10 years, I lived only about 3 miles from my office. Since moving into my new home, I have about a 35-40 minute commute. This has given me the opportunity to listen to audio that I didn't have before. I don't mind listening to music, and I enjoy it, but given the choice I'd rather listen to something educational and interesting.
Recently I discovered This American Life which I has been amazing. The episodes come out once a week, and I eagerly wait for the next one to be released.
They have a rather large archive of back shows since it has been airing since 1995. On their website you can listen to the MP3s of the archive, or you can purchase them on iTunes or Amazon.
They have a "short list" of recommended shows from their archive, and also "other favorites".
I figured out the light weight obfuscation used to conceal the URLs to the MP3s, and came up with the following to download the "short list" and the "other favorites":
SHORT LIST:
U=http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/
for i in 109 175 206 218 241 355 360 396
> do
> wget $U$i.mp3
> done
OTHER FAVORITES:
U=http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/
for i in 27 38 46 61 77 84 88 90 103 118 119 154 164 178 181 186 192 199 203 204 220 233 246 248 252 253 268 275 282 290 299 304 322 339 352 361 381 388 403 405 427
> do
> wget $U$i.mp3
> done
If you elect to use my technique, please Donate to This American Life.
I use grep a lot. Today I realized that others might not know that GNU grep can highlight matches, or how to combine it with less. So here's part of my Bash config, and some examples uses:
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
function legrep {
egrep --color=yes "$@" | less -R
}
$ legrep '[Gg]nome' */*.xml $ legrep -i foo /usr/share/dict/words $ grep bar | egrep -v 'baz|qux' | legrep bar
SUSE has long used YaST as a management tool. It makes it easy to make changes to your system without knowing (or caring) what happens behind the scenes.
At Guru Labs, our Linux Training is all about teaching students what happens "behind the scenes". We strive to document the official and best practice techniques (not always the same thing, unfortunately).
Recently we were updating our courseware and wanted to document how to disable IPv6 in the various Enterprise Linux distributions. The question came up, "What does YaST actually do when you toggle the Enable/Disable IPv6 checkbox in the YaST network module." To answer that question I performed the following steps on SLES11.
Search for the string IPv6 in the YaST network module.
grep -n IPv6 $(rpm -ql yast2-network)
In the output, found these lines looked interesting (Note the Disable/Enable strings)
/usr/share/YaST2/modules/Lan.ycp:316:global void SetIPv6(boolean status){
/usr/share/YaST2/modules/Lan.ycp:324:void writeIPv6(){
/usr/share/YaST2/modules/Lan.ycp:424: writeIPv6();
/usr/share/YaST2/modules/Lan.ycp:654: status_v6 = _("Support for IPv6 protocol is enabled");
/usr/share/YaST2/modules/Lan.ycp:656: link_v6 = Hyperlink (href_v6, _("Disable IPv6"));
/usr/share/YaST2/modules/Lan.ycp:662: status_v6 = _("Support for IPv6 protocol is disabled");
/usr/share/YaST2/modules/Lan.ycp:664: link_v6 = Hyperlink (href_v6, _("Enable IPv6"));
Based on my experience I guessed that the writeIPv6 function does the work of enabling and disabling IPv6 on the system.
So I took a look at that function using the line number found by grep:
vim /usr/share/YaST2/modules/Lan.ycp +324
I found the following:
void writeIPv6(){
SCR::Write(.target.string, "/etc/modprobe.d/ipv6", sformat("%1install ipv6 /bin/true", ipv6?"#":""));
SCR::Write(.sysconfig.windowmanager.KDE_USE_IPV6, ipv6?"yes":"no");
}
That pointed me at the two files "/etc/modprobe.d/ipv6" and "/etc/sysconfig/windowmanger".
Looking at the files it seems YaST simply removes/adds the comment character in front of the one-and-only line in the file /etc/modprobe.d/ipv6 and it toggles the variable KDE_USE_IPV6 in /etc/sysconfg/windowmanager.
If you ever have the need to discover what YaST is doing behind the scenes, you can use the same technique.
As far as blogging software goes, it's hard to go wrong with Movable Type. It is open source, supports PostgreSQL (unfortunately, due to be dropped in MT5.0, hopefully it will be re-added in 5.1), supports multiple users and blogs out of the box, can operate in static, partial-dynamic, and full dynamic mode.
If for some reason you or a user forgets their password you can reset the password via the following SQL commands
PostgreSQL
Make sure to install the postgresql-contrib package if you don't already have it installed.
Install the crypto functions into the Movable Type database, this is a one time task.
psql -d movabletype -f /usr/share/pgsql/contrib/pgcrypto.sql
Now connect to the movabletype database and run the following command to reset a password:
UPDATE mt_author SET author_password = crypt('the-new-password', gen_salt('des')) WHERE author_name = 'USERNAME-GOES-HERE';
MySQL
The MySQL database already has the crypto functions built-in, so reset the password with the following SQL statement:
UPDATE mt_author SET author_password = encrypt('the-new-password') WHERE author_name = 'USERNAME-GOES-HERE';
Tools available with Fedora and Red Hat Enterprise Linux for converting CDs to lossless FLAC archives include Sound Juicer, Rhythmbox, and the command line tool abcde. The first two are graphical applications in GNOME that use MusicBrainz for metadata; the latter provides numerous options for converting to FLAC, Vorbis, and MP3 (among other formats), using CDDB for metadata. I wanted something simpler, resulting in a minimal set of metadata (consistent with ID3), and following a stricter Unix model of each tool focused on one job, doing that job well.
The result, flaccda, is a POSIX compliant script for converting CDs to FLAC, a script for converting CDs to MP3, and a supporting script for removing MusicBrainz metadata from FLAC archives created by tools such as Sound Juicer.
The source may be downloaded from my website at http://oberon07.com/flaccda.
I noticed in the list of Common Fedora 12 Bugs that in order to run the current version of Adobe Acroread for Linux it must be launched with:
GDK_NATIVE_WINDOWS=1 acroread
Note that GDK is the underlying graphical toolkit for creating GUI applications using GTK (most commonly for applications used on the GNOME desktop). The Linux version of Adobe Acroread uses GTK/GDK.
I was curious about GDK_NATIVE_WINDOWS=1 and I found the following information:
From www.gtk.org I found
GDK has been rewritten to use 'client-side windows'. This means that GDK maintains its own window hierarchy and only uses X windows where it is necessary or explicitly requested. Some of the benefits of this change are
- Reduced flicker
- The ability to do transformed and animated rendering of widgets
- Easier embedding of GTK+ widgets, e.g. into Clutter scene graphs
Launching an app with GDK_NATIVE_WINDOWS=1 application turns off this feature. This is needed if the application manipulates the windows it creates using direct X API calls or a mixture of X API and GDK instead of just going through GDK. When using "client-side windows" all window manipulation by an application must go through GDK. Adobe needs to update Acroread to be compatible with this feature.
Here is a video demonstration from Alexander Larsson showing some of the effects made possible with 'client-side-windows'. You can also check out his blog post The return of client side windows:
The official documentation on ClientSideWindows is here.
My Lenovo Thinkpad T61p died today, but I'm still in a good mood. I've never had such a positive experience calling any company's support line before.
Finding the phone number for Lenovo was a bit of a hassle, but everything else was painless. I spent less than two minutes in the call queue before talking to a human being. Lenovo was careful to mention several times that they were transferring me to their Georgia call center. The cynical might suspect they meant the eastern European nation, but I'm inclined to believe it really was the state. The person I spoke with had an American accent and understood everything I said. He wasn't blindly following a script, but actually listened to what I said and responded appropriately. Within a minute he had decided to replace the entire mainboard. No hassle!
I've recommended Lenovo before because of the quality of the Thinkpad. Now I can add the amazing support. IBM's hand off to Lenovo scared me a little, but they seem to be doing an excellent job. Let's hope it stays that way.
I have a ThinkPad T61p Fedora 11 Linux laptop. Lately for some Linux training products we have been developing I've been doing alot of virtualization work on my laptop. Even though it has a fast dual core CPU, 8GB of RAM, and a fast internal 500GB SATA hard drive I've been seriously bottlenecked when I have a bunch of virtual machines doing lots of I/O. Some operations that normally take 20 minutes to complete have been taking 90 minutes. That is a serious productivity killer.
I need to add more hard drives and spread the I/O load across them. I would like to upgrade to a SSD drive, but I require 500GB capacity and although the just hit the market, it has several draw backs (besides the price) including using a MLC architecture. I briefly considered USB 2.0 hard drives but I knew that the USB 2.0 connection was a bottleneck
I decided to add an external eSATA hard drive using an ExpressCard eSATA controller.
Here are raw sequential I/O throughput the benchmark numbers on three drives. I tested the performance using hdparm -tT /dev/{sda,sdb,sdc}
Internal SATA SAMSUNG HM500LI 500GB
73.4 MB/sec
eSATA Western Digital WD10EVVS-63E 1TB "My DVR Expander"
85.1 MB/sec
USB 2.0 Lacie 120GB rugged
24.4 MB/sec
I used a Syba SD-PCBX-ESA2 ExpressCard SIL3132 Chipset 2x e-SATA II, 54mm. The great thing about Linux is that the controller was supported out of the box by Linux's sata_sil24 driver. I had nothing to install. I just plugged everything in and it all worked.
It would have been nice if my laptop had a built-in eSATA port. Hopefully my next Calpella platform based Thinkpad will have bottleneck free USB 3.0 ports and hopefully eSATA as well.
Aggregated Blogs:
Aaron Toponce
Almost Everything Linux
Bryan's Blog
Dax's Blog
D. E. Evans
goozbach's Techtips
Mike
Stephen Weeks
Stuart's Blog
Tim - the *other* archlinux user