Version 3
Linux
apt-get upgrade Confusion
While performing some regular maintenance on one of my Ubuntu machines I was getting a bit confused between all of the upgrade commands, so I investigated further. I’ve listed below the basic differences between each:
sudo apt-get upgrade
install newest versions of packages on machine
sudo apt-get dist-upgrade
upgrades all packages on system, handle dependency changes (remove obsolete packages). This command prepares the system for upgrade but since /etc/sources.list is not changed to the sources for the newer distribution it will not actually upgrade to the newest version.
To actually perform a distribution upgrade the following command should be used (ensure you have a backup before issuing this command. The upgrade could make your system unstable):
First, check which version you are currently running using the following:
lsb_release -a
Next, you can download the newest update manager and issue the upgrade command:
sudo apt-get install update-manager-core sudo do-release-upgrade
All of these commands should be used with caution as you are directly affecting your software packages installed on the system.
This site was very helpful in my initial investigation of the differences of this command.
BIND Tip – Dumping The Cache
Thought it would be useful to document a useful command while learning how to operate BIND. I set BIND9 up on my print server and was trying to examine how much resources it was consuming. I found the following command helpful – it dumps the current BIND9 database from memory to /var/cache/bind (by default):
sudo rndc dumpdb –all
After that I simply navigated to /var/cache/bind and issued the command
ls –lah
and was shown that it consumes 649K in memory from the output of the command above:
-rw-r--r-- 1 bind bind 649K 2010-05-02 08:15 named_dump.db
I’m not a BIND expert and am actually stumbling around with some custom zone settings but I thought this was worth mentioning. I’m also assuming this is quite small for a db size since this was only setup for testing for a 1 user network. Nevertheless, it would be useful to check that you have adequate memory to handle the database size if you are deploying a DNS server for your network. I believe you can also limit the cache size if needed, but I don’t think I’ll be needing that option added to my config anytime soon.
If you haven’t already, read up on the rndc command – because it’s quite powerful. In addition, make sure you are using the latest stable version of BIND to (as well as other benefits) protect against cache poisoning.
Boot To USB Without BIOS USB Boot Support
On any new machine I purchase I ensure to thoroughly run all hardware with the various diagnostic applications available on the Ultimate Boot CD. I have the UBCD setup on a USB drive which allows me to ditch the CD wallet. Problem is, even in this day and age, there are still machines I encounter that are not compatible with USB boot. Most of the time I’ll burn an ISO to CD and hook up a spare CD-ROM drive, but recently I was determined to get the computer to boot to USB. No BIOS update was available and I searched every inch of the BIOS menus looking for a USB boot option with no success. So, after some browsing around I found PLoP. PLoP is a Boot Manager that will (among other things) allow a machine to boot to USB even without BIOS support. It’s actually quite an easy solution but does require you to make either a floppy or CD. Since the machines I was working with were previously used in a cluster they had no CD-ROM drives but they did contain a floppy drive. To create a PLoP boot disk using another Ubuntu machine I completed the following:
wget http://download.plop.at/files/bootmngr/plpbt-5.0.10.zip sudo apt-get install unzip unzip plpbt-5.0.1.0.zip cd phpbt-5.0.10/
Insert the floppy to write to into the drive. I’m assuming it’s located at /dev/fd0.
fdformat /dev/fd0 dd if=plpbt.img of=/dev/fd0 bs=1440k
Once you complete this you have created the bootable floppy and can now boot the machine to the floppy which contains the boot manager. You will need to ensure that the installed floppy drive is listed on the boot list. Note that the ISO is also included in the downloaded package if you would rather create a CD.
After you boot into PLoP there is a list of available boot options. USB should be an option in the list and you simply select that as the boot option, press Enter, and your USB bootable drive can now be accessed! Note: Once booted to USB I could *only* use PS/2 keyboard and mouse with the machine.