Wiping of hard drives with Linux

More than a decade of computer upgrades and rebuilds can leave obsolete kit in your hands and the arrival of legislation controlling the dumping of electronic goods during this time can leave one wondering how anyone can dispose of them. Thankfully, I discovered that the local council refuse site only a few miles away from me accepts such things for recycling and saw me a good few times over the last summer with obsolete and non-working gadgets that has stayed with me far too long. Some were as bulky as a computer monitor and a printer but others were relatively diminutive.

Disposing of non-working and utterly obsolete equipment is an easy choice but I find this is harder when a device still works as intended and even might have a use yet. When you realise that computer motherboards still come with PS/2, floppy and IDE ports, things get trickier. My Gigabyte Z87-HD3 mainboard just has one PS/2 when predecessors would have had two and the same applies to IDE sockets and there still is a floppy drive socket on there too, a surprising sight for anyone used to thinking that such things are utterly outmoded these days. So, PC technology isn’t relinquishing backwards compatibility just yet since that mainboard is part of a system with an Intel Core i5-4670K CPU and 24 GB of RAM on there.

Even with that presence of an IDE port, I was not tempted to use leftover 10 GB and 20GB hard drives that I have had for just over a decade. Ten years ago, that sort of capacity would been respectable were it not for our voracious appetite for data storage thanks to photography, video and music. Apart from the size constraints, the speed of those drives cannot compare well with what we have today either and I quickly saw that when I replaced a Samsung 160 HD of a similar age with a Samsung SSD.

The result of this line of thought was that I was minded to recycle the drives so I started to think about wiping and Linux has a good tool for this in the form of the dd command. It can overwrite data on the disks so as to render the information virtually irretrievable. Also, Linux has a number of dummy devices that can supply junk data for overwriting purposes. They are like /dev/null which is used to suppress the issuing of output to the command. The first is /dev/zero which supplies octal zeros and I have used this. However, there also is /dev/random and /dev/urandom for those wanting a more random element to the overwriting.

To overwrite data on a disk with zeroes while having feedback on progress, the following command achieves the required result:

sudo dd if=/dev/zero | pv | sudo dd of=/dev/sdd bs=16M

The whole operation needs to be executed with root privileges and the if parameter of dd specifies the input data and this is sent to a pv command that shows a progress bar that dd would not produce by itself while sending the output on to another dd command with the disk to be overwritten specified using the of parameter. The bs parameter in that second dd command specifies the block size for the disk writing job. Unfortunately, pv is not installed by default so you need to add it yourself. On a Debian, Ubuntu or Linux Mint system, the command is the following:

sudo apt-get install pv

That pv sandwich also is invaluable for those times when dd is needed to copy partitions between different physical or virtual (in a virtual machine) disks. Without it, you might wonder what exactly is happening in the silence and that especially is concerning when you are retrying an operation that failed previously and it takes a while to complete each time.

Dispensing with temptation

The compact system camera arena is a burgeoning one with many manufacturers having followed Olympus into the fray. In latter months of last year, Nikon finally took the plunge though Canon have yet to do the same. Seeing offers on Olympus E-PL1 kits with a 14-42 mm zoom lens had me tempted, particularly with a price tag of the order of £250. In fact, I even got to looking into the competition too and a shortlist emerged. This also featured the Samsung NX-11 and the Sony NEX-C3 as well as the big brother of the latter, the NEX-5N.

What eventually countered the allure of shiny objects was the question as to why I needed such an item. After all, I already possess a Pentax K10D DSLR and a Canon Powershot G11 and these have been satisfying my photographic needs for a while now. The DSLR may date from 2007 but it is still working well for me and, if it ever needed replacing, I’d be going for another Pentax with the K-5 being a strong contender. The Canon is doing what’s asked of it so the recent launching of the G1 X isn’t so tempting either.

The whole dalliance has me wondering about how photographic equipment changeovers come about. After all, it was around a decade ago with the DSLR revolution was in the offing if not in progress. Until then, film photography was predominant but it looks as if it got as far as it could from a technological point of view when I look back at what happened. The digital photography area was new and untapped so moving there offered new possibilities and purchases more easily justified. The end result is that very few film cameras are being made nowadays. Ironically, it’s film photography that now is untrammelled terrain for many and it is holding its own too in an era when digital photography predominates.

The same sort of newness that came with digital photography also applies to CSC‘s to a certain extent. From the heritage of half-frame 35 mm film photography, Olympus has fashioned a different type of digital camera: essentially a compact with interchangeable lenses. Was it the fact that I have no CSC that caused me to be tempted and has it happened to others too? Also, is that what got digital photography going in the first place?

It almost feels as if camera manufacturers have to keep bringing to market new models and new types of camera in order to stay in business. After all, Minolta had to sell its camera division to Sony when they failed to get going in the DSLR market quickly enough. The same thing might have happened to Pentax too with the marque passing to first to Hoya, and then to Ricoh after the firm lost its independence.

What doesn’t help is the lack of longevity of camera models. The coming of digital photography has exacerbated this situated with models being launched at a frenetic rate. In the days of film photography, a model could last on the market for a few years and there was once a time when a twenty year lifetime wouldn’t have looked so ridiculous though there were incremental improvements made over that time too. For instance, a Pentax K1000 wouldn’t be exactly the same at the end of its production run as it was at the start though the model number may be the same. That world is gone.

Camera types have done better with the SLR design lasting around 50 years so far. However, mirror-less camera technology is adding pressure like never before. Even compact cameras allow live TTL type viewing and Olympus dug into its film camera heritage to add an interchangeable lens mount to give us the first E-P1. The original PEN cameras were half-frame 35 mm affairs and, appropriately enough, their descendants have small sensors in the micro four thirds mould. Then, there’s Sony’s efforts with translucent mirrors that do not move like their SLR counterparts. Canon tried this in the 1980’s with film cameras but never pursued the genre. After that, there are mirror-less SLR-style cameras from Samsung and Panasonic that make you wonder if a full size equivalent is in the offing with live viewing and an electronic viewfinder. Olympus is doing a teaser advertising campaign at the moment and it has some wondering if an OM-D is in the offing.

In parallel with all this, Sony is making a good impression with their CSC’s, the NEX series. These have APS-C sized sensors like many DSLR’s and in compact bodies as well. However, the feel very much is that of a compact camera and some have complained of a like of buttons on them though the photographic quality is very good. Samsung have gone for the same sensor size in their NX-11 thought they have gone for SLR styling. That may be more suitable for some than having to find settings buried in menus.

In summary, we are in an exciting if unnerving time in camera technology at the moment. On one hand, we are seeing a great deal of miniaturisation and what formerly were still cameras can do movie making as well. The latter may not be an interest of mine and it looks like a time-consuming hobby too. A lot is in flux right now and a recent court case reminded us of the difficulties in doing original work these days with image processing in Photoshop forming the basis of a victorious copyright claim. Because the number of images that are getting created everywhere, it could be hard for some to avoid this one and that could be exacerbated if the government changes the law so that intellectual property claims can be processed in the small claims courts. That sort of thing makes film photography seem attractive and it does seem that it isn’t disappearing either, even if Kodak has its financial problems. Novelty seems to change photographic tastes and it seems that film photography is novel again. It’s a changing world and who knows where it take us. Maybe a new DSLR body might make a good purchase in case CSC’s usurp their place entirely. Photographic technology is interesting yet again.

An avalanche of innovation?

It seems that, almost in spite of the uncertain times or maybe because of them, it feels like an era of change on the technology front. Computing is the domain of many of the postings on this blog and a hell of a lot seems to be going mobile at the moment. For a good while, I managed to stay clear of the attractions of smartphones until a change of job convinced me that having a BlackBerry was a good idea. Though the small size of the thing really places limitations on the sort of web surfing experience that you can have with it, you can keep an eye on the weather, news, traffic, bus and train times so long as the website in question is built for mobile browsing. Otherwise, it’s more of a nuisance than a patchy phone network (in the U.K., T-Mobile could do better on this score as I have discovered for myself; thankfully, a merger with the Orange network is coming next month).

Speaking of mobile websites, it almost feels as if a free for all has recurred for web designers. Just when the desktop or laptop computing situation had more or less stabilised, along come a whole pile of mobile phone platforms to make things interesting again. Familiar names like Opera, Safari, Firefox and even Internet Explorer are to be found popping up on handheld devices these days along with less familiar ones like Web ‘n’ Walk or BOLT. The operating system choices vary too with iOS, Android, Symbian, Windows and others all competing for attention. It is the sort of flowering of innovation that makes one wonder if a time will come when things begin to consolidate but it doesn’t look like that at the moment.

The transformation of mobile phones into handheld computers isn’t the only big change in computing with the traditional formats of desktop and laptop PC’s being flexed in all sorts of ways. First, there’s the appearance of netbooks and I have succumbed to the idea of owning an Asus Eee. Though you realise that these are not full size laptops, it still didn’t hit me how small these were until I owned one.  They are undeniably portable and tablets look even more interesting in the aftermath of Apple’s iPad. You may call them over-sized mobile photos but the idea of making a touchscreen do the work for you has made the concept fly for many. Even so, I cannot say that I’m overly tempted though I have said that before about other things.

Another area of interest for me is photography and it is around this time of year that all sorts of innovations are revealed to the public. It’s a long way from what we thought was the digital photography revolution when digital imaging sensors started to take the place of camera film in otherwise conventional compact and SLR cameras, making the former far more versatile than they used to be. Now, we have SLD cameras from Olympus, Panasonic, Samsung and Sony that eschew the reflex mirror and prism arrangement of an SLR using digital sensor and electronic viewfinders while offering the possibility of lens interchangeability and better quality than might be expected from such small cameras. In recent months, Sony has offered SLR-style cameras with translucent mirror technology instead of the conventional mirror that is flipped out of the way when a photographic image is captured.  Change doesn’t end there with movie making capabilities being part of the toolset of many a newly launch  compact, SLD and SLR camera. The pixel race also seems to have ended though increases still happen as with the Pentax K-5 and Canon EOS 60D (both otherwise conventional offerings that have caught my eye though so much comes on the market at this time of year that waiting is better for the bank balance).

The mention of digital photography brings to mind the subject of digital image processing and Adobe Photoshop Elements 9 is just announced after Photoshop CS5 appeared earlier this year. It almost feels as if a new version of Photoshop or its consumer cousin are released every year, causing me to skip releases when I don’t see the point. Elements 6 and 8 were such versions for me and I’ll be in no hurry to upgrade to 9 yet either though the prospect of using content aware filling to eradicate unwanted objects from images is tempting. Nevertheless, that shouldn’t stop anyone trying to exclude them in the first place. In fact, I may need to reduce the overall number of images that I collect in favour of bringing away only good ones. The outstanding question on this is can I slow down and calm my eagerness to bring at least one good image away from an outing by capturing anything that seems promising at the time. Some experimentation but being a little more choosy can  save work later on.

While back on the subject of software, I’ll voyage in to the world of the web before bringing these meanderings to a close. It almost feels as if there is web-based application following web-based application these days when Twitter and Facebook nearly have become household names and cloud computing is a phrase that turns up all over the place.  In fact, the former seems to have encouraged a whole swathe of applications all of itself. Applications written using technologies well used on the web must stuff many a mobile phone app store too and that brings me full circle for it is these that put so much functionality on our handsets with Java seemingly powering those I use on my BlackBerry. Them there’s spat between Apple and Adobe regarding the former’s support for Flash.

To close this mental amble, there may be technologies that didn’t come to mind while I was pondering this piece but they doubtless enliven the technological landscape too. However, what I have described is enough to take me back more than ten years ago when desktop computing and the world of the web were a lot more nascent than is the case today. Then, the changes that were ongoing felt a little exciting now that I look back on them and it does feel as if the same sort of thing is recurring though with things like phones creating the interest in place of new developments in desktop computing such as a new version of Window (though 7 was anticipated after Vista). Web designers may complain about a lack of standardisation and they’re not wrong but this may be an ear of technological change that in time may be remembered with its own fondness too.

Adding a new hard drive to Ubuntu

This is a subject that I thought that I had discussed on this blog before but I can’t seem to find any reference to it now. I have discussed the subject of adding hard drives to Windows machines a while back so that might explain what I was under the impression that I was. Of course, there’s always the possibility that I can’t find things on my own blog but I’ll go through the process.

What has brought all of this about was the rate at which digital images were filling my hard disks. Even with some housekeeping, I could only foresee the collection growing so I went and ordered a 1TB Western Digital Caviar Green Power from Misco. City Link did the honours with the delivery and I can credit their customer service with regard to organising delivery without my needing to get to the depot to collect the thing; it was a refreshing experience that left me pleasantly surprised.

For the most of the time, hard drives that I have had generally got on with the job there was one experience that has left me wary. Assured by good reviews, I went and got myself an IBM DeskStar and its reliability didn’t fill me with confidence and I will not touch their Hitachi equivalents because of it (IBM sold their hard drive business to Hitachi). This was a period in time when I had a hardware faltering on me with an Asus motherboard putting me off that brand around the same time as well (I now blame it for going through a succession of AMD Athlon CPU’s). The result is that I have a tendency to go for brands that I can trust from personal experience and both Western Digital falls into this category (as does Gigabyte for motherboards), hence my going for a WD this time around. That’s not to say that other hard drive makers wouldn’t satisfy my needs since I have had no problems with disks from Maxtor or Samsung but Ill stick with those makers that I know until they leave me down, something that I hope never happens.

GParted running on Ubuntu

GParted running on Ubuntu

Anyway, let’s get back to installing the hard drive. The physical side of the business was the usual shuffle within the PC to add the SATA drive before starting up Ubuntu. From there, it was a matter of firing up GParted (System -> Administration -> Partition Editor on the menus if you already have it installed). The next step was to find the new empty drive and create a partition table on it. At this point, I selected msdos from the menu before proceeding to set up a single ext3 partition on the drive. You need to select Edit -> Apply All Operations from the menus set things into motion before sitting back and waiting for GParted to do its thing.

After the GParted activities, the next task is to set up automounting for the drive so that it is available every time that Ubuntu starts up. The first thing to be done is to create the folder that will be the mount point for your new drive, /newdrive in this example. This involves editing /etc/fstab with superuser access to add a line like the following with the correct UUID for your situation:

UUID=”32cf775f-9d3d-4c66-b943-bad96049da53″ /newdrive ext3 defaults,noatime,errors=remount-ro

You can can also add a comment like “# /dev/sdd1” above that so that you know what’s what in the future. To get the actual UUID that you need to add to fstab, issue a command like one of those below, changing /dev/sdd1 to what is right for you:

sudo vol_id /dev/sdd1 | grep “UUID=” /* Older Ubuntu versions */

sudo blkid /dev/sdd1 | grep “UUID=” /* Newer Ubuntu versions */

This is the sort of thing that you get back and the part beyond the “=” is what you need:

ID_FS_UUID=32cf775f-9d3d-4c66-b943-bad96049da53

Once all of this has been done, a reboot is in order and you then need to set up folder permissions as required before you can use the drive. This part gets me firing up Nautilus using gksu and adding myself to the user group in the Permissions tab of the Properties dialogue for the mount point (/newdrive, for example). After that, I issued something akin to the following command to set global permissions:

chmod 775 /newdrive

With that, I had completed what I needed to do to get the WD drive going under Ubuntu. After that IBM DeskStar experience, the new drive remains on probation but moving some non-essential things on there has allowed me to free some space elsewhere and carry out a reorganisation. Further consolidation will follow but I hope that the new 931.51 GiB (binary gigabytes or 1024*1024*1024 rather the decimal gigabytes (1,000,000,000) preferred by hard disk manufacturers) will keep me going for a good while before I need to add extra space again.

Another avalanche of new DSLR’s…

Pentax K20D

A flurry of new DSLR announcements came out today; they seem to come in droves when they do arrive but I reckon that upcoming photography shows might have something to do with it. Canon replaced its entry level offering with the 12.2 megapixel EOS 450D. Yes, I know that megapixels aren’t everything but a goodly number does make a rather good impression and Canon’s range looks a bit lop-sided again with the entry level DSLR on the surface of it having the potential for recording more detail than the next one up in their range, the EOS 40D. It almost seems that it would have been more sensible to delay the arrival of that camera until after the 450D and give enthusiasts a really impressive option. As it stands, they might end up playing into the hands of Nikon with its D300, a strong contender if I were on the market looking for a DSLR. Pentax displays no such idiosyncrasies with it 10.2 megapixel K200D and 14.6 megapixel K20D, and Samsung has also presented their variant of the latter: the GX200. It will be interesting to see reports of how all of these new arrivals perform. Launches like this do not take long to make your once shiny acquisitions look dated and that fate certainly seems to have befallen my K10D. For some reason, that reminds me that my trusty old EOS 10D needs to be sent away for cleaning, a job that has been on the to do list for while.