Manually cleaning an Intel (or other TRIM-able) SSD with hdparm

Figured this might be a useful snippet of perl for other folks. When I rebuild my system last Nov, I wiped the drive with the following:
my $a = 0;
while ($a < 312581808) { my $b = 60000; if (($a + 60000) >= 312581808) { $b = ($a % 60000) - 1; }
print "\n$a: ";
`hdparm --trim-sector-ranges $a:$b --please-destroy-my-drive /dev/sdh`;
$a = $a + 60000;
}

To use, mount your SSD on another system (or use a system rescue CD or LiveCD with a new enough version of hdparm) and replace “312581808” with your actual number of sectors (check with fdisk -l or similar) and /dev/sdh with your actual drive.

The tricky parts were:
(1) Figuring out the syntax, although I suspect that it’s better documented now.
(2) Figuring out the 60,000 sector limit (actually 64k/65,536? Dunno. 60,000 exactly worked.) I’m not sure if this is an hdparm limit or an Intel X25M limit.

I resemble that remark…

‘cept I fly AA, so it’s “Platinum” and most of my crazy flying consists of cheap international tickets.

Porpoises rescue Dick Van Dyke

Since it’s been a while since I posted a good “News of the Weird” link…

Porpoises rescue Dick Van Dyke

On screen, Dick Van Dyke has been rescued from untimely death by flying cars and magical nannies. Off screen, the veteran star of Chitty Chitty Bang Bang and Mary Poppins had to rely on the help of a pod of porpoises after apparently dozing off aboard his surfboard. “I’m not kidding,” he said afterwards.

{Checks if it’s April 1}
{Nope}

Sparing my Facebook friends, it goes here instead.

(via AmericaBlog)

Manually installing JDKs on Gentoo

In case it’s useful for anyone else, if you run the ___.bin installer and see this:

bin/java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Check if rt.jar exists in the unpacked directory. If it does not, check if rt.pack exists. If it does, it means that the installer is missing a step.

Rerunning with the command-line options:

"____.bin --accept-license --unpack"

…will fix what ails you by making it unpack those files. If you no longer have the installer, google indicates that there is a program out there called “unpack200” to unpack the .pack files to .jar, but I have not had a chance to try it.

Recovering deleted/truncated files on ext4

Due to a bit of stupidity I spent a lot of time looking into how to recover deleted files on ext3/4 and I thought it would be useful to other folks to pass on the following points after the break.
Continue reading “Recovering deleted/truncated files on ext4”

Vacation Videos: Thailand 2007

Travel Videos from Sept 2009 Italy Trip

Piazza Navona:

More general Italy footage monage

Vacation Videos: Thailand Redshirt Protesters, April 2 2010

Dark Lord of the Petulant?

What is Darth Vader’s diagnosis?

The manipulations of Anakin Skywalker, also known as Darth Vader in the “Star Wars” saga, have long been ascribed to the Dark Side of the Force. Now, psychiatrists suggests that the actions of the Jedi Knight could be used in teaching about a real-life mental illness.

A letter to the editor in the journal Psychiatry Research explores just what is wrong with Vader. French researchers posit that Vader exhibits six out of the nine criteria for borderline personality disorder. Unstable moods, interpersonal relationships, and behaviors are all characteristics of this condition, according to the National Institutes of Mental Health. It affects 2 percent of adults, mostly young women.

via Yahoo Movies


Addendum: I’m clearly not blogging enough when I wrote it as [blockquote] on the first pass…

Spain, not Japan? Seriously?

Apparently There Is A Meat Vending Machine In Spain

Spain is a magical place. How do we know this? Because they apparently have a meat vending machine.

Said vending machine is located outside a 100-year-old butcher shop and allows customers to buy meat around the clock. The vending machine features meats, sausages, sandwiches and other goods on a seasonally rotating basis.

3 Men In A Boat, sort of…

Via Slashdot

Jack Watkins, 25, and engineers Chris Hayes, 24, and Dave Sibley, 25, have succeeded in crossing Italy’s Lake Garda in a huge, inflated bouncy castle. “Great Britain has such a great tradition as a seafaring nation and we really feel we have played no role at all in adding to this,” admitted intrepid waterman Hayes. “That said, it was possibly the most fun we have ever had and we really never believed this most frivolous of dreams would ever be realized.”

This demands an American attempt to do the same. Lake Mead, anyone?

Top 10 Reasons the GOP Would Let the World Be Destroyed by an Asteroid

Too good not to share, too long for facebook, not good enough to spam everyone with… that’s exactly what this blog is for.

Top 10 Reasons the GOP Would Let the World Be Destroyed by an Asteroid

——————————————————————————–

Assume that a huge “planet killer” asteroid on a direct collision course with the earth has been spotted – nine months before its projected impact. President Barack Obama proposes an emergency program, in conjunction with the Russians, to knock the asteroid off course before it destroys our planet. http://news.yahoo.com/s/ap/eu_russia_asteroid_encounter

The Republicans in the Senate promptly mount a filibuster against the enabling legislation, thereby delaying action, leading to the destruction of the planet and to the end of all human life.

Now for the top 10 reasons why the GOP let the world be destroyed:

10. Didn’t want to offend teabaggers who believed Obama was an alien born on the asteroid.

9. Furious over Obama’s refusal to declare the asteroid’s approach an act of terrorism and then bomb Iran in response.

8. Believed tax cuts for the rich would be a more effective response.

7. Just trying to prevent another big tax and spend government program.

8. Said, “Hey, if the asteroid hits in 2010, it will be during the one year gap when there is no inheritance tax, which means we’ll all avoid the ‘death tax!'”

7. Trying to save the world sounded like more of that sissy environmentalism crap.

6. Preferred private enterprise based solutions like corporate sales of anti-asteroid ointment.

5. Refused to accept the scientific consensus on the asteroid’s trajectory until they had absolute proof in the form of the earth’s destruction.

4. Said, “There were no asteroid attacks during Bush’s term. So it’s Obama’s fault and why should we bail him out?”

3. Insurance lobby wanted action delayed until they’d sold more “asteroid policies” (payable only in the event everyone on the planet was killed in an asteroid impact and if claim was then promptly made thereafter).

2. Wouldn’t support Obama’s proposal because the asteroid protection would have applied to illegal aliens as well as U. S. citizens.

And the number one reason why the GOP let the world be destroyed . . .

1. Allowing Obama to save the world could have helped the Democrats in the 2010 and 2012 elections and even the apocalypse was better than that!

Note: If you look closely, you’ll see that there are actually 12, not 10, reasons given. Somehow, when it comes to right-wing lunacy, 10 just isn’t enough.

disclaimer: not original, collected on the internets tubes

via Flyertalk