The thoughts, rants and discoveries by Patrick Bulteel. Actually, it's a way to remember things.
Wednesday, 8 March 2017
Backups? Who needs stinking backups!
I run Linux on my corporate machine (Ubuntu in one flavour or another) and I had not upgraded in a while. This meant that my version of Ubuntu was End of Life and I need to completely re-image my laptop to get onto something more current.
Therefore, I did what anyone would do... backup my data.
I then attempted a restore to make sure that the data was still valid and "restorable" and proceeded to re-image my machine.
I hate to name and shame, but I used Deja-dup which is the default Ubuntu backup software to create my backups and check that everything was working.
However, after re-imaging my machine and installing the latest version of Ubuntu, I tried to restore my backup and lo-and-behold, Deja-dup tells me "There is no backup...."
WHAT?!
Are you might assume, I went ahead and tried to find what I could do - I saw that all the backup files (duplicity-full.xxxx.tardiff.gz) were in the backup location so I didn't think anything about it...
I tried re-launching the application and when I did it tried to make a backup. I didn't want a backup, so I stopped it. Then started the app again and tried to restore with the same error message.
I decided I would try something else, so I go to the directory where my backup was located and.... it was empty! Actually, there was a duplicity-checksum file that had been created by the previous backup attempt.)
WHAT?!
I couldn't believe my eyes. I wanted to die! I had not only documents but also code I had written. I had over a year's worth of work, notes, and items that I had saved... ALL GONE!
ALL! GONE!
So, I started looking for what I could do to recover something that was recently deleted. I found ext4magic and extundelete...
I installed both, made my partition read-only (which was an encrypted drive.)
sudo mount -o remount,ro /dev/mapper/luks-<uid-of-drive>
I then proceeded to read the documentation on both and decided that extundelete was worth a shot...
I created a temporary directory to try to restore into and ran the application (and crossed my fingers) ...
sudo extundelete /dev/mapper/luks-<uid-of-drive> -o RESTORE/ --restore-all
I waited. And finally...
42GB recovered!
I then copied them over to another drive (for safe keeping) and tried to restore from those files... Still, Deja-dup said, "No backup found!" $!*&"!
I went and looked for what I could do to recover if I didn't have Deja-dup and I found that I could simply gunzip and untar the files. That it would create a "snapshot" directory and a "multivol-snapshot" directory. Everything in the "snapshot" directory was the file in the original state... while the other one contained parts which had to be put together.
Well, I did it... and I've recovered almost all the stuff I had.
Now to switch to something that I have used before and that works quite well... Back-in-time.
Monday, 11 April 2011
VMWare MKS plugin on 64bit Ubuntu with nspluginwrapper
We use VMWare Lab Manager which gives you access to a console for the VMs that you deploy. However, the plugin that is provided by VMWare is only a 32bit app and due to that it doesn't seem to work when you install it.
Every time you go to the console, you get a black screen which allows you to install the plugin even though you already installed it.
However, there is a solution. You can go ahead and install the MKS plugin as usual, restart your browser and make sure that the plugin shows in the Extensions.
Then shutdown the browser (so you might want to print this blog entry or copy paste to gedit) and you can then try using nspluginwrapper to install it.
I suggest you run it like this:
/usr/bin/nspluginwrapper -v -i $HOME/.mozilla/firefox/xxxxxx.default/extensions/VMwareMKSNPRTPlugin@vmware.com/plugins/libnprtmks.so
Where xxxxx.default is your profile.
You can use sudo if you want, but this way it installs it into your .mozilla/plugins/ directory. The reason for the -v is so that you get verbose output if the installation fails (see below.)
*** NSPlugin Viewer *** ERROR: libexpat.so.0: cannot open shared object file: No such file or directory
nspluginwrapper: no appropriate viewer found for /home/USER/.mozilla/firefox/xxxxxxx.default/extensions/VMwareMKSNPRTPlugin@vmware.com/plugins/libnprtmks.so
Now what problems can you encounter? Well, in my case I found that I needed libexpat.so.0 as you can see above. Since this library isn't available to install, I installed libexpat.so.1 (sudo apt-get install libexpat1) and I just created a symbolic link in the /lib32 directory like this:
sudo ln -s /lib32/libexpat.so.1 /lib32/libexpat.so.0
I then ran it again and it was successful.
Now I can start my browser go to the console and voila, it works.
I'm not sure if there are other libraries that are needed, but at least by doing this I managed to get it working.
Getting this plugin to work with nspluginwrapper has given me hope that any other plugin that I cannot get working out-of-the-box will work through nspluginwrapper as long as I have the -v to be able to find the libraries that are missing.
Good luck!
-P
Thursday, 29 April 2010
Ubuntu 10.04 will be out today!
I'm not going to upgrade though, I'm going to do a clean install. In part because I want to document this for my other blog - Linux on your Mac.
I'll try go show all the steps I go through from the beginning. (I'm not going to bore people with the backup of my home directory or the application list.)
Lets see what happens.
-P
Friday, 29 January 2010
IRC, oh how I miss thee.
Well, I've started going to the #ubuntu-uk channel on FreeNode. I guess I get a good feeling when I get to help people and what better way than to do that. Especially if it's a topic I enjoy and believe I can help out.
If you'd like to chat, get on your irc client and use irc.ubuntu.com. :)
-P
Saturday, 5 December 2009
Firefox on Ubuntu oddness
Very odd...
I'll have to take a look and see where the problem lies. I've updated to the latest version of everything to see if it fixes the problem but so far no go. It may be something that's not yet documented elsewhere, so I'll have to post it when I find out what the solution is.
Keep an eye out.
-P
Monday, 30 November 2009
MythTV "streaming"
The setup doesn't seem to lag and it even seems to play better than streaming a file directly from the backend into VLC or mplayer.
-P
Thursday, 12 November 2009
Ubuntu 9.10 issues and solutions
This drove me nuts! I run XP every once in a while and it was so quick on Virtualbox prior to the upgrade that I thought VB was the culprit.
I messed around with the settings, I turned things on and off; all to no avail.
Then I remembered a post somewhere that mentioned the video drivers. Not the virtual machine's virtual video driver, but the actual driver of the host machine.
So I looked at what I was running.
Nvidia's driver version 183 - which was suggested and recommended by Ubuntu 9.10 after the upgrade. It worked fine with everything I did... could it be the culprit?
I then swapped the driver to version 173 which I was running previously (that reminded me I tried 180 and had problems with virtual machines then too) and my XP virtual machine was happy once again.
I did experience an issue or two with my machine freezing (the whole thing, not the VMs) after doing this and thought it was the Nvidia drivers again.
However I noticed something interesting. The freezes occurred only when I had Firefox running. If FF wasn't running, everything ran smoothly.
So I went into the FF add-ons and thought about how a "new" add-on I had installed and almost never used would actually use cool 3D effects. I'm talking about FoxTab. I disabled that after 20 minutes and guess what?
My virtual machines are happy, my Macbook runs smooth as silk!
Now to troubleshoot something else... OpenVPN on NetworkManager.
-P
Thursday, 5 November 2009
Mythbuntu 9.10
What can I say about this?
MythTV 0.22 (the normal app is 0.22RC2, I think in ubuntu it's 0.22+svn fixes)
The new MythTV is NICE! I still have some issues. I'll document them here and any solutions that I find. There are several things that I need to do to get them working right according to the MythTV wiki.
For now, I'm updating the graphics of the videos and I'm trying to tune all the different settings that you can use.
All in all, I think it's great!
-P
Saturday, 31 October 2009
Ubuntu 9.10 on MacBook Pro
After the upgrade I discovered that my O2 USB data card (a Novatel Ovation) wouldn't work. However, I manged to get it working after a reboot. (Not sure why.)
Wifi works, keyboard + multitouch pad worked, bluetooth keyboard + mouse worked, sound worked. What seems to not work? Well, when I put the machine to sleep and it comes up, I ALWAYS get a crash report which says that there was a kernel crash of sorts and that the system would be unstable.
Does this annoy me? Yes. Does it stop me from still using the system (i.e. is it really unstable?) No.
I haven't finished trying out all the usual apps that I use, but so far, I'm happy with the result.
Now, I can't wait to upgrade my Myth Server at home! I have seen there are a LOT of really cool things in that arena!
-P
Wednesday, 15 October 2008
A few issues resolved with new drivers...
Basically, I could connect to my WAP/WAP2 protected wifi network, but I'd have problems with the card not getting a DHCP address. I looked further into it and realized that my DHCP server wasn't actually receiving the request. I figured it was the wpa_supplicant application that wasn't working quite right. Well, all of a sudden it's all working right.
BTW -- Ubuntu showed those drivers as being the restricted drivers (not open source) -- but they actually work great.
-P
Monday, 11 August 2008
64-bit Ubuntu on MacBookPro and Google Earth
I like to use Google Earth. It's a great learning tool and it helps to make you realize how small you really are. But I was running into problems the first time I installed this. This isn't specifically a Mac problem, it's a 32-bit vs 64-bit problem. I had several 32-bit libraries installed but the one that Google Earth was missing and therefore causing my headaches turned out to be lib32nss-mdns. Once I installed it, I was going around the world in 2 seconds.
I found the solution in a Google Groups posting.
So now, everything works. I can suspend, hibernate, wifi, voip, VPN, google earth, browsing the web, email, sound, IM, VNC, scanning and printing from my HP printers (the office and home printer using HPLIP toolbox.) I even got desktop recording to work which will help with tutorials.
I also use Skype, my Vodafone data card, dual screens, project management, development, Asterisk monitoring (using gastman) oh, and lets not forget games! There's a ton of OpenSource games out there that I found thanks to another site and I've just had to "sudo apt-get install" them. The iSight works too with Cheese although I hope they improve that app a little. I can burn DVDs and ISOs of the different server images we have for work.
Right clicking is done by using the right "cmd" button instead of ctrl-click.
The only thing I haven't tried to do yet because I haven't had the necesity to is to use Bluetooth. I haven't paired my Plantronic 509B Headphones or my Sony Ericsson phone.
I'll try that later and post about it.
So in conclusion ... MacBook + Ubuntu is a win-win situation. You get great hardware and great software with a little bit of hassle if you've never set things up. I'm sure if I had to do it again, I would have less trouble doing so and I'd still be very happy with the outcome.
-P
Tuesday, 15 July 2008
Ubuntu isn't perfect, but it's damn close
I've discovered a few annoying issues that are slowly being worked on by the Linux community at large and I hope will fix my problems once they release the new version of these applications.
Which applications are causing problems? Well the two worst issues are the ones that unfortunately I think are quite important. One is something I need to have for daily use - a softphone. Now there are several applications out there: Ekiga and Twinkle are two of the Open Source ones that are available for install - Ekiga being the default. However I found that there were a few times where they didn't work. When I used Mac OS X I would use X-Lite, then I discovered Zoiper and used that instead. Well, Zoiper runs on Linux too, so I've installed it as well to test. I also found WengaPhone which I installed and tested too.
The reason for testing all these applications is that I would always encounter a problem or on a different application, a different problem. On Twinkle, my audio drivers would not work if some other audio application (or itself) crashed. With Ekiga, I couldn't get it to work over the VPN. I tried different settings and maybe I missed something, but on a VPN it doesn't work. With Zoiper - I thought that being on a familiar application I would be able to troubleshoot it better and get it to work. Well, that didn't work either. I also tried WengaPhone which worked much better, but had the same problems as Zoiper - the audio would sometimes fail and I wouldn't be able to hear or talk to anyone. I think this may be due to the applications being 32 bit while I'm on a 64 bit installation. I have the compatibility libraries - including sound, but still no go.
Anyway - while I'm in the office I'm going to use Twinkle and just have to reboot if the audio driver fails (what a pain.) A possible solution which I haven't tried yet is finding a way to reload or reset the audio drivers. If you have an idea of how I can do this easily, let me know. I may just have to script the rmmod, insmod for the sound modules.
The other issue that I have is related to the wireless connectivity. At home I setup my wifi to use WPA+WPA2 for protection. I was able to get our wifi printer on the network, our Nintendo Wii and the two other computers. My MacBook Pro on Unbuntu sees the network requests the key and then doesn't do anything. It seems to connect to the network, but doesn't get a DHCP address. I've tried using a static IP address, overwriting Network Manager, but that worked once and then stopped working. I even had created a profile for "home" so I could just toggle that and have a static IP at home... but nothing!
For now I'm tethered via a network cable. Not the best solution, but it'll have to do until I find a solution.
By the way, I did disable the WPA+WPA2 settings and went with JUST WPA and then with JUST WPA2, but in both situations I had the same problem that I don't quite complete the connection and don't get an IP address from the router's DHCP server and I can't get the static IP address to work either.
Anyway - all in all - I'm very pleased with my Ubuntu installation.
-P