HP Pavilion Boot Loop Problem

Yesterday I ran into a devil of a time with a HP Pavilion slimline workstation at work. This machine was beyond it’s warranty with HP, so no help from them. I had a machine that presented these symptoms:

  • Computer powers up normally.
  • All BIOS-level diagnostics pass.
  • No error codes or beep codes whatsoever.
  • Once the HP BIOS Splash screen fades, the computer should boot into Windows. In this case, Windows 7. It does not. The computer reboots into the HP BIOS Splash screen. Ad infinitum.
  • You can enter BIOS Setup, you can also access the Boot Menu to select other boot sources, however the F11 key to start System Restore is unresponsive.
  • All first-tier efforts to clear the error were taken. BIOS reset to factory conditions, as well as holding down the power button to clear the power supply controller. None of these resolved the issue.

I then plugged in a copy of Knoppix that I downloaded and installed on a USB memory stick. I could have also burned the ISO file to a DVD and used that as well, but the USB was handy. When I use Knoppix this way, I like to enter this “Knoppix Startup Cheatcode” into the prompt right after it boots: “knoppix 2” (without quotes, of course) and this starts the Knoppix system in  the INIT 2 run level, which is single-mode text only interface. I don’t need X-Windows, and in this case, that just gets in the way.

Once at the CLI for Knoppix, I figured the boot flag, the boot manager, or the MBR was shot for the primary partition on the hard drive in the machine. Diagnostics indicated that the primary hard drive was fine, so it wasn’t a physical failure in the HD. I knew that the first (and only) hard drive in systems like these were most likely /dev/sda, you could search the “dmesg” log if you have doubt on where in the /dev the primary hard drive is. Knoppix has the “fdisk” command, so that was my next stop. I knew that this particular HP machine had a Windows Recovery partition stuffed in it, so when I started “fdisk” I displayed the partition map and there were three partitions: /dev/sda1, /dev/sda2, and /dev/sda4. I looked at the sizes and figured that the biggest one was the damaged partition, the middle one was probably for swap or scratch or something, and the last one seemed sized properly for the recovery partition. Honestly it was a guess. I turned the bootable flag on for /dev/sda4 and then off for /dev/sda1, then wrote the partition map to disk and then issued the command “shutdown -r now” to reboot out of Knoppix. Technically you could have just unplugged the machine, but I’m a big fan of orderly shutdowns even when the consequences are irrelevant – it’s a good habit to have.

The machine booted to the HP BIOS Splash screen, and then Windows Recovery started. Once the recovery partition got going I noticed a cutesy HP menu appeared offering me a selection of options. I started out with the simplest option which was something like “Microsoft Windows Boot Recovery” and it ran for maybe a second and then offered to reboot. I went for the reboot and that fixed the issue. Windows started but instead of a regular startup it went to the recovery menu, which I found fine since that was where I was going to go anyways by pounding the F8 button like a madman. I selected “Safe Mode With Networking” and then plugged in my USB memory stick containing TRON and got TRON working on the system.

Once TRON was done, I rebooted and let chkdsk naturally freak out about the structure of the NTFS partition in /dev/sda1. Chkdsk did what it had to do, and the system booted normally. I then set it for redeployment.

I figure if anyone else has this issue, this blog post might be helpful. If it helped you out, and you’re willing, maybe dropping a wee tip in Bitcoin or Dogecoin would definitely be appreciated.

OS Tryouts 2: Linux Mint 17

As part of my brief tour through some alternative operating systems I uncorked and tried out Linux Mint 17. So far for all the different systems I’ve tried, this was the most pleasant and simple installations that I’ve had so far. The system boots up into a Live CD environment, letting you try before you buy. I also found the lack of “Scary Text” during the system startup to be a very nice touch. When the OS gets started it works well out of the box. X Windows with the window manager works as it should, without any misgivings. The updater worked well from the first pass and only required one pass to get all the updates that the system needed. The application suites provided worked really well, LibreOffice, a host of web browser choices, but the only thing that was missing was a Calendar application. I thought about iCal and how well that works with Exchange, and wondered if there was an app in the Linux space that could do something similar. My admittedly cursory search didn’t yield any results. Arguably it is a non-issue as the entire Exchange experience for me can be done on the web, so pffft.

There really wasn’t much to write about Linux Mint 17. The OS got a green star on my selection board and led to the disposal of PC-BSD. Next up are Elementary OS and CentOS. I suspect that the last one will be a boondoggle, but only time will tell.

Tag Painting in Day One Journal

I’ve been really enjoying DayOne and they have recently updated their app so that the iPad, iPhone and Mac Apps can all create and manage tags. What’s been missing is a way to blast in tags based on keywords.

In this example, every time I have a journal entry with “Scott” in it, I want it to be tagged “Scott”.

Here’s how I did it:

1) Open Terminal, go to ~/Dropbox/Apps/Day One/Journal.dayone/entries

2) FOR FILES THAT DON’T HAVE TAGS, A TAG SECTION, PAINT THE SECTIONS WITH THE TAG

find . -print0 |xargs -0 grep -L “<string>Scott</string>”|xargs grep -l “Scott” |xargs grep -l “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags:Key string ‘Scott'” file

3) FOR FILES THAT DON’T HAVE TAGS, DON’T HAVE A TAG SECTION, CREATE TAG SECTION

find . -print0 |xargs -0 grep -L “<string>Scott</string>”|xargs grep -l “Scott” |xargs grep -L “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags array” file

4) Then go back to #2 and re-run it. Everything that has your text should be tagged with the text you choose.

Swanky! The only thing you have to watch out for here is the little l (little ell) looks a lot like a capital I (capital-eye) – might be best to copy this into a browser and set the font to Courier just to make sure before you run it, also, the last xargs does the changes, so skipping out on that might be smart. I can’t make any guarantees that it’ll work, but as far as I can tell, it works great!

YMMV. Careful.

Slogger

Memories.Slogger

Every once in a while I run across something I’ve seen before but ignored accidentally until I see it in great big headlines and neon and stop to pay attention to it and discover that it does something I really really want. This particular afternoon it was the product Slogger from Brett Terpstra. The software is a Ruby script, and Ruby is a delightful programming language that I’ve had the pleasure of dabbling in. Nowhere near the level of Brett and the people who help him, but here and there, little things.

The need came from a simple Google query, IFTTT and Day One. Looking for some way to bridge that divide between the automatic web service that I’ve fallen in love with, IFTTT and Day One, the journaling software that works quite well and renders DropBox a “Killer App”. Dropbox is the glue that keeps my Day One system together, on my laptop, my desktop, and all my mobile devices. When I found Slogger it was a definite Eureka moment, the answer all in one place. I downloaded the code as the author describes and tried to set it up.

Monumental fail. Pieces everywhere, error codes puking on the screen faster than I could read, pages and pages of interpreter and compiler errors, all surrounding one “Ruby Gem” module called hpricot. I knew why this was fail-town for me, it was because I had installed XCode CLI tools in order to get the mac_google_authenticator PAM module built. That CLI package rendered my system retarded when it came to processing gem requests. In the Ruby world there is a system established for distributing software written in Ruby, it’s called ‘gem’ and you run it much like apt-get in Ubuntu, it’s really quite straightforward and never has given me fits – until. Everything was complicated by the fact that I couldn’t really find where XCode was on my machine, all the likely targets to search didn’t have anything relevant and my find command returned pages of errors and I didn’t have the patience to pick through a thousand lines of “Permission Denied” to find the one spot where the file was hidden.

Didn’t need to complain, as I knew the solution. Download XCode for real. So off to Apple, download the monster and install it. That satisfied hpricot, and everything else installed quite nicely. I set Slogger up, pointed it at my Dropbox and configured the plugins that I wanted. The initial run crashed and burned but I figured out why, it was an errant space in the line that points to the Day One folder, a symbolic link fixed that and I was again off to the races. Of all the plugins that I configured these were successful:

  1. BlogLogger
  2. facebookifttt
  3. goodreadslogger
  4. lastfmlogger
  5. pocketlogger
  6. rsslogger

Then there were the plugins I tried to configure but couldn’t:

  1. fitbit
  2. flickrlogger
  3. getgluelogger

The primary problem with the fitbit plugin was that fitgem, the Ruby assistant program that you have to install is a phantom. You install it, it’s successful, and then it’s gone. No trace of it exists. You try again, poof, nowhere. Plus for the plugin setup there are API codes, User codes, and oAuth codes. I get the reasoning behind all of them and getting most of them was not an issue. I felt a little awkward creating an “Application” for just myself, it seems kind of a waste of effort to ferret all these bits and peices into a semiformal request procedure, but doing it wasn’t hard or cost anything, so what the hell. The part where it all falls apart for fitbit is where you have to get the oAuth token, since fitgem never worked and it’s invocation from slogger should have opened a web browser and asked for my approval, all of that never happened. I tried to be sporting and do the heavy lifting myself but all I did was irritate the API for fitbit and I figured, what the hell, I got most of what I was after and moved the fitbit plugin into the “unused” folder and forgot all about it. Abandon ship, y’arrrr!

Flickr is a pain in the ass. It’s Yahoo and as such, it’s kind of an Internet leper. You need your Flickr number, there’s a site that makes that easy, except it doesn’t work. Flickr username? Feh, either the one in Flickr or your linked Yahoo ID is meaningless. I half figured it was in the URL anyways, but then I thought about it and I don’t really use Flickr all that much beyond a solitary IFTTT rule and that’s precarious as it is. The only attractive part of Flickr is they gave out 1TB of storage. Still lepers tho. So, abandon ship! Y’arrrrr!

GetGlue was the last great effort. Much like Klout, it’s a site that makes sense sort of, but the name is utterly silly. GetGlue. What the hell? Why? Glue has nothing to do with TV or Movies. The only connection I could think of was celluloid and horses-processed-into-glue sort of connection. They give away stickers, what a wonderful bit of pollution that is, and as a gimmick seems dumb. The plugin needs an RSS feed for the GetGlue Activity Stream. It appears as though the GetGlue folks have moved away from RSS and towards “widgets” which seems stupid as in this application RSS is the answer and widgets are worthless. Alas, Google searching for the RSS feed method was fruitless. I was half hoping for something like http://getglue.com/user/bluedepth/feed.rss, where I could just craft it up and be on my merry way. No. You have to “View Source” to find it, which is stupid because that is so full of CSS flotsam and jetsam as to be utterly incomprehensible. Again, my ardor for that particular service was fog on a hot day. I don’t need it. I don’t use it. Whatever! Abandon ship! y’arrrrr!

So I tried the slogger script, it failed, tore out fitbit goop and then it worked. Then I went into my Day One app and mopped up all the mess that testing had made. The only oddity I noticed was the BlogLogger completely missed out on the text on my WordPress site that was between pre tags. Meh. Not really a reason to kick the entire thing to the curb, just something to honestly stop using. HTML is a right bastard, almost all of the time. CSS is a filthy abomination, but we won’t go there.

I would say that tonight everything will work as it should for Slogger, but I have to race to work tonight to turn everything off because work is going to exit-stage-left when it comes to the Internet. They are turning the entire thing off, at least for a few hours. I can’t wait for tomorrow, there will be lulz.

So, to Mr. Terpstra, thank you for slogger. I’m sorry the plugins didn’t work, that fitgem was a phantom, but at least most of what I wanted worked. So we sound a victory cheer, sort of. Yaaay!

Bandinage in Robin Hood’s Barn

HexedWow, what a long strange trip that was! I’ve got a lot of my amateur photography and I’ve been kicking around the notion of placing it all on my host and sharing it through my blog somehow. I started this sad trip with Pixelpost, then looked around for other LAMP scripts that could work after Pixelpost belly-flopped and died on impact. The issue I had with Pixelpost was trying to mass-import 218 pictures of my two cats. The software just couldn’t cope. So after a while trying to hammer a square peg in a round hole I just gave up altogether.

Then it struck me that I could use my WordPress blog maybe. I had a dim memory about something about Galleries. I can store as much as I like on my host and there’s no bandwidth issues so why not? So I did some reading in the Codex and well, there you go! Create a new Page, add Media, create a new Gallery and it’s EXACTLY WHAT I WANTED. Then I happened to notice JetPack and looked in there and it has Carousel feature which improves the standard Gallery control for WordPress. WOW! It was everything I wanted and it ate all 218 files without blinking and making new pages is a snap! Adding and removing pictures from the Galleries is just as easy.

So all that way and all that time blown out trying to get a weak system to behave itself and the answer was just under the covers in WordPress all along! I am exceptionally pleased. 🙂 Thanks all you wonderful ladies and gentlemen at Automattic! Thankee-sai!

You can find these galleries on the main menu of my Blog, under the title of Photo Galleries. I hope you enjoy them!

photo by: Nicholas_T

Limit Login Attempts Plugin

IMG_0025I recently added to my WordPress blog security now that blogs like these are being targeted by botnets. I’ve found a great plugin called “Limit Login Attempts” which allows me to set lockout values to people who try to guess what the ‘admin’ account password is.

First, lets just say that the level of entropy in my admin accounts is so high that there isn’t enough time left in the Universe to try every combination – but that being said, my values for this plugin would make this a non-issue. I give people 4 attempts to try the ‘admin’ account, after that they are locked out for 1440 minutes, a day. If they lockout twice, the lockout penalty goes to 720 hours, or a month. There is 4320 hour span until retries are reset, that’s 6 months.

Of course, the filter also captures the IP address, so I’m going to look into getting a IP blacklist plugin and adding these captured IP addresses to that blacklist. They’ll never be allowed to my blog. This line of reasoning led me to think about an immune system for the Internet. If an IP does something wrong, it is blacklisted and that fact is then sent to every other site and they blacklist it as well. One false move and you are suddenly banished from the network. I think this would radically change how people behave online. There would definitely be a lot of noise raised when people are suddenly unable to communicate with any host whatsoever because their systems were filthy, compromised, or malevolent. That would add a certain value of responsibility. It would only be a little bit more to establish a site like Digg where people vote on the malevolence of comment traffic, putting trolls right along with botnets and black-hats, out in the cold, banished where they all belong.

I can smell an RFC forming. 🙂

photo by: katerha

WordPress Security

Bank vault doorI run a gaggle of WordPress blogs, both for personal reasons and for work reasons. My SupportPress site runs on WordPress.org and the host I’ve been using all along, iPage sent me an email informing me that they have detected a botnet-sourced cyberattack directed at the login pages of WordPress.org installations. They also informed all their customers that they have installed network limits on these attacks, but that even though the attacks have been greatly reduced, that it shouldn’t lead to a flagging of security vigilance.

No time like the present to get things installed on all my WordPress blogs. The first thing I can think of since all my passwords are 16 to 20 characters long, randomized, stored for me in 1Password, and stored in such a way that even I don’t know them – is to install a plugin called Limit Login Attempts to all the WordPress blogs I manage. This will prevent people from screwing up their login attempts and it will email me when they try. So far this blog is covered and I don’t really expect any problems here.

Thanks to social networking, especially Twitter and my good friend @wyrdsmyth, and my hosting provider iPage I have been protected all along. More security is usually a good thing and in this case, warranted with this extra plugin. Next stop are all the other blogs I manage.

photo by: walla2chick

Nook HD: Built for Sluggish Annoyance

47:366(Y2) - HungeringI really would like Apple to come out with a iPad Mini with Retina display. I’m quite tired of this Nook HD. It’s not very user-friendly and definitely not me-friendly. I don’t want to take a hammer to the device but when I use it, I sort of do.

So I was online to a site that lets you browse various fan-written fiction stories and they have a feature where you can download epub files, so I did so and saved it to my Dropbox. Then I went into Dropbox app on my Nook HD and went to go look for it. The Wifi on the Nook HD is a flaky pile of junk so that took way longer than it should have. Once I found the file I wanted I downloaded it to my Nook because the only other way to get it in there is to pop the MicroSD card, root around for a universal adapter and then put it in that way. That’s annoying, I’d much rather just be able to tap and download, like I would with an iPad Mini.

I downloaded it from my Dropbox and it ended up somewhere in my Nook’s own storage, which I hate to use, I much prefer my MicroSD plugged into the Nook instead, but there is no way to tell it where you want it to store the files. So I had to find another app called OpenExplorer which has an awful interface but lets you move files around the Nook.

Then the Nook library was confused about where I put that file. Every time I went to go look for it and tap on what it found, I’d be sent to the Wifi activation screen, where I would turn it on (why?) and then nothing. Nothing more than that. When I went back to the search and tapped on my file, it told me “File is not present.” and that was that.

I’ve never been happy with the Nook HD user interface. I bought it because it was cheap and supported Barnes & Nobles but really I think I would have been better off getting an iPad Mini. I regret this Nook HD. It could be so much better if only the B&N User Interface wasn’t so fascist. That’s what it really is. B&N doesn’t trust anyone with anything so they make it impossible to use beyond the B&N Book Experience. I don’t want all my ebooks at B&N, I’ve got thousands of ePub files all on my own – could I upload them and locker them at B&N? Of course not. That’s what the MicroSD card is for. So what value does the B&N store have for me? Little.

So is there any way I could get ePubs from Project Guternberg? Nope. I have to find some other way to get them, like on my iPad and then use Dropbox and OpenExplorer to… it’s way too much work. I’m tired even thinking about it.

So, if and when Apple decides to sell a iPad Mini Retina I’ll put all my Nook stuff on eBay and save up for the iPad Mini Retina. At least iOS respects me and I don’t feel like a criminal trying to cajole Android to give an inch.

I still don’t know why people think Android is any good. Wretched system.

photo by: Nomadic Lass

Burning Sage

Holy Pickled Pomegranate Batman !I just received my invitation to attend Sage Summit 2013 in Washington, DC from July 23rd to the 26th at Gaylord National Hotel and Resort.

Since Sage dropped the hot potatoes it was juggling, this yearly pilgrimage is now utterly laughable and irrelevant. Not only will I not go to Washington, DC in the pit of Summer but I will definitely not be going to another Gaylord property. Those “resorts”, especially the abomination in Nashville Tennessee is a crime against humanity and an insult against nature.

My “most favored thing” today that I will do is to click the Unsubscribe button to all Sage communications. My interest drops like wet trousers around the ankles of my professional disgust. Tootles!

photo by: recubejim

Starting Out Small

ethernet cablesThere is an issue I have at work, something I’ve written about before in my logs that I’ve found a solution for that I feel I can blog about. I can’t really talk about the why behind all of this, but I can share a technical explanation of how I am addressing this problem. It’s a half-thing, bear with me.

At Western, I’m very interested in the number of open TCP connections that a workstation has open at any one time. I don’t care what state the connection is in, ACK_WAIT to any of the others, if there is a line, I want to know about it. Specifically I want to know how many lines there are. Mac OSX is based on Darwin, and Darwin is based on BSD – so you get a shell to work with when you start Terminal.app. There is a lot of power in the command line interface and once you get the hang of it, it’s really quite useful.

So remote stations, at least two of them I have turned on “Remote Login” in their Sharing applet in System Preferences which enables the machines SSH servers to answer incoming connections. I can use SSH to call up a command line window to those remote stations, feeding them commands. I have done this for a long while for our servers in the office but this is the first time I’ve seriously done this for workstations. So, with this connection established I want to collect the number of TCP connections that machine has established. On the command line there are lots of pieces to get this to work:

First, you need a loop structure so that the command happens regularly: 

while true; do [command]; sleep 60; done

This will run a command every 60 seconds and it will never end unless I send a Control-C character which represents “Break” to the shell.

At first I just needed to count how many connections. You get this number, or at least an approximation of it this way:

netstat -p tcp|wc -l

That calls netstat to list out all the TCP connections, which then I pipe, using the pipe character ‘|’ to another command called wc, which calculates word-counts. I make wc ignore words and just count lines by using the -l switch. I don’t really care what other stations my targets are communicating with, just a count of how many. And yes, technically the SSH connection inflates this by at least one connection, it’s not intended to be forensic.

But something was missing. I need a date stamp. In BSD, there is a command called date, and you can give it a format so you can make date write out the Hours, Minutes, and Seconds the way you want to see them, but date has an annoyance to it. The command date always inserts a ‘newline’ character at the end, so what you’d get is a date, a new line, and your count. It’s okay, but it’s annoying. It would be far better to get rid of that newline character altogether. Enter in the ‘tr’ command, which translates characters. In this case, we tell tr to just delete the newline character, so ask date for the right sort of date, have tr nail off that newline at the end because it’s annoying and…

while true; do date '+%H:%M:%S '|tr -d '\n'; netstat -p tcp|wc -l; sleep 60; done

This outputs a very nicely formatted report on a remote workstation. So now I have datestamps, connection count levels, and when the count gets to a certain number and things happen, I can be faux-psychic.

UPDATE: Apparently I just can’t leave well enough alone. Seeing a slow parade of numbers trot by is rather dull when all I really want to know is when these numbers say, get over 70. So…

while true; do test "$(netstat -p tcp|wc -l)" -gt 70 && (date '+%H:%M:%S '|tr -d '\n'; netstat -p tcp|wc -l;); sleep 60; done

 

photo by: Bull3t