18 December 2009
17 December 2009
Linux Mint 8 Helena
The other day I decided to remove Ubuntu 9.10 Karmic and install Linux Mint 8 Helena on my work computer. There were a few bugs in Karmic that were bothering me so I decided to try out Mint's latest release, based on Karmic.
I haven't had any of the problems with Mint that I had with Karmic, but I still get all of the fun little upgrades that did come with Karmic since Mint is just a slight modification to Ubuntu. The update manager works correctly now and they also added the home folder encryption option to the graphical installer. Best of all, it comes with all of the plugins and proprietary programs (flash, reader, java, etc.) that are a pain to get setup when installing Ubuntu. I also really like the default theme that comes with Mint.
The one annoyance that I have found in Mint is that it replaces the Google search in the Firefox toolbar with a custom Google search that provides ad revenue to Linux Mint. I'm all for Mint finding ways to get revenue, but they make it somewhat difficult to fix.
The following site proposes a good fix for this:
http://devtoe.blogspot.com/2009/03/how-to-restore-firefox-google-search-in_07.html
I haven't had any of the problems with Mint that I had with Karmic, but I still get all of the fun little upgrades that did come with Karmic since Mint is just a slight modification to Ubuntu. The update manager works correctly now and they also added the home folder encryption option to the graphical installer. Best of all, it comes with all of the plugins and proprietary programs (flash, reader, java, etc.) that are a pain to get setup when installing Ubuntu. I also really like the default theme that comes with Mint.
The one annoyance that I have found in Mint is that it replaces the Google search in the Firefox toolbar with a custom Google search that provides ad revenue to Linux Mint. I'm all for Mint finding ways to get revenue, but they make it somewhat difficult to fix.
The following site proposes a good fix for this:
http://devtoe.blogspot.com/2009/03/how-to-restore-firefox-google-search-in_07.html
15 December 2009
Hi-Point C9
Tags:
Hi-Point C9
For Christmas this year my wife, knowing I was looking at getting a gun, decided to sign me up for a CCW class as a surprise. So yesterday I went out and bought the one I had been looking at. It is a Hi-point 9mm Compact handgun. This Friday we are going to go out and put a hundred rounds through it to see how it plays. It was $134.99 before tax.
11 December 2009
iMac G3 with Linux
Last week I picked up a free iMac G3 slot-load off of someone's curb. Surprisingly enough it was in good shape. It is a blueberry 350MHz with 64MB of RAM and a 6GB hard drive. Since I am not terribly familiar with older Apple hardware and software, I decided to see what I could get out of this.
It turns out that this particular model will support up to Mac OS X 10.3 Panther with a RAM upgrade. I decided if I am going to do anything useful I am going to need at least 512MB of RAM. So I purchased a 512MB stick of RAM for $26 including shipping from ramdirect.com.
After more research I found that no useful software still works with any Mac OS earlier than 10.4. Not only is 10.4 too expensive, it requires better hardware and is nigh impossible to get on CD (this iMac only has a cdrom drive).
My next inclination was to install Linux. I tried Ubuntu 9.04, Gentoo, openSUSE, and Debian. Both Ubuntu and Debian testing brought up X without any tweaking, but the color depth was incorrect. I haven't yet figured how to fix this. Debian stable didn't bring up X but I was able to get a copy of a working xorg.conf file and copy it over. After that everything worked great. I tried the same xorg.conf file with Ubuntu and Debian testing but with no luck.
In our current apartment we have wifi but no wired connection so I have been using our MBP's Internet sharing for now. This iMac supports an 802.11b Apple Airport card with an adapter so I picked up an adapter off of ebay for about $7 and the airport card for $10. I also bought a replacement lithium battery since the hardware clock was not keeping time. I've received all of the parts except for the airport card which I should be getting early next week.
Depending on whether or not I can get X working properly as well as the airport card, I may end up sticking with Debian or Ubuntu. I might also give it the mac4lin theme just for fun.
It turns out that this particular model will support up to Mac OS X 10.3 Panther with a RAM upgrade. I decided if I am going to do anything useful I am going to need at least 512MB of RAM. So I purchased a 512MB stick of RAM for $26 including shipping from ramdirect.com.
After more research I found that no useful software still works with any Mac OS earlier than 10.4. Not only is 10.4 too expensive, it requires better hardware and is nigh impossible to get on CD (this iMac only has a cdrom drive).
My next inclination was to install Linux. I tried Ubuntu 9.04, Gentoo, openSUSE, and Debian. Both Ubuntu and Debian testing brought up X without any tweaking, but the color depth was incorrect. I haven't yet figured how to fix this. Debian stable didn't bring up X but I was able to get a copy of a working xorg.conf file and copy it over. After that everything worked great. I tried the same xorg.conf file with Ubuntu and Debian testing but with no luck.
In our current apartment we have wifi but no wired connection so I have been using our MBP's Internet sharing for now. This iMac supports an 802.11b Apple Airport card with an adapter so I picked up an adapter off of ebay for about $7 and the airport card for $10. I also bought a replacement lithium battery since the hardware clock was not keeping time. I've received all of the parts except for the airport card which I should be getting early next week.
Depending on whether or not I can get X working properly as well as the airport card, I may end up sticking with Debian or Ubuntu. I might also give it the mac4lin theme just for fun.
Windows 7 Professional x64 on Toshiba Satellite A215-S4747
I have been using Windows 7 Pro x86 off of MSDNAA for a few weeks now on my Toshiba Satellite A215-S4747. I was surprised that all of the drivers worked out of the box, but I found that every 3rd reboot or so the system would lock up at the password login screen. The mouse would not move and the keyboard did nothing. The cursor was stuck and wasn't blinking in the login dialog.
Last night I decided to reinstall but with the 64-bit version instead just to see how it would go. It turns out that Toshiba decided to get all of the drivers together for the 64-bit version of 7 so right out of the box everything worked except for the SD card reader. I was able to go to the Toshiba driver page and download the "XP/Vista" drivers for the TI Card Reader and they worked just fine in Windows 7 64-bit. But after a few reboots I have found that the system still locks up every 3 or so reboots. One other thing that I noticed is the Synaptics mouse driver that it installs doesn't support scrolling using the touchpad.
I decided to go ahead and download the latest ATI Drivers from the ATI website and I was able to install them without any problem. I also installed the audio drivers from the Toshiba site and the acoustic silencer for the DVD drive. After I installed the ATI drivers the problem with locking up at startup was fixed.
Last night I decided to reinstall but with the 64-bit version instead just to see how it would go. It turns out that Toshiba decided to get all of the drivers together for the 64-bit version of 7 so right out of the box everything worked except for the SD card reader. I was able to go to the Toshiba driver page and download the "XP/Vista" drivers for the TI Card Reader and they worked just fine in Windows 7 64-bit. But after a few reboots I have found that the system still locks up every 3 or so reboots. One other thing that I noticed is the Synaptics mouse driver that it installs doesn't support scrolling using the touchpad.
I decided to go ahead and download the latest ATI Drivers from the ATI website and I was able to install them without any problem. I also installed the audio drivers from the Toshiba site and the acoustic silencer for the DVD drive. After I installed the ATI drivers the problem with locking up at startup was fixed.
Backing up a full disk encrypted Ubuntu install
Full hard disk copy
dd if=/dev/hdx of=/dev/hdy
dd if=/dev/hdx of=/path/to/image
dd if=/dev/hdx | gzip > /path/to/image.gz
Hdx could be hda, hdb etc.
In the second example gzip is used to compress the image if it is really just a backup.
Restore Backup of hard disk copy
dd if=/path/to/image of=/dev/hdx
gzip -dc /path/to/image.gz | dd of=/dev/hdx
MBR backup
In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.
dd if=/dev/hdx of=/path/to/image count=1 bs=512
MBR restore
dd if=/path/to/image of=/dev/hdx
Add "count=1 bs=446" to exclude the partition table from being written to disk. You can manually restore the table.
Partition table backup
sfdisk -d /dev/hdx > parttable.sf
Partition table restore
sfdisk /dev/hdx < parttable.sf
dd if=/dev/hdx of=/dev/hdy
dd if=/dev/hdx of=/path/to/image
dd if=/dev/hdx | gzip > /path/to/image.gz
Hdx could be hda, hdb etc.
In the second example gzip is used to compress the image if it is really just a backup.
Restore Backup of hard disk copy
dd if=/path/to/image of=/dev/hdx
gzip -dc /path/to/image.gz | dd of=/dev/hdx
MBR backup
In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.
dd if=/dev/hdx of=/path/to/image count=1 bs=512
MBR restore
dd if=/path/to/image of=/dev/hdx
Add "count=1 bs=446" to exclude the partition table from being written to disk. You can manually restore the table.
Partition table backup
sfdisk -d /dev/hdx > parttable.sf
Partition table restore
sfdisk /dev/hdx < parttable.sf
Google Gears on 64-bit Ubuntu
After finally getting a version of 64-bit Ubuntu that actually works on my laptop, I found out that the Google Gears plugin doesn't work on 64-bit Firefox. I was able to find a site where you can download a modified version of the plugin that works in 64-bit here:
http://nielspeen.com/blog/2009/02/google-gears-64-bit/
http://nielspeen.com/blog/2009/02/google-gears-64-bit/
64-bit Encrypted Ubuntu 9.04 Jaunty Jackalope
Tags:
Linux,
Toshiba Satellite A215-S4747,
Ubuntu
Since Ubuntu 9.04 was released back in April I haven’t had much of an opportunity to use it. I got an iPod Touch and needed Windows in order to sync it. Now that we have a MacBook, I can sync there and use my laptop for Ubuntu. Yesterday I downloaded the Ubuntu amd64 alternate install CD and installed Ubuntu 9.04 with full disk encryption and 64-bit OS. This is the first time I have been able to get Ubuntu working on my laptop with both of those features and still been able to use my Wi-Fi card properly as well as the rest of my hardware. For some reason in the past, my Wi-Fi card has not agreed with a 64-bit version of Ubuntu. My laptop is a Toshiba Satellite A215-S4747 for those who might have one as well. Now I just need to replace the battery. The battery in this laptop has degraded so much that it only lasts 45 minutes to an hour on a full charge.
NTFS-3G for Mac and Ubuntu
Tags:
Linux,
Macbook Pro,
Ubuntu
One of the first issues that I ran into with my new MacBook Pro is that I have an external 750GB Maxtor OneTouch 4 hard drive that I use for backups. My other laptop runs Ubuntu Linux and I wanted to find a way to be able to use the hard drive with Apple’s Time Machine backup software as well as be able to backup DVD iso’s and other things from my Linux machine. It took me some testing and reading to figure out what file system and partition setup would work best for all of this. I decided to partition my hard drive 250GB HFS+ for Time Machine and 450GB NTFS for everything else (700GB usable). I then installed the NTFS-3G for Mac OS X so that I could read and write NTFS with Mac OS. Ubuntu comes with NTFS-3G support out of the box so there was no issue there. If Time Machine allowed backup to a remote file server then I would probably attach the drive to the EeePC that I have running Debian Linux and serving as my web server and setup a samba server or use SSH. Then I could use rdiff-backup from my Linux machine for backups on that side as well. But for now this works.
Virtualbox on Mac OS X
Tags:
Linux,
Macbook Pro
With Boot Camp in Mac OS X I have the opportunity to dual boot Windows XP if I like. I do like the idea of having access to XP from my MBP, but I don’t like the idea of having to reboot to use it. I definitely don’t want to spend more money on Virtual PC software such as Parallel Desktops. I decided to try out Virtualbox in Mac OS. I have used Virtualbox in Linux quite a bit so I wasn’t surprised to find that it works great. I made two virtual machines, one for XP and one for Ubuntu. With my 4GB of ram I was able to run both an XP virtualbox and a Ubuntu virtualbox both with a gig of RAM dedicated to them and the system still ran smoothly. It felt good.
MacBook Pro 1.5 Gbps SATA interface
Tags:
Macbook Pro
The only issue that I have run into so far on my Mac is the recent discovery that the SATA II interface is only using 1.5 Gbps for the HDD instead of the 3Gbps that is supported by SATA II. What’s worse, the older versions of the MBP’s as well as the current, cheap white MacBook get 3 Gbps. This is hardly an issue for me considering I went with the 120GB 5400RPM hard drive, but there are many people upset about this issue because they intended to replace the HDD with an SSD that performs much faster. A 1.5 Gbps SATA is going to limit the ability of those SSD’s. I am interested to see what Apple has to say about all this, but so far they’ve said nothing.
New 13” MacBook Pro
Tags:
Macbook Pro
Two weeks ago Apple announced a new line of MacBook Pro’s. Among those was a new 13” MacBook Pro. My wife and I had been planning on buying a white MacBook this summer, but when the new 13” MBP was announced I decided it would be worth a couple hundred more. I was able to get a $100 student discount and also a free iPod Touch (which I sold on eBay to further subsidize the MBP purchase). I threw in a $90 RAM upgrade to 4GB and I was set. After taxes and including all the rebates and the sales of the iPod touch I spent about $1130 on the new MBP.
This is my first Mac. Growing up with a father that worked at Intel and being subject to Mac’s in elementary and middle school, I have always had a strong internal dislike for everything Apple. Now that they have a Unix-based OS and Intel hardware, the only thing I still tend to dislike is their business model. But slick products and a spouse that tends to like Mac’s have finally persuaded me to give in. I thought this would be a perfect opportunity.
This is my first Mac. Growing up with a father that worked at Intel and being subject to Mac’s in elementary and middle school, I have always had a strong internal dislike for everything Apple. Now that they have a Unix-based OS and Intel hardware, the only thing I still tend to dislike is their business model. But slick products and a spouse that tends to like Mac’s have finally persuaded me to give in. I thought this would be a perfect opportunity.
Building a backport for a debian package
Download the .orig.tar.gz, .dsc and .diff.gz files
Untar the source code then cd into the source directory, then do the following
Untar the source code then cd into the source directory, then do the following
$ zcat ../blah.diff.gz | patch -p1
$ dpkg-buildpackage
Debian 5.0 Lenny x86 on Toshiba Satellite A215-S4747
Tags:
Debian,
HowTo,
Linux,
Toshiba Satellite A215-S4747
Preparation
If you are like me and have to rely solely on a wireless setup for your internet (and don't have direct access to a router), then I would recommend downloading the wireless driver beforehand and storing it on a USB drive for after the installation.
Download the latest version of madwifi hal source from http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz
Installation
Just getting Debian to boot the installation disc was a task. When you get the boot prompt, select Install or Graphical Install and hit Tab in order to edit the boot parameters.
Use "apic=off" to the boot line and then boot.
Run the install as you normally would. You will notice that it detects your wireless card, but unfortunately it doesn't work properly and therefore won't detect any wireless networks. You can either do this install using a wired connection (which does work out of the box), or using the Debian install CD1 or DVD1. If you are doing the install without any connection at all I would recommend using the DVD just in case there are extra packages that you might need for getting your wireless to work.
Atheros Wireless Setup
ATI Mobility Radeon X1200 Graphics Setup
After a reboot, the graphics should work.
Verify that it worked
Setup Compiz
Add “compiz --replace” to “Desktop -> Preferences -> Sessions -> Startup Programs”.
Adobe Flash Plugin Install
Get Debian Multimedia Keyring
Then install it:
Add to /etc/apt/sources.list:
deb http://www.debian-multimedia.org lenny main
Then run:
Sun Java Plugin Install
Disable System Beep
Add "blacklist pcspkr" to /etc/modprobe.d/blacklist
This will take a reboot to take effect or you can do the following to make the effects immediate:
If you are like me and have to rely solely on a wireless setup for your internet (and don't have direct access to a router), then I would recommend downloading the wireless driver beforehand and storing it on a USB drive for after the installation.
Download the latest version of madwifi hal source from http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz
Installation
Just getting Debian to boot the installation disc was a task. When you get the boot prompt, select Install or Graphical Install and hit Tab in order to edit the boot parameters.
Use "apic=off" to the boot line and then boot.
Run the install as you normally would. You will notice that it detects your wireless card, but unfortunately it doesn't work properly and therefore won't detect any wireless networks. You can either do this install using a wired connection (which does work out of the box), or using the Debian install CD1 or DVD1. If you are doing the install without any connection at all I would recommend using the DVD just in case there are extra packages that you might need for getting your wireless to work.
Atheros Wireless Setup
Download the latest version of madwifi hal source from http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz
$ tar -zxvf madwifi-hal-0.10.5.6-current.tar.gz
$ cd madwifi-hal-0.10.5.6-rXXXX-XXXXXXXX
$ sudo make install
$ sudo modprobe ath_pci
$ sudo modprobe wlan_scan_sta
$ sudo echo "blacklist ath5k" >> /etc/modprobe.d/blacklist
$ sudo echo "ath_pci" >> /etc/modules
$ sudo echo "wlan_scan_sta" >> /etc/modules
ATI Mobility Radeon X1200 Graphics Setup
$ sudo apt-get install fglrx-atieventsd fglrx-driver fglrx-glx fglrx-source
$ sudo module-assistant auto-install fglrx-source
$ sudo aticonfig --initial
After a reboot, the graphics should work.
Verify that it worked
$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon X1200 Series
OpenGL version string: 2.1.8304 Release
Setup Compiz
$ sudo apt-get install compiz compiz-gnome compizconfig-settings-manager compiz-fusion-plugins-main compiz-fusion-plugins-extra compiz-plugins
Add “compiz --replace” to “Desktop -> Preferences -> Sessions -> Startup Programs”.
Adobe Flash Plugin Install
Get Debian Multimedia Keyring
Then install it:
dpkg -i debian-multimedia-keyring_2008.10.16_all.deb
Add to /etc/apt/sources.list:
deb http://www.debian-multimedia.org lenny main
Then run:
$ sudo apt-get update
$ sudo apt-get remove gnome swfdec-mozilla
$ sudo apt-get install bluez-gnome libmtp7 libgksu1.2-0 python-notify aspell libgda3-common python-gnome2-extras libgksuui1.0-1 evolution-exchange rhythmbox system-config-printer libgpod3 gnome-themes-extras python-eggtrayicon gnome-spell python-4suite-xml libgda3-3 transmission-common libgdl-1-0 serpentine libopenobex1 transmission-gtk libgdl-1-common gnome-vfs-obexftp flashplayer-mozilla
Sun Java Plugin Install
$ sudo apt-get install sun-java6-plugin
Disable System Beep
Add "blacklist pcspkr" to /etc/modprobe.d/blacklist
This will take a reboot to take effect or you can do the following to make the effects immediate:
$ sudo rmmod pcspkr
Make Firefox remember your password for any website
By editing the file nsLoginManager.js you can make Firefox remember passwords even on sites that don't allow the use of saved passwords.
On Debian and Ubuntu:
/usr/lib/xulrunner-1.9/components/nsLoginManager.js
On Mac OS X:
/Applications/Firefox.app/Contents/MacOS/components/nsLoginManager.js
On Windows:
C:\Program Files\Mozilla Firefox\components\nsLoginManager.js
Change the "return true" to "return false".
Sources:
http://cybernetnews.com/2009/02/13/firefox-remember-passwords/
http://www.dailygyan.com/2008/08/force-firefox-to-remember-password-of.html
On Debian and Ubuntu:
/usr/lib/xulrunner-1.9/components/nsLoginManager.js
On Mac OS X:
/Applications/Firefox.app/Contents/MacOS/components/nsLoginManager.js
On Windows:
C:\Program Files\Mozilla Firefox\components\nsLoginManager.js
/*
* _isAutoCompleteDisabled
*
* Returns true if the page requests autocomplete be disabled for the
* specified form input.
*/
_isAutocompleteDisabled : function (element) {
if (element && element.hasAttribute("autocomplete") &&
element.getAttribute("autocomplete").toLowerCase() == "off")
return true; return false;
},
Change the "return true" to "return false".
Sources:
http://cybernetnews.com/2009/02/13/firefox-remember-passwords/
http://www.dailygyan.com/2008/08/force-firefox-to-remember-password-of.html
From Ubuntu 8.10 to Debian 5.0
Tags:
Debian,
Linux,
Thoughts,
Toshiba Satellite A215-S4747,
Ubuntu
I've been itching to switch Linux distributions lately on my laptop. I've been using Ubuntu for some time now with Intrepid Ibex as my latest installation, but ever since I was first introduced to Red Hat Linux back when I was about 14 years old, I have enjoyed two major aspects of the operating system. First, I love working on it and figuring out how to get things to work, then writing down how I did it. Second, I like using an OS that isn't the mainstream that everyone uses. I think it's great that Linux is gaining popularity and that Ubuntu works so well that more and more can use it, but part of that fact makes it slightly less appealing to me.
Because of that, I have been trying out some of the "2nd bests" out there. After playing with Gentoo, openSUSE, freeBSD, Sabayon and Mint, I settled on getting back to Ubuntu's roots by swtiching to Debian Linux. I have been using Debian for webservers for the last couple of years, but I have never really used with a desktop environment. It just so happened that Debian finally released version 5.0 Lenny yesterday as stable, so I decided to try it out and see if it would do everything that I want to do without being Ubuntu. And so far it is working out great. My next post will likely be a howto for intalling it on a Toshiba Satellite laptop.
Because of that, I have been trying out some of the "2nd bests" out there. After playing with Gentoo, openSUSE, freeBSD, Sabayon and Mint, I settled on getting back to Ubuntu's roots by swtiching to Debian Linux. I have been using Debian for webservers for the last couple of years, but I have never really used with a desktop environment. It just so happened that Debian finally released version 5.0 Lenny yesterday as stable, so I decided to try it out and see if it would do everything that I want to do without being Ubuntu. And so far it is working out great. My next post will likely be a howto for intalling it on a Toshiba Satellite laptop.
Ubuntu Wi-Fi on Toshiba Satellite A215-S4747 w/out ndiswrapper
Tags:
HowTo,
Linux,
Toshiba Satellite A215-S4747,
Ubuntu
I finally got my wifi adapter working without ndiswrapper on my Toshiba Satellite A215-S4747 in Ubuntu Linux. This should work with any recent version of Ubuntu 32-bit or 64-bit, but I am running Ubuntu 8.10 32-bit. These are the steps I took:
Update: After testing this on both 64-bit and 32-bit Intrepid installs I've come to the conclusion that it is only reliable on the 32-bit install. On the 64-bit install, it only works intermittently and can be very frustrating.
Download the latest version of madwifi hal source from http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6-current.tar.gz
$ tar -zxvf madwifi-hal-0.10.5.6-current.tar.gz
$ sudo make install
$ sudo modprobe ath_pci
$ sudo modprobe wlan_scan_sta
Update: After testing this on both 64-bit and 32-bit Intrepid installs I've come to the conclusion that it is only reliable on the 32-bit install. On the 64-bit install, it only works intermittently and can be very frustrating.
How to fix the Ubuntu GPG Error BADSIG
Occasionally I have run into a problem in Ubuntu where I run apt-get update and receive the following error:
W: GPG error: http://archive.canonical.com intrepid Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
This can be corrected by the following commands:
W: GPG error: http://archive.canonical.com intrepid Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
This can be corrected by the following commands:
# sudo -i
# apt-get clean
# cd /var/lib/apt
# mv lists lists.old
# mkdir -p lists/partial
# apt-get clean
# apt-get update
rdiff-backup for simple but powerful backup
Ever since I got my new external 750GB hard drive I've been looking for a good way to use it for backing up my laptop. At first I was doing some basic backups using tar with some bash scripting for file rotation and then I would occasionally use partimage to get a whole image of the drive in case I ever needed to do a full restore. Then I was told about rdiff-backup.
This program is great. It maintains a mirror image of whatever you tell it to, and does incremental backups using a diff system so that it only backs up the portion of the file that has changed. So it doesn't fill up your drive any faster than it has to. It has a great restore feature and even works over ssh so you can backup remotely.
This program is great. It maintains a mirror image of whatever you tell it to, and does incremental backups using a diff system so that it only backs up the portion of the file that has changed. So it doesn't fill up your drive any faster than it has to. It has a great restore feature and even works over ssh so you can backup remotely.
Cleaning up old removed Debian packages
When using Debian there are two ways to remove packages:
The first: $ apt-get remove packagename
The second: $ dpkg --purge packagename
The former removes packages but leaves the configuration files. The latter purges the package as well as the configuration files. But what if you have been using apt-get remove or apt-get autoremove to get rid of packages and now you want to go back and remove all the configuration files for all those packages? Here are some very useful utilities that you can use to automate this process
dpkg --get-selections will give you a list of all installed packages followed by their installation status
grep deinstall will show the lines that are packages that were removed using remove instead of purge
cut -f 1 will grab just the column containing the package names excluding their status
xargs dpkg --purge will take the column of packages and run dpkg --purge on it
Warning: Make sure to run the command without the last portion to see what will be removed. It can be very easy to accidentally remove packages by accident if you make a mistake.
The first: $ apt-get remove packagename
The second: $ dpkg --purge packagename
The former removes packages but leaves the configuration files. The latter purges the package as well as the configuration files. But what if you have been using apt-get remove or apt-get autoremove to get rid of packages and now you want to go back and remove all the configuration files for all those packages? Here are some very useful utilities that you can use to automate this process
dpkg --get-selections will give you a list of all installed packages followed by their installation status
grep deinstall will show the lines that are packages that were removed using remove instead of purge
cut -f 1 will grab just the column containing the package names excluding their status
xargs dpkg --purge will take the column of packages and run dpkg --purge on it
dpkg --get-selections | grep deinstall | cut -f 1 | xargs dpkg -PWarning: Make sure to run the command without the last portion to see what will be removed. It can be very easy to accidentally remove packages by accident if you make a mistake.
Toshiba Users Group
I created a Google Group for discussion of Toshiba computers. In my case the discussion will be centered around the Toshiba A215-S4747 laptop that I own and have written about in the past. Please feel free to join the discussion and find answers or contribute your own solutions.
Secure wiping your hard drive in Linux
Tags:
HowTo,
Linux,
Toshiba Satellite A215-S4747
Usually I get a copy of the System Rescue CD and use the DBAN option at the boot prompt. DBAN is an automatic drive wiping utility that doesn't require you to boot into the Linux environment. But sometimes DBAN doesn't work right for example in the case of my Toshiba Satellite A215-S4747 laptop. As soon as I try to boot DBAN it gives an error saying that it failed and that it's probably due to bad sectors on the disk. If this happened in the middle of wiping, I might believe that it was bad sectors but this morning I had a brand new laptop do the same thing. So instead I booted into the System Rescue CD and used shred:
The "-n 7" tells shred to write /dev/sda 7 times with random data and then "-z" says to pass over it with zeros on a final pass in order to hide the fact that it was wiped. "-f" means to force it and "-v" has it print out the status as it goes.
shred -n 7 -z -f -v /dev/sdaThe "-n 7" tells shred to write /dev/sda 7 times with random data and then "-z" says to pass over it with zeros on a final pass in order to hide the fact that it was wiped. "-f" means to force it and "-v" has it print out the status as it goes.
Subscribe to:
Posts (Atom)

