Showing posts with label sysadmin. Show all posts
Showing posts with label sysadmin. Show all posts

Thursday, June 13, 2019

Updating Lenovo T460 BIOS (UEFI, firmware) without a CD on Linux

Some of Lenovo's newer models come with a firmware update distribution compatible with fwupd so you can just do a firmware update directly from the shell.

This is not the case for the T460, which has a bootable ISO, or a Windows installer that ... creates a bootable ISO.

I couldn't find my USB CD/DVD drive so I landed up finding a workaround.

Thursday, November 1, 2012

Network silent (unattended) install of Google Chrome

I recently found myself with the need to push Google Chrome out across all machines in a WDS (Windows Deployment Services) group using MDT (Microsoft Deployment Tools) Deployment Workbench Task Sequences. I needed to do a silent, unattended install of Google Chrome from an offline installer. I still want it to auto-update.

This turns out to be badly documented and the method appears to have changed repeatedly, but once you find the right resources it works well.

Sunday, October 14, 2012

Avoiding PostgreSQL database corruption

TL;DR: Don't ever set fsync=off, don't kill -9 the postmaster then delete postmaster.pid, don't run PostgreSQL on network file systems.

Reports of database corruption on the PostgreSQL mailing list are uncommon, but hardly rare. While a few data corruption issues have been found in PostgreSQL over the years, the vast majority of issues are caused by:

  • Administrator action;
  • Misconfiguration; or
  • Bad hardware

A recent mailing list post asked what can be done to reduce the chance of corruption and keep data safe.


If you think you have a corrupt PostgreSQL database, stop the database server and take a complete copy of the data directory now. See the Corruption page on the wiki. Then ask for help on the pgsql-general mailing list, or for critical/urgent issues contact a profesional support provider.

Do not attempt to fix the problem before taking a complete copy of the entire data directory. You might make the problem much worse, turning a recoverable problem into unrecoverable data loss.


Here's my advice for avoiding DB corruption issues, with some general PostgreSQL administration advice thrown in for good measure:

Wednesday, June 6, 2012

Why don't we have Target Disk Mode for non-Apple machines?

I'm not an Apple fan, but there's one thing that consistently makes me really jealous about their hardware.

Despite generally scary-buggy EFI firmwares in their Intel CPU based machines, Apple's firmwares support what they call Target Disk Mode. This is a tech support and service dream, and has been supported since Apple moved over to "New World" PowerPC machines with their Forth based OpenFirmware, ie for a very long time.

Target disk mode is great for data recovery, OS repairs, OS reinstalls, disk imaging, backups, accessing data on laptops with broken displays without having to rip the HDD out of them, and lots else. It's just great. Unless you have an Apple you don't get it, and there's no longer any good reason for that.

UPDATE July 2012: Kernel Newbies reports that support for exporting SCSI over USB and FireWire has been merged into the Linux kernel. This will make it much easier to produce bootable USB keys that export the host system's hard drives. Unfortunately it's useless with most machines as it appears to require a USB gadget or OTG port, or a FireWire port.

Friday, May 25, 2012

You CAN download legal Windows 7 ISO images, it's just well hidden

UPDATE 2015-04-08: It looks like the ISOs are no longer available from DigitalRiver, or at least not at their old locations, since Windows 7 went EOL.

Yesterday I had a frustrating time after discovering that the one and only non-OEM-contaminated Win7Pro x64 disk I had was faulty - half way through a win7 reinstall. All I wanted was a download of replacement media, as I had a license already. This should've been simple, but no! Microsoft direct you to your OEM or retailer in all documentation on the topic, never even hinting that you can just download the ISOs without needing MSDN.

I even called Microsoft support, which is a mark of desperation if ever I saw one. They were as unhelpful as expected, patronisingly explaining that the license key is from a computer manufacturer so I have to contact them for replacement media. Even though I don't want the OEM's butchered Windows install media, I just want stock win7. I don't want the mangled Windows the OEM supplies, and even if I did they'd only post it to me not offer a download. They also only supply service pack 0, and I needed SP1-integrated ISOs.

I have a license to the product. You can't use the media without a license. The media have no copy protection so it's not like they particularly try to prevent their copying/distribution. Yet the official story is that you just can't download it unless you've bought an new license to a retail version online through Microsoft Store. Pathetic.

After too long digging around the net I found out that, yes, you can just download the ISOs after all. Microsoft just apparently don't admit it or talk about it. That's customer-hostile even for them. Go here:

http://www.mydigitallife.info/official-windows-7-sp1-iso-from-digital-river/

or http://www.mytechguide.org/10042/windows-7-service-pack-sp1-official-digitalriver-download/

... to get service pack 1 ISOs. Legally, from Digital River, MS's online/digital distributor. Yes, that means you must have a valid license and key to use them, as normal.

They even provide SHA1 checksums, which NOBODY seems to publish for Windows ISOs or pretty much anything else in the Windows world.

  • Windows 7 Ultimate SP1 x86 SHA1:
    92C1ADA4FF09C76EC2F1974940624CAB7F822F62
  • Windows 7 Ultimate SP1 (SP1-U Media Refresh) x86 SHA1:
    65FCE0F445D9BF7E78E43F17E441E08C63722657
  • Windows 7 Ultimate SP1 x64 SHA1:
    1693B6CB50B90D96FC3C04E4329604FEBA88CD51
  • Windows 7 Ultimate SP1 (SP1-U Media Refresh) x64 SHA1:
    36AE90DEFBAD9D9539E649B193AE573B77A71C83

I've verified the x64 SP1-U checksum to match what I downloaded from Digital River. I haven't checked the others.

Wednesday, March 14, 2012

Fixing "Jam in Area A" (E3-6) on Xerox Phaser 5500

My Xerox Phaser 5500N has been failing to print with phantom "Jam in Area A" errors for the last few days. No paper is actually jammed in the printer, it just reports a jam after printing the first page. When viewing the jam log or the web interface, the jam code was "E3-6", which is documented in the manual only as "fuser area".

It turns out that the Xerox 5500 has a common failure point - arguably a design flaw - in the fuser exit switch.

Xerox support wanted $210 to come and look at the printer, wouldn't guarantee to even bring appropriate parts, and said it'd cost another $210 plus parts if they had to come back with parts to repair it. They wouldn't talk about the jam code or do any phone support of any kind at all. Payment for the site visit was to be made up front before they'd even book a tech, and they wouldn't give me an ETA before I paid. They don't sell parts, and won't provide service manuals. This made me very, very angry.

Instead of paying Xerox over $400, I paid the supermarket up the road $3 for some super-glue. After removing the fuser I could see that the fuser exit switch lever had broken, so I just glued it back on and got the printer working again. Depending on the nature of the fault, you might not even need the glue.

Tuesday, March 13, 2012

DIY data recovery

While perusing ZDNet Australia I encountered this article about data recovery, which appears to be a thinly veiled piece of advertorial about a data recover firm.

The article pissed me off. It doesn't mention the importance of preventative action like good, well-tested backups. It certainly doesn't bother considering the possibility that you can recover from common cases of data loss yourself or with help from a techie friend, avoiding paying huge sums to the DR firm.

Here are a few tips for recovering lost pictures, documents, etc from a hard drive that's in reasonable physical condition but isn't readable from the computer. The same techniques apply to flash media like Compact Flash, MMC, SD Card, USB memory keys, etc, many of which have the unreliable FAT32 file system on them by default and are very prone to being rendered unreadable by minor file system corruption.

You should not attempt these tips unless you can accept the small risk that you might actually make the problem worse. Most importantly, do not attempt any of these steps if you suspect your hard drive has a serious mechanical fault - say it stopped working after being dropped and now makes sqeaky scratchy noises, it was immersed, it was burned, etc. Attempting to power on a hard drive that's damaged like that will make later recovery harder, so you should take drives with serious physical damage straight to DR pros.

For the other 99% of cases, read on.