Archive for the 'Linux' Category
A long long time ago, I virtualized all my home infrastructure onto an ESXi 4.0 server. It has run perfectly fine, minus one hard drive failure, for quite a few years. Lately, though, I had been wanting to upgrade it because it’s not terribly fast and I have run out of resources to be able to add new VMs. It was running on a dual cpu machine (single core) with 160Gb HDD and 4Gb of ram, and I was just using it all up. No more ram for new stuff.
I decided that I would upgrade the matching spare server I had and try out KVM because I had used it a bit for RedHat training and it worked so well. Of course, Fessenden’s law, as opposed to Murphy’s law, stated simply that “Something will go wrong.” And it did. Over and over again.
First off, let me say that on an enterprise class server system, if it says it needs registered ECC ram, it is NOT kidding. I must have swapped ram around in that server 50 times before I noticed 2 sticks of non-registered ram in there. Once I got over that, I had 8Gb of ram and a new 250Gb HDD and I was ready to rock! Or so I thought.
I decided to use CentOS 6 as my virtualization host OS and that went right on but I soon discovered that my CPU doesn’t support virtualization. Ugh. So I decided that I would switch gears and go with virtualbox instead so that I could continue using my current hardware. I have often used virtualbox on other machines and it is a fantastic platform. I set about getting things running.
When I installed the base OS, I did a minimal install. No GUI, etc.. There is no sense in putting stuff on there you don’t need on a server right? Well, the very first thing I found was that I could not use the virtualbox gui controls because I did not have any X installed. To rectify that:
yum -y install xorg-x11-xauth dejavu-lgc-sans-fonts
You need the auth to be able to forward your X session, and need the fonts to be able to actually see words on your app.
Next I copied all my vmdk files to the new server. This takes a LONG time for old servers to move around 100Gb. Once there, however, I discovered that virtualbox cannot read native vmdk files. Ugh again.
yum -y install qemu-kvm
And then I could convert the vmdks to raw images, and then again to native vdi files for virtualbox.
qemu-img convert machine-flat.vmdk machine.bin
vboxmanage convertfromraw --format VDI machine.bin machine.vdi
I put all my machines together and noticed that virtualbox was complaining about uuid on some of the disk images. To fix that:
vboxmanage internalcommands sethduuid machine.vdi
The first machine I started up was a CentOS 6 machine and that fired right up, however, udev immediately reassigned my ethernet device to eth1. In order to get thatr back where it was supposed to be I had to go into /etc/udev/rules.d/70-persistent-net.rules and delete the ethernet rules in there and reboot.
Along about this time my server powered off. No idea why. It powered itself back on again about 30 seconds later. I checked everything on the server and it looked fine. Curious, but I kept on going.
Next I tried to start up my remaining Centos 5 VMs. These were problematic. The very first thing I noticed here was that they were barking because I never uninstalled the vmware drivers. I fired them back up on the original server and ran the vmware-uninstall.pl program. I turned them back off and spent hours re copying the over, and then reformatting the vmdk files into vdi.
Starting them back up, I found that, again, they would not run. This time I received the error that it could not locate any LVM partitions. This, it turns out, is because the initrc files did not have the appropriate drivers in them. Fixing this was fun. First off, you need to add a cdrom drive to the vm and put a CentOS rescue cd/dvd there. Boot it up in rescue mode, chroot to the /mnt/sysimage and then fix the /etc/modprobe.conf file:
alias scsi_hostadapter mptbase
#alias scsi_hostadapter1 mptspi
#alias scsi_hostadapter2 ata_piix
alias scsi_hostadapter1 mptscsih
alias scsi_hostadapter2 mptscsih
The entries with the #s are the ones I had to change. Then I needed to rebuild all of the initrd images.
for file in $(ls init* | cut -d'-' -f2,3 | cut -d'.' -f1-6); do mkinitrd -v -f /boot/initrd-$file.img $file; done
After that, the machines came right up! Of course, the host powered right off. Several times over the next day. Grrr.
I figured that there was a hardware issue with the host somewhere and resolved to buy myself a new server. I picked an open box refurb from microcenter that had 8Gb ram, a 750Gb HDD and a nice quad core cpu that supported virtualization. Wohoo! I can now switch to KVM!
I set up the new machine and installed KVM and started copying vmdk files over again and, bingo, kernel panic. I rebooted and the machine would not even get past bios. This went on for a couple days until I took the machine back to microcenter. I picked up a different machine, better quad core with 12Gb of ram and 1Tb HDD and set about getting it running.
This time, success! I set up CentOS 6 and KVM, added the bridged networking and copied over the vmdk files. KVM will read vmdk files but I decided to convert to a more native format, qcow2, the preferred format for qemu, anyhow. that is fairly simple to do.
qemu-img convert -O qcow2 machine-flat.vmdk machine.qcow2
I put all the machines back together again and started them back up. I still had to do the initrd fixes on the CentOS 5 VMs to get them going, but after that all has been running fantastically!
Somewhere along the line here I figured out that my issue with my secondary server powering off was a bad port on my UPS.
KVM is really easy to run and manage for a Linux geek as opposed to VMware 4. The native gui tools do the job just fine, although they are not quite as intuitive to me as VMWare’s VIC. I am quite happy, though, with the switch. I now have more than twice the resources of my initial virtualization environment. Now I am good to go for several more test VMs and the new machine is nice and quiet and doesn’t have to hide under my couch
Sometimes I get lucky and something cool happens to fall in my lap. This happened last week when I ran across a G5 tower dual 1Ghz /8Gb ram that was getting tossed. I decided ti rescue it as I hate to see useful hardware go to waste. As the version of OS X that runs on such beasts is getting long in the tooth AND I happen to be a Linux enthusiast, I decided quickly that this would be a great box to look at the recent offerings of PPC Linux. Here are my thoughts:
This happened completely by accident, but Debian was the first distro I tried. You see, the Mint PPC installer will install Debian PPC by default if you don’t specify to install Mint, which I completely forgot to do on my first try. Debian is, well, Debian. I wish I had the foresight to actually get a screenshot, but the installed version on PPC is what I expect it looks like anywhere else as well. Debian is fantastically consistent about that. That being said, Debian and I differ in opinion on what software I generally want to have available under Linux. The Debian folks are very staunch on the “free software only” thing and *I* am one of the guys who thinks I should have the “freedom” to actually enjoy proprietary and non-free software if I want to. As I really wasn’t looking to do a Debian install anyhow, I played for a few minutes and then moved along.
Mint PPC 11:
Now *this* is what I really wanted to try. As a long time admirer and user of Linux Mint, I was thrilled to try it out on the PPC too. Unfortunately I was slightly disappointed. You see, Mint PPC is not an “official” port, per se, so it’s not quite the same. First thing I noticed is it is obviously built straight off Debian, and uses their software “choices”, which I have previously described. Secondly, the default desktop is an LXDE with nautilus. Ok, but a little clunky feeling to me. It wasn’t long before I was wanting to check out what else was out there, and so I did.
Years ago, when Dann and I first started the Lehigh Valley Linux User Group, YellowDog Linux was quite a contender. Shortly thereafter, they made their presence really big in Japan and I sort of didn’t hear much from them anymore. Well, it appears they are still going strong and offering what turns out to be a really nice and robust PPC Linux distribution. Honestly, in retrospect, this is the one I would settle on as my second choice. There is plenty of support and plenty of packages available and it runs rock solid stable. If you are at all familiar with RedHat, CentOS or Scientific Linux this would be an no-brainer for you to use. The *only* thing I didn’t really like about it was the default DE was Enlightenment. It worked fine and was completely functional, just not to my tastes. I am sure I could change it to suit my needs better, but there were more PPC Distros to try!
Fedora 16 PPC:
Now THIS one I was SURE would be the one for me as soon as I got it running. The install went really smooth, especially for a Fedora install, which has a really bad historical habit of being broken in one way or another. Once I had the desktop up I was greeted by a standard Gnome3 DE, which is completely familiar to work with for me, even though it was minus the desktop icon support available in Mint. No matter, I was excited to use it and it was FAST and really responsive. Unfortunately, as is the habit of my ventures into Fedora land, it was hopelessly broken, and there is not a lot of package support. Here are a few for-instances: EPEL repo will not install. Flite makes the core dump. Worst was nautilus refuses to prompt for user/password on any shares (ssh, smb, webdav, etc.). It just says you must enter the password and then doesn’t afford you any way to do so. Nice try guys.
Ubuntu 11.10 PPC:
Saving the best for last, I *finally* hit on one that’s a keeper, otherwise I was going straight back to YDL. Ubuntu, as it turns out, ends up being a very polished product for PPC. Sure there are some issues, such as Unity completely rots on this machine, but they are easily overcome and then you have a nice solid worker with good package support. In my case, like I mentioned, I had an issue with Unity. It seems that the Unity 3D doesn’t like this mac. I am not sure why as Gnome-Shell works great with the 3D stuff. Unity 2D was fine, but not only do I prefer Gnome-shell over Unity, but I was working on a 4×3 screen, which nobody should ever use Unity with. Once I switched to Gnome-shell, I was set. I installed my standard set of packages I use. All of them installed without crabbing about anything and everything worked, even user/pass in nautilus
If you have an old PPC machine you want to keep in service or press into service, Linux PPC is surely the way to go. You just cannot go wrong with either YellowDog or Ubuntu on these machines. No sense in wasting or chucking good computer equipment right! Stuff Linux on there and make it useful once again!
I know, I know. I have been really busy lately and have not posted anything. You wouldn’t even believe how much so.
Last night, right before I passed out from another long week I was reading my email (in mutt, the best email client btw) and I decided I was going to take a little nap. Well, as a hold over from the old days when you had to worry about screen burn-in, I wanted to start a screensaver, but something different.
As a cli addict, in the old days I remember using a couple terminal savers, worms and rain. I decided to start up worms for nostalgia sake. Well, it wasn’t installed. AHH THE HORROR! As it turns out, most distributions do not automatically include these anymore and they are normally in a package called “bsdgames”. Once that was installed I was ready to go. Simply running a maximized terminal session with worms -d 60 (a switch to delay the worms a bit), was enough to make things right once more.
I bet that many new Linux/unix users have missed out on the wonders of such simple things and decided that today I would make a little post to try and encourage you to try them out. Please do so! (and remember rain too.)
The bsdgames have a lot of those kinds of little gems and you just cannot go wrong playing around with them. There are greats in there like hack and tetris and snake and on and on. You might be surprised how entertained you can be while enjoying some of the old-school stuff that gives you some great unix creds
Probably you have either listened to me or read my thoughts or both for several years now, but it occurred to me today that someone out there might be interested in seeing what actually drives the LincGeek.
I currently live in Pennsylvania, but I was born and raised in Upstate NY, with a brief stint in Washington state. New Yorkers and hillbillies are my people and I understand them. Washington is some of the most beautiful country I ever spent time in and I hope to at least visit out there again someday.
Well, first and foremost, computers and Linux are my personal crack. I started on a life long obsession with computers back in 1983 with my first Vic=20 (Thank you William Shatner). I learned to program in BASIC and from there it was all over until I met Linux in the 90s, then that added into the mix.
I like the fastest computers I can get my hands on. I like Apple computers (more for their quality and aesthetics than OS – they do tend to run Linux very well). I love my Kindle, my Android phone and my iPad (2), which is the tablet device that all others are invariably compared to and for good reason. Linux Mint is probably the nicest version of Linux I have ever run and I use that almost exclusively as my desktop OS of choice. I am RedHat certified and use RHEL and CentOS for the vast majority of my enterprise and personal server needs, because, IMHO, it’s better than the rest.
I am a music lover. I dig 50s, 60s, 70s, 80s, Big Band, Jazz, Funk, Disco, Bluegrass and Classical music. I was a hardcore low brass musician and vocalist in my school years, even making it into “Who’s Who In Music” in my senior year in high school, and those are some of my most cherished and fondest memories. Rap is *NOT* music, by the way.
I have been married once, to my college sweetheart, for almost 19 years now and have an adult (she thinks so at least) daughter, currently in college. I am a Conservative Libertarian, politically, and a proud Christian.
Although I am now diabetic and stick mostly to various forms of Chicken and veggies now, I LOVE good food. my favorites are good Irish cooking like my Grandma used to make. Corned Beef and Cabbage. And she made a monster macaroni and cheese too. I would literally hurt someone for some of that again. I strongly believe that vegetables are what food eats.
I like my coffee with (nonfat) milk and sweet-n-low. Buy it from Wawa because Starbucks coffee is overpriced and bitter yuppie coffie IMHO. I like an occasional good cigar (Acid Blondie) and enjoy them most when I can smoke them and hang out with my friends.
I am not a drinker. If and when I do imbibe, I do so with Scotch or Whiskey as I believe beer must be what urine tastes like.
As you can probably surmise, I am highly opinionated, and as I have a monster sized guilty conscience and I am not at all politically correct, so if you ask my opinion, you are liable to actually get it.
I still think the occasional fart joke is funny. I hate unproductive meetings and long phone conversations. I try very hard to be honest, forthright, fair and maintain integrity.
I am a pet guy and love small furry mammals of all kinds. I have and have had cats, dogs, rabbits, mice, rats, ferrets and even a smattering of budgies and small lizards.
And now you know all about me!
You would think that my lack of posts here lately meant I had simply dropped of the face of the earth, but that isn’t really so. I have just been extremely busy with the day to day problems facing me in RL, including how to squeeze >that< much more work into my overly busy day.
This particular recent purchase, the GeChic On-Lap 1301 13.3” Portable and USB powered Thin, Light, and Plug & Play LCD Monitor, has helped me do just that.
One of the things all high-end computer workers need to enable them to multitask better is more screen space. This has been researched and documented in a variety of different places. Well, what are you to do with your mobile workstation? You can buy one of those external USB screens, that’s what. Almost a no-brainer, right? The problem with that for a Linux user is the drivers. Most of these types of screens push video through USB, which means you have to have a working usb to video driver, not to mention video over usb is a little slow. Enter the GeChic!
The GeChic solves these problems by NOT usung usb for video, it actually has both a vga and a dvi input along with being usb powered. That’s right, no extra power cord, just plug in the usb cable and pick your input method and you are rockin’ and rollin’. This means it will work with literally ANY laptop or desktop which supports those types of video output, regardless of operating system or driver issues.
The unit itself is a little pricey at $200, however, it makes up for it’s few downsides by giving me my much needed screen space, in an attractive, easy and mobile form. I did say few downsides, and there are a couple other than the price. The first is the color. It just doesn’t want to color match my laptop’s LCD no matter how I seem to adjust it. The second is that using vga input the picture quality lacks a little. To be fair, dvi input is far superior to vga anyhow, and the vga problems could just as easily stem from my machine than from the monitor and I didn’t spend a whole lot of time messing with the settings on vga before just trying out dvi. Ymmv.
What I do like is that this is an attractive little lcd screen with a nice resolution of 1366×768. You can use it while physically attached to your laptop or it can sit standalone next to it in several positions with its included stand. To connect it to your laptop it has surprisingly strong suction cups that attach it’s swing-base to the top of your laptop and it can simply fold up or swing out for use. This allows you to also do neat things like show a presentation on the back of your laptop while you watch the front, etc..
No matter how you slice it, this little thing is mighty handy to have around and everyone who has seen it in action immediately wants one of their own. Boy, I wonder if I could get a kickback from NewEgg on this? Even at that price, I think we have a winner.
Found out a couple days ago that there is a problem with the PPA for handbrake with MINT 12 and Ubuntu 11.10 (and probably others as well). There is an easy workaround for it though. That is to use the snapshots ppa instead:
apt-get install handbrake-gtk handbrake-cli
I really love text based email clients. They do a wonderful job of keeping distractions out of your way and letting you focus on what’s important – the message! I find that by using a text email client, I save myself probably 30 minutes or more each day (yes, I get a LOT of emails).
For years I advocated and used pine and alpine for my email. I really liked it and still do, however, it just doesn’t perform great with IMAP it seems, and especially multiple IMAP accounts, and that is what the email of today is like. I switched to a more efficient thunderbird email client for a long while, but then thunderbird started addding “features” like local indexing and such. Kind of a turn off.
Recently, I thought I would look around again and landed back on mutt. I had avoided mutt for many years because it used to require you run your own smtp server. That has always been pretty impractical for me. Now, however, I found that mutt does support using an external smtp server and handles IMAP email with ease. Well! It was time to give it a try and boy, I am glad I did. It’s fantastic! It’s very lightweight, fast, powerful and has that manly text based interface that makes you feel like a power user and makes you look like a unix genius.
The key to a good mutt setup is in the config file, and therein lies all the power as well. Here is a peek into my ~/.muttrc file to give you an idea on how to get things going:
set mark_old=no # does not mark your messages as old
set imap_user = “yourusername”
set imap_pass = “yourpassword”
set realname=”your realname”
set from=”your from address”
set editor=vim #greatest editor around
unset markers # get rid of those pesky plusses
set ssl_starttls = no # dont use these on my internal srvr
set ssl_force_tls = no # same as above
Those are pretty self explanatory and I find that is a minimum config for me to work with. Now you might (if you are smart and use vim) want to enable a spellchecker in vim as well. That just takes these lines in your ~/.vimrc file:
Once that is in there and you make a spelling error on an email it will be highlighted. Just cursor over the word and press z= for a spelling suggestion.
As for a few tips on actually using mutt, here are some that will get you started:
Cursor up/down and press enter or space to read a mail.
Once in the email space to page/scroll down and – to get back up.
Press v to view attachment list and enter on the one you want to open.
Press m to write a new email.
Press c then tab to change folders and press space to open that email folder.
Press s then ? to save an email to a different folder and select the folder with space.
Press d to delete an email, r to reply to the sender, g to reply to all.
Press a to take an address and save it into your address book. This will make an alias of sorts so that when you create a new mail to an alias of “person” it translates to email@example.com automatically.
Press D (yes capital) to search for and delete all mail with a subject that matches your expression.
Press D then ~b and expression to do the same within the message bodies.
Press l then expression to filter/search emails.
Press l then ~b and expression to do the same within the message bodies.
Eventually you will want to sync your email and get rid of all the deleted stuff – press $ and enter to do that.
Probably the most helpful is to remember to press ? to get help!
I hops that helps getting you all started with using this great client! Enjoy!
My Silicondust HDHomerun Prime finally arrived this past Wednesday. Silicondust had some delays getting this product out the door and having a hurricane blowing up the east coast the same weekend as my shipment moved was not conductive to a quick delivery. The original HDHomerun was a dual unencrypted QAM/over the air digital tv tuner that had two co-axial inputs. It was a very solid device that ran for years on my MythTV system without any issues. The new Silicondust HDHomerun Prime is a cablecard compatible triple digital tuner. It has only one co-axial connection but you can record up to three digital channels at once! The big caveat is that you’ll be able to record encrypted cable channels that have their DRM flag set as “copy-freely”. What’s flagged as copy-freely will vary depending on your cable company. Most cable companies will leave everything as copy-freely with the exception of “premium” movie channels like HBO, Showtime, Cinemax, Starz, etc.. On the extreme negative end is Time Warner (in NYC &other markets) which encrypts all the channels and flags them as “copy-once” or “copy-never” regardless if the channel is “premium” or not. Your best bet is to do a little research to see where on this scale your cable provider lies and make an informed decision. I had a cablecard from RCN sitting on my desk for the last couple of weeks in anticipation of the Prime’s arrival. The cablecard setup process is threefold:
Activation, Pairing, Provisioning
Activation turns on the card. Pairing puts the cablecard as a registered device on the cable provider’s system. Provisioning is where the card is given access to all the content tiers you should be receiving. I’ve heard of lots of horror stories where the cablecard gets stuck in an unusable state somewhere along the setup. When I picked up the card up from RCN they gave me a piece of paper with the card describing the activation process. First call one number which will send a hard reset to all your cable boxes & cablecards. I had my Prime connected and ready to go and called the number. I saw my cable boxes getting reset. The HDHomerun Prime has an embedded webserver which you can access from any web browser. The pages show various status message such as activation, pairing and whether or not any of the tuners are tuned to channels along with signal strength. On one page I saw a message saying to call RCN’s activation number along with information for the card such as Mac address, serial number, device ID, etc.. I called the number and spoke to a service rep. I indicated I had a cablecard activation and mentioned I was using a network attached tv tuner device. I read off three sets of numbers to the rep and she read them back to me. She then put me on hold for about five minutes. After she returned she asked whether or not I could see any channels. The old hdhomerun_config_gui application somewhat works with the Prime. When you start the application you can see the three tuners but you can’t scan and tune them from inside the application. Open up a terminal window and tell the prime to tune to a certain channel:
hdhomerun_config 13104608 set /tuner0/vchannel 446
13104608 is the tuner ID and 446 is the channel I’m tuning to.
In the gui you will see a dropdown for the channels on the frequency you just tuned into. Pick one of the channels and hit the view button. VLC should now fire up and display the channel if it’s marked as copy freely. Update: I hear that if you download & compile the latest version of the hdhomerun_config directly from Silicondust it should work without having to do this. The version in the ubuntu repos is older.
I then proceeded to successfully tune in a bunch of different channels. As expected none of the movie channels would tune in. The customer rep then asked me to reboot my tuner to make sure the provisioning remained. I restarted the HDHomerun Prime. One minor issue I encountered is that the Prime has to run with dynamic IP assignment. So I had to turn my router’s dhcpd server. As far as I can tell the prime cannot be setup with static IP. After rebooting the Prime all my channels were still there. So after a 15 minute telephone call with RCN my Prime was working as it should. I then went about setting up the Prime as a capture device in MythTV. If you’re running MythTV 0.24.1 or greater the Prime works out of the box. The setup is pretty straightforward:
HDHomerun Prime Setup in MythTV
The setup in MythTV took about another 15 minutes with the majority of that time waiting for mythfilldatabase to complete the population of the channel listings for the new tuners.
Once the setup was completed I went for the gusto and scheduled 4 simultaneous HD recordings (1 on PVR-1212, 3 on the Prime). While all 4 recordings were going I then went to my family room and watched another HD recording on my Zotac based MythTV frontend. There were no noticeable hiccups, stutters, pixelization or audio out of sync issues. After the recordings finished I then watched all of them and they were perfect. The picture quality is pretty much identical to the cable box.
After a couple days of heavy use I’m very satisfied with the HDHomerun Prime. I’m now able to record a ton of HD content. While I wish Silicondust had released this product sooner you can’t fault them after encountering some manufacturing issues from their factory in China. The product itself is a solid successor to the original HDHomerun.
Sadly it seems Windows Media Center users are encountering a ton of issues with the Prime:
Silicon Dust forum
Whether those issues are DRM related or simply platform stability issues is of little concern to Linux users. They’re in dreamland if they expect patches from Microsoft in a timely manner to help alleviate their woes. They made their bed and they’ll have to sleep in it. Maybe some Windows MCE users will finally smarten up and become Linux/MythTV users? One can only hope they come to their senses.
First time this happened! A coworker asked me today how to get into his Linux Mint box after he forgot his password. Of course I rattled off the old GRUB way to get things done, but, what?? This is GRUB 2! No so fast there! Turns out it’s quite different.
You hold down the shift key while booting to get to the grub menu.
You hit ‘e’ to edit your boot options.
You change the kernel line options on the very end of the kernel line to read “rw init=/bin/bash”.
You press F10 to boot.
Once booted you are dropped immediately into a shell prompt where you can change your password with the “passwd username” command. Reboot and you’re home free!