Technology Tales

Adventures & experiences in contemporary technology

When a hard drive is unrecognised by the Linux hddtemp command

15th August 2021

One should not do a new PC build in the middle of a heatwave if you do not want to be concerned about how fast fans are spinning and how hot things are getting. Yet, that is what I did last month after delaying the act for numerous months.

My efforts mean that I have a system built around an AMD Ryzen 9 5950X CPU and a Gigabyte X570 Aorus Pro with 64 GB of memory and things are settling down after the initial upheaval. That also meant some adjustments to the CPU fan profile in the BIOS for quieter running while the the use of Be Quiet! Dark Rock 4 cooler also helps as does a Be Quiet! Silent Wings 3 case fan. All are components from trusted brands though I wonder how much abuse they got during their installation and subsequent running in.

Fan noise is a non-quantitative indicator of heat levels as much as touch so more quantitative means are in order. Aside from using a thermocouple device, there are in-built sensors too. My using Linux Mint means that I have the sensors command from the lm-sensors package for checking on CPU and other temperatures though hddtemp is what you need for checking on the same for hard drives. The latter can be used as follows:

sudo hddtemp /dev/sda /dev/sdb

This has to happen using administrator access and a list of drives needs to be provided because it cannot find them by itself. In my case, I have no mechanical hard drives installed in non-NAS systems and I even got to replacing a 6 TB Western Digital Green disk with an 8 TB SSD but I got the following when I tried checking on things with hddtemp:

WARNING: Drive /dev/sda doesn't seem to have a temperature sensor.
WARNING: This doesn't mean it hasn't got one.
WARNING: If you are sure it has one, please contact me ([email protected]).
WARNING: See --help, --debug and --drivebase options.
/dev/sda: Samsung SSD 870 QVO 8TB: no sensor

The cause of the message for me was that there is no entry for Samsung SSD 870 QVO 8TB in /etc/hddtemp.db so that needed to be added there. Before that could be rectified, I needed to get some additional information using smartmontools and these needed to be installed using the following command:

sudo apt-get install smartmontools

What I needed to do was check the drive’s SMART data output for extra information and that was achieved using the following command:

sudo smartctl /dev/sda -a | grep -i Temp

What this does is to look for the temperature information from smartctl output using the grep command with output from the first being passed to the second through a pipe. This yielded the following:

190 Airflow_Temperature_Cel 0x0032 072 050 000 Old_age Always - 28

The first number in the above (190) is the thermal sensor’s attribute identifier and that was needed in what got added to /etc/hddtemp.db. The following command added the necessary data to the aforementioned file:

echo \"Samsung SSD 870 QVO 8TB\" 190 C \"Samsung SSD 870 QVO 8TB\" | sudo tee -a /etc/hddtemp.db

Here, the output of the echo command was passed to the tee command for adding to the end of the file. In the echo command output, the first part is the name of the drive, the second is the heat sensor identifier, the third is the temperature scale (C for Celsius or F for Fahrenheit) and the last part is the label (it can be anything that you like but I kept it the same as the name). On re-running the hddtemp command, I got output like the following so all was as I needed it to be.

/dev/sda: Samsung SSD 870 QVO 8TB: 28°C

Since then, temperatures may have cooled and the weather become more like what we usually get but I am still keeping an eye on things, especially when the system is put under load using Perl, R, Python or SAS. There may be further modifications such as changing the case or even adding water cooling, not least to have a cooler power supply unit, but nothing is being rushed as I monitor things to my satisfaction.

Sorting a stalled Windows Update service

30th January 2015

Following a recent family death, I have ended up with the laptop belonging to the deceased and, since it has been offline most of its life, I set to getting it updated. The McAfee security suite was straightforward enough but trying Windows Update produced errors suggesting that it was not working that a system restart was needed. Doing that did nothing so a little further investigation was needed.

The solution turned out to be stopping the Windows Update service and clearing a certain folder before starting it again. To stop the service, I typed in services.msc into the search box on the Start Menu and clicked on the Services entry that appeared. Then I sought out the Windows Update entry, selected it and clicked on the Stop link on the left hand side. After that, I used Windows Explorer to navigate C:\Windows\SoftwareDistribution and deleted everything in there. The, I went back to the Services window and started Windows Update again. That sorted the problem and the system began to be updated as needed.

All of this was on Windows 7, hence the mention of the Start Menu, and the machine is Toshiba Satellite C660 from 2011 with an AMD E-300 APU, 4 GB of RAM and a 320 GB hard drive. Those specs may not be the most impressive but it feels spritely enough and is far better than the lethargic Toshiba Equium A200-1VO that I acquired in 2008 though the HP Pavilion dm4 that I bought in November 2011 probably will travel more often than either of these, if truth be told. After all, it now has 8 GB of RAM and a 1 TB Samsung SSHD along with its Core i3 CPU so it should last a while yet.

Wiping of hard drives with Linux

2nd December 2013

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

26th January 2012

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.

Dispensing with temptation

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.

Dispensing with temptation

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.

Pondering storage options

1st June 2011

The combination of curiosity and a little spare time had me browsing online computing technology stores recently. A spot of CD and DVD burning brought on by a flurry of Linux distribution testing reminded me of the possibility. Because I have built up a sizeable library of digital photos, ensuring that I have backups of them is something that needs doing. A 2 GB Samsung external hard drive is brought to life every now and again for that purpose but the prospect of using Blu-Ray discs has appealed to me. After all capacities of 25 GB for single layer discs and 50 GB for dual layer ones sound not inappropriate for my purposes. However, they aren’t a cheap option at the time of writing with each disc costing in the region of £3-4 at one place where I was looking. The cost of BD writers themselves seems not to be so bad though with a few in the £60-100 bracket; any lower than this and you could end up with a combo drive that reads Blu-Ray discs and writes to DVD’s and CD’s so a modicum of concentration is needed. As attractive as the idea might be, the cost of BD media means that I’ll wait a little while before deciding to take the plunge. The price premium at the moment is a reminder of the way that things used to be when CD and DVD writers first came on the market. It is very telling when discs come packaged in jewel cases, something that you won’t see too often with CD’s or DVD’s.

Another piece of storage excitement that hasn’t escaped me is the advent of SSD hard drives. With no moving parts like in conventional hard drives, they bring a speed boost. Concerns about their lifetimes and the numbers of read/write events per drive would stall me when it comes to storing personal data on them but using them for the likes of operating system files sounds attractive, especially with my partiality to Linux perhaps not hammering drives so much. As with any new technology, there is a price premium though a drive big enough for hosting an operating system can be acquired for less than £100. As with many of my hardware purchase brainwaves, there’s no rush but this is an option that I’ll keep at the back of my mind.

Another appealing notion is the idea of getting a NAS so that files can be shared between a few computers. While I have seen prices starting at just above £70 for single disk enclosures, these generally are a more expensive option than external drives and that’s before you consider the cost of any hard drives. Nevertheless, the advantages of a unit containing more than a single hard drive while operating as a print server for any compatible printer too. When you get to 4 or 5 hard drive trays, then the cost has mounted but that could be when they pay their way too. What reminded me of these was a bookazine on home networking that I recently found at a branch of WHSmith’s and their attractions are subject to the networking side of things being made to work without a drama. Once that’s out of the way, then their usefulness really does appeal.

Mulling over all these brainwaves is one thing but it doesn’t mean that the purse strings will become too loose in this age of economic constraint. In fact, pondering them may serve to staunch any impulse purchases. Sometimes, a spot of virtual shopping serves to control things rather than losing the run of oneself.

An avalanche of innovation?

23rd September 2010

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

19th January 2009

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…

24th January 2008

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.

  • All the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. As regards editorial policy, whatever appears here is entirely of my own choice and not that of any other person or organisation.

  • Please note that everything you find here is copyrighted material. The content may be available to read without charge and without advertising but it is not to be reproduced without attribution. As it happens, a number of the images are sourced from stock libraries like iStockPhoto so they certainly are not for abstraction.

  • With regards to any comments left on the site, I expect them to be civil in tone of voice and reserve the right to reject any that are either inappropriate or irrelevant. Comment review is subject to automated processing as well as manual inspection but whatever is said is the sole responsibility of the individual contributor.