2010-11-11

In Defense Of Mr. Rogers

I was reading an article on cracked.com, entitled The 7 Most Random Celebrity Duos Who Hung Out Before Fame which mentions a relationship between George Romero and Fred Rogers, and that Mr. Rogers actually sat through a Dead movie.

Impressed with this, I was inspired to learn more about him, as, like many in my generation, I grew up watching Mister Rogers' Neighborhood.

One link or another led me to a delightful video, where a bunch of wankers on FOX & Friends (no doubt the network's answer to the hags on The View) state how evil Mr. Rogers is:

FOX News Thinks Mr. Rogers is Evil

I don't disagree with the message: most people, especially children, are angry, self-absorbed and selfish twits, whose only chance at 'specialness' is likely growing up to being a commentator on a cruddy TV network.  What this has to do with Mr. Rogers, though, eludes me.

I certainly think the entitlement mentality tightening its stranglehold on our society bites, but that's not what Mr. Rogers was all about.

While the concept is no doubt beyond the grasp of the parties involved with FOX & Friends, Mr. Rogers felt he needn't talk down to his audience; rather,  that they deserved to be treated with the same respect and dignity he, himself, would wish to be shown. 

Coming from the era of the equal rights movements, a guy on TV saying you were alright however you born; whatever color you are, whatever gender you happened to be, was a unique message. It wasn't about achievement or hollow awards and recognition; heck, in our society, quality of effort is rarely rewarded over the spectacle of cheap amusement; Lady Gaga serves to illustrate this, and bad taste in general: I wonder if she would be more the ideal FOX & Friends would prefer for our children. 

Or, perhaps, we need more animated dinosaurs?  More violent cartoons? 

Should we simply tell children the truth about themselves... that they're nasty little brats whose existence is likely to never amount to much more than breeding the next batch of cretinous parasites, who, in turn, will simply grow up to occupy space, as well?

I find it odd there'd be this sort of attack on Fred Rogers from FOX & Friends.

Here's a guy who was a devoted Christian his whole life; an old white man; straight, married, wealthy, hard-working (and pushing the same on his show, where the characters he visits all must work hard to obtain what they have).

But, then, Mr. Rogers was also truly a devout Christian: not just in word alone, but deed as well. 

According to those who knew him, he was the same off set as on; a kind, caring, compassionate human being, who looked for the good in everyone, no matter how cruel and petty they insisted on being. 

This, no doubt, is what must have fueled the ire of the crass hypocrites over at FOX News: such an alien thing, this looking for the positive attributes buried under the cesspool of hostility and malice in people, versus looking for someone or something to blame all of one's own shortcomings and faults on.

Fred Rogers is an aspiration for people with a soul; even for cynical, sarcastic people like me, it's encouraging to know there was someone like him: someone who made an effort to find that one thing good about you, no matter how much of a shit you are.

It's sad such people are so rare in our society, and sadder still they're mocked for displaying the very traits many of the hyenas barking from under the flaps of the conservative tent profess to admire and value.

From PBS' FAQ about how Mister Rogers' Neighborhood helps children get ready to attend school,

"Just as importantly, the programs foster the social and emotional "tools" for learning self-esteem, curiosity, self-control, the ability to pay attention, to handle mistakes, and deal with anger. Children are more able to use their energies for learning if they feel good about themselves, can deal with their feelings, and get along with others."

No doubt useful for life in general, too.  What a shame Gretchen Carlson wasn't fortunate enough to have watched Mr Rogers' Neighborhood when she was a child.

Further reference and perspectives:

PBS FAQ about Mr. Rogers
Snopes Article About Mr. Rogers
Time Article on Mr. Rogers
A More Personal Glimpse at Mr. Rogers

2010-09-30

Snagging Youtube Videos With RSS

For awhile now, I've been using the very excellent youtube-dl.py script to do a batch download of Youtube videos, every couple of weeks. (Must keep up with spill.com and TheOnion releases, after all.)

It became somewhat tedious, clicking through my subscriptions to cut and paste the new videos into a text file to get; especially when copying the URL directly on the subscriptions page yielded an unwieldy mess of URL garbage in addition to the video hash, requiring one to actually click through and copy from the URL on the video page.

Following a friend's suggestion to try using Youtube's RSS feed, I've found it really is much easier to simply use TheYoke to pull it.

I'm somehwat a n00b when it comes to RSS, but now my set up is to simply have my subscriptions piped into my toget.txt file, and then just delete the vids I don't want. It's terribly slow checking through video channels (I'm subscribed to a good many), so I'm using the subscription url:
http://gdata.youtube.com/feeds/base/users/[MY_USERNAME]/newsubscriptionvideos

The only downside is it just shows my account name "subscription" videos, versus having each channel as a feed, which shows the name. So, to know whether "Gay School Teacher Spanks Glenn Beck With A Swastika" is from PJTV, TheYoungTurks, or TheOnion, one still has to glance at the subscription page, but it's still quite a bit faster than manually cutting and pasting everything.

For people who know they're going to want everything on their subscribed channels, this all can obviously be very easily automated, with a single script and cronjob.

However, I prefer a little manual intervention, because I don't always want all the vids from channels I'm subscribed too (Chef Todd Mohr being a good example: His videos can be hit and miss. Also, USNW's... calculus is simply too beyond me. ;_) ) and my ISP tends to be rather bully-some when it comes to bandwidth usage during day 'prime time' hours.

My method is to add the subscription url (above) to ~/.theyoke/feed file, and then:

~$ theyoke --link --no-feedname >> toget.txt
~$ vi toget.txt
[ dd for each title line for video I want, 2dd for each title+url I don't ]
~$ tubesnake.sh

The last is simply a script file with:
youtube-dl -i -w -c -o %\(uploader\)s-%\(stitle\)s[%\(id\)s].%\(ext\)s -a toget.txt

Reference:

Youtube-dl.py: - For snagging a youtube url.
TheYoke - For snagging an RSS feed from the commandline.
Ubuntu Forum Thread - For setting up TheYoke and youtube-dl.py in a script.
Support Thread For Subscriptions - Using the subscription RSS feed didn't initially work for me; simple fix. (ik80's post)
Youtube's RSS Page - Various valid RSS feeds, doesn't list 'newsubscriptionvideos' though.

2010-04-03

ReadyNAS 600 RAID Recovery with Ubuntu

Assumptions: (you have the following)
Infrant (now Netgear) ReadyNAS 600, Sparc based, kernel: 2.6.17.14ReadyNAS
A Linux system running Ubuntu (would work with live image: Lucid Lynx used for this.) with 4x SATA ports.

Trying to recover data off the disks from a ReadyNAS 600 on Ubuntu is not as straightforward as the existing guides might lead one to believe, especially getting ext2fuse to compile.

First, the guides:
Written specifically for Ubuntu, and succinct. - Useful for an overview.
Recovering a failed ReadyNAS 1100 array - Has a bit more information.
Mounting Sparc-based ReadyNAS Drives in x86-based Linux - Step by step instructions; this is the most detailed, and the one I'm working off of; please refer to this one to make sense of the rest of this post.

If working off a LiveCD, or a new system, be sure to start off making your editor readable, after opening your terminal.

(This post assumes limited to no Linux experience, beyond being capable of burning an Ubuntu .iso to disc. Anyone attempting recovery of a failed RAID is assumed to have basic problem solving skills and the capacity to learn.)
sudo su
cat >> ~/.vimrc
highlight Normal ctermbg=black ctermfg=white
set background=dark
syntax on
CTRL-D
to exit

Now,
agt-get install libfuse-dev
prior to making ext2fuse.  Doing so should avoid this:

In file included from readdir.c:1:
readdir.h:6:27: error: fuse_lowlevel.h: No such file or directory
In file included from readdir.c:1:
readdir.h:8: error: expected ‘)’ before ‘req’
readdir.c:7: error: expected ‘)’ before ‘req’
readdir.c:46: error: expected ‘)’ before ‘req’
make[2]: *** [ext2fuse-readdir.o] Error 1
make[2]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1'
make: *** [all] Error 2


You will want to do the following when presented with the library errors, but can safely skip steps 6 thru 8.
ln -s /lib/libcom_err.so.2.1 /lib/libcom_err.so
ln -s /lib/libext2fs.so.2.4 /lib/libext2fs.so

What follows are the errors from running make, and the solutions, with reference as necessary. If you don't get the errors on your system, due to newer headers and the like, you can disregard the (non)relevant solution.  Also, I've 'shown my work', so to speak, so as to lend to evaluation whether my solution is correct or not; after all, one shouldn't blindly follow advice from strangers on the intertubes. For the inpatient, simply scroll to the necessary fix.

First compile error:
imager.c:41: error: conflicting types for ‘ssize_t’
/usr/include/unistd.h:221: note: previous declaration of ‘ssize_t’ was here
make[2]: *** [libext2fs_a-imager.o] Error 1
make[2]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1/lib/ext2fs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1'
make: *** [all] Error 2
in /usr/include/unistd.h around line 221 we see:
#ifndef __ssize_t_defined
typedef __ssize_t ssize_t;
# define __ssize_t_defined
#endif
and __ssize_t gets defined in: /usr/include/bits/types.h:180
__STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error.  */
__SSIZE_T_TYPE is defined in: /usr/include/bits/typesizes.h:60
#define __SSIZE_T_TYPE          __SWORD_TYPE
And __SWORD_TYPE is defined in /usr/include/bits/types.h:60
# define __SWORD_TYPE           int
So, the solution is to simply comment out the redefinition in imager.c
lib/ext2fs/imager.c
#ifndef HAVE_TYPE_SSIZE_T
#ifndef __FreeBSD__
typedef int ssize_t;
#endif
#endif
Solution:
vi lib/ext2fs/imager.c
//typedef int ssize_t;


Next error:
In function ‘open’,
    inlined from ‘check_mntent_file’ at ismounted.c:153:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[2]: *** [libext2fs_a-ismounted.o] Error 1
make[2]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1/lib/ext2fs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1'
make: *** [all] Error 2
From here: https://wiki.ubuntu.com/CompilerFlags:
When using open() with O_CREAT, best-practice is to define a valid mode argument. For the least modes, try using (S_IRUSR|S_IWUSR) first. If that doesn't work as expected in the program, then start adding back perms. For example, user and group: (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); user, group, and other: (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH).
And additionally: http://opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html
So, the simple solution is:
vi lib/ext2f/ismounted.c, around line 153
from:
fd = open(TEST_FILE, O_RDWR|O_CREAT);
to:
fd = open(TEST_FILE, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);

Next (snipped some duplicate lines for brevity):
llseek.c:68: error: expected declaration specifiers or ‘...’ before ‘_llseek’
llseek.c:68: error: expected declaration specifiers or ‘...’ before ‘fd’
llseek.c:68: error: expected declaration specifiers or ‘...’ before ‘offset_high’
llseek.c:69: error: expected declaration specifiers or ‘...’ before ‘offset_low’
llseek.c:69: error: expected declaration specifiers or ‘...’ before ‘result’
llseek.c:70: error: expected declaration specifiers or ‘...’ before ‘origin’
llseek.c: In function ‘_syscall5’:
llseek.c:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
llseek.c:68: error: parameter name omitted
llseek.c:117: error: expected ‘{’ at end of input
make[2]: *** [libext2fs_a-llseek.o] Error 1
make[2]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1/lib/ext2fs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bin/ext2fuse-src-0.8.1'
make: *** [all] Error 2
I found a solution here: http://www.mail-archive.com/sisuite-users@lists.sourceforge.net/msg03353.html:
in lib/ext2fs/llseek.c: around line 66
#ifndef __i386__
static int _llseek (unsigned int, unsigned long,
                   unsigned long, ext2_loff_t *, unsigned int);
static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
                 unsigned long, offset_low,ext2_loff_t *,result,
                 unsigned int, origin)
comment out, and do:
static int _llseek (unsigned int fd, unsigned long oh,
                   unsigned long ol, long long *result,
                   unsigned int origin) {
       return syscall (__NR__llseek, fd, oh, ol, result, origin);
}

With any luck, it'll compile, and you can `make install` now. Then, this command is needed, from a developer post on the Netgear forums:
mdadm --create /dev/md2 -f -c 16 -l 5 -p la -n 4 /dev/sdb3 /dev/sdc3 /dev/sdd3 missing

Modify the above to suit your actual system (fdisk -lu to see your drives). Then, if you're unfortunate enough not to have a clean volume, you've a bit more work to do (this is with 250gb drives):
pvscan
  Incorrect metadata area header checksum
  PV /dev/md2                      lvm2 [691.11 GiB]
  Total: 1 [691.11 GiB] / in use: 0 [0   ] / in no VG: 1 [691.11 GiB]

pvdisplay /dev/md2
  Incorrect metadata area header checksum
  "/dev/md2" is a new physical volume of "691.11 GiB"
--- NEW Physical volume ---
  PV Name               /dev/md2
  VG Name            
  PV Size               691.11 GiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               Epe2Ox-iNYp-T6nY-fD3F-9zag-HWmq-tMs5rq

So, this is the part you shouldn't do unless it's a last resort. (Reference: http://www.tldp.org/HOWTO/LVM-HOWTO/recovermetadata.html)
(volc.txt was created by doing:
dd if=/dev/md2 bs=512 count=255 skip=1 of=nasconfig
and then manually extracting the LVM config with ghex and putting it in a text file (see references at end))


pvcreate --uuid "Epe2Ox-iNYp-T6nY-fD3F-9zag-HWmq-tMs5rq" --restorefile /etc/lvm/archive/c_00000.vg /dev/md2
  Incorrect metadata area header checksum
  Incorrect metadata area header checksum
  Physical volume "/dev/md2" successfully created



vgcfgrestore -f volc.txt c
Restored volume group c

vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "c" using metadata type lvm2

vgdisplay
  --- Volume group ---
  VG Name               c
  System ID             nas-00-xx-xx  1221946398
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                256
  Cur LV                1
  Open LV               0
  Max PV                256
  Cur PV                1
  Act PV                1
  VG Size               691.06 GiB
  PE Size               32.00 MiB
  Total PE              22114
  Alloc PE / Size       22114 / 691.06 GiB
  Free  PE / Size       0 / 0   
  VG UUID               ghNwGu-XNBV-Rnyc-ojT7-D5IE-hRCp-07uygA

vgchange -ay c
  1 logical volume(s) in volume group "c" now active

lvdisplay
  --- Logical volume ---
  LV Name                /dev/c/c
  VG Name                c
  LV UUID                000000-0000-0000-0000-0000-0000-000000
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                691.06 GiB
  Current LE             22114
  Segments               1
  Allocation             normal
  Read ahead sectors     1024
  Block device           252:0


If you're lucky, or sacrificed the requisite virginal nerd while chanting source from the Editor of the Beast, you can now mount and retrieve data, wiser and forever having learned that a NAS device doesn't count as 'backing up'.
Further Reference:
http://www.readynas.com/forum/viewtopic.php?t=14828 - Forum thread on the Netgear forums.
http://www.linuxjournal.com/article/8874?page=0,2 - Format of the LVM metadata; good for creating the .txt file to feed back in.
http://www.akadia.com/services/logical_volume_manager.html - An excellent guide to LVM, with pretty pictures!

2010-03-24

Microsoft programmers need to be shot first.

I finally get the inside joke: Vista is Microsoft's foray into Clockwork Orange type movie-making; except, instead of being entertaining, it simply leaves one with only the homicidal rage.

This sentence shows considerable restraint, and has replaced 20 pages consisting entirely of obscenities.

I've already decided to limit my exposure to Vista/W7 as much as is possible, and am copying off all my data from the Vista system, so I can wipe it and put on a real operating system (it's a toss up between FreeBSD and a linux strain; ashame Haiku is still not an option).

Vista can barely copy.  Removing a directory around 5gb with tens of thousands of files on XP takes nearly no time at all; on Vista, it's still calculating, ('discovering') 5 minutes later.  That's pathetic.

Vista likes to add the current computer name to your credentials for CIFS shares.  That's pretty aggravating; screwing with local security policies 'sort of fixes' it.  Apparently, Microsoft's rightly decided people shackled with its crappy OS are too stupid to properly provide a domain name when required.  Shrug, I got past it.

But, dear reader, this rant is on account of the fact that Vista CAN'T EVEN PROPERLY COPY TO A DEVICE!

Augh!

There's never a good time for your NAS to die, but when you've just filled up almost two terabyte worth of platterverse with valuable data, ... certainly leans towards 'a worse time than most'.

I'm pretty sure my playing with installing silly SCM addons like Git was to blame; no biggie, right?

(Update 2010-03-25: It was a biggie; I lost everything --- my ReadyNAS is one of the Sparc-based ones; I finally coaxed a Ubuntu livecd into compiling ext2fuse so I could deal with the file system that likes 16k page sizes, only to find lvm wouldn't give me any love by finding a valid volume.)

Well, except, my old ReadyNAS doesn't exactly recover gracefully from having its config files manually edited.  No worries, I'll just use the TFPTD recovery method.

Or not.  Well, no worries, then, I'll just yank the CF card out and dump the raw image to it.

Enter The Vista.

Vista CANNOT concurrently copy files!  I'm typing this in 2010.  15 years ago, on a 386, I could copy files to a floppy drive AND a secondary hard drive.  Really!  And... and... just 5 years ago, I could copy files from two optical drives to multiple hard drives, all at the same time... EVEN on Windows XP!

But, here we are, and Vista shits itself ... oh, my, there's my profanity rearing its ugly head again.

I've been backing up what's left on the Vista system to a crappy Maxtor external drive (truly only slightly better than nothing, but since two of the four drives on the Vista system are also dying... gotta shove bits somewhere) and its been at it for some hours.  Trying to copy the firmware for the NAS to its CF kept resulting in errors writing sectors.  The card reader is hooked up to one of the motherboard's usb headers; the external drive is going direct to soldered usb connectors (and not the one in the card reader, nor any other expansion ports <-> headers).

After failing with Sector Edit (from the same guy who wrote Unstoppable Copier --- and which, oddly enough, doesn't keep copying when faced with an error) and even trying to use Hex Workshop's "Open Disk..." tool to try to copy, I gave in and snagged NTRawrite.

It failed.


D:\tmp>NTRawrite.exe
NTRawrite v1.0.1 by Blake Ramsdell


Please type the image pathname: RAIDiator-3.01c1-p6
Please type the diskette drive: M:
Please insert a diskette and press any key.
Copying image file RAIDiator-3.01c1-p6 to floppy drive M.
........................................]
NTRawrite: The request could not be performed because of an I/O device error.

Went through that hoop a few times, until I got a clue, and realized I could just put it on the command line:


D:\tmp>ntrawrite -f RAIDiator-3.01c1-p6 -d M: -n
NTRawrite v1.0.1 by Blake Ramsdell


Copying image file RAIDiator-3.01c1-p6 to floppy drive M.
*****...................................]
NTRawrite: The request could not be performed because of an I/O device error.

If at first you don't succeed, keep trying... (snipped slightly)

D:\tmp>ntrawrite -f RAIDiator-3.01c1-p6 -d M: -n
Copying image file RAIDiator-3.01c1-p6 to floppy drive M.
****....................................]
NTRawrite: The request could not be performed because of an I/O device error.


D:\tmp>ntrawrite -f RAIDiator-3.01c1-p6 -d M: -n
Copying image file RAIDiator-3.01c1-p6 to floppy drive M.
*******************.....................]
NTRawrite: The request could not be performed because of an I/O device error.


D:\tmp>ntrawrite -f RAIDiator-3.01c1-p6 -d M: -n
Copying image file RAIDiator-3.01c1-p6 to floppy drive M.
**......................................]
NTRawrite: The request could not be performed because of an I/O device error.


D:\tmp>ntrawrite -f RAIDiator-3.01c1-p6 -d M: -n
Copying image file RAIDiator-3.01c1-p6 to floppy drive M.
**************..........................]
NTRawrite: The request could not be performed because of an I/O device error.

Good clean fun, especially when one doesn't have any paint to be mesmerized by as it dries.  At this point, logically, I figured it was time to order a new CF card; after all, this one must be corrupted, if nothing can write to it.  But, then... my copy to the external drive finished.  As a ditch effort, I started shutting down all my open windows, in preparation to try a boot disc (Hiren's or a linux livecd, whichever was handier), and figured I'd give it one more go:

D:\tmp>ntrawrite -f RAIDiator-3.01c1-p6 -d M: -n
NTRawrite v1.0.1 by Blake Ramsdell


Copying image file RAIDiator-3.01c1-p6 to floppy drive M.
****************************************]
Verifying image file RAIDiator-3.01c1-p6 with floppy drive M.
****************************************]
Completed!
D:\tmp>

Yup.

Worked without a single hiccup.

System's a core2duo; I'm positive it can handle copying through two usb ports at once. The external drive, of course, is powered with a wall wart, and not via the usb cable.  I have absolutely no explanation for this; while there must certainly be a rational reason involving gremlins and fairy lanes, I'm going with the obvious: Vista's device stack SUCKS.  In the interest of my own piece of mind, I plan on obtaining another CF card, and dd'ing in 'nix while copying to the same external hdd.  I'm betting it'll work without any issues whatsoever, on the exact same hardware.

Data's important.

Eyecandy isn't.

Microsoft's really taken to heart the success of the mediawhore darlings of Hollywood, and crafted their latest OSes to be pretty (debatable) and useless.

I say good riddance; even Apple's running a modified BSD core these days, and Macs have typically been the machines for the absolutely computer illiterate.

Life's too short to waste time with operating systems that can barely copy data.

[This sentence continued the thought about the shortness of life, but my lawyers informed me it entered the realm of 'real threat' and as such, I was forced to remove it.]

2010-03-02

Vista/Windows 7 - Can't Stop Itself From Being Fresh

Here's the scenario:  I've got two folders open, one with sorted folders, and the other one containing over 500 files that need to go into the sorted folders.  Many of the files need minor correcting: say, a file is named SOMEJUNK-And_The_Rest. It needs to be just And_The_Rest.  So, I hit F2, slash off SOMEJUNK and... my file disappears!  It's gone up to the 'A' section of the file list, while my view is still in the 'S' part.  I then need to go to the 'A's, select the file, and move it to the folder with the sorted directories.

This is annoying.  In XP, editing a name left the file where it was, until you hit F5 to refresh the folder, or changed the sort order by clicking on a column name.

Turns out, there's no fix for this behavior in Vista and Windows 7; no setting to revert to not auto-refreshing/auto-arranging Explorer fews.  According to a Microsoft employee:

"Windows Explorer in Windows 7 uses a new custom list view control that doesn't support custom ordering like the old one did. So in folder views you can no longer drag items around to rearrange them. Basically, pretty much nobody used this (except on the desktop, where it is still supported), and re-implementing it in the new virtualized list view wasn't worth the cost.

You can sort the items by any of their properties, such as name, date, etc.

Why do you want to arrange them differently?
"
(source: Brandon Live's post at http://www.neowin.net/forum/topic/813020-rearrange-folders-in-the-user-folder/)

I especially enjoy the last bit; this is a developer on the Windows Desktop team that asserts no one used a feature, and can't fathom why anyone might have wanted it.  Except, a quick google search on terms relating to turning it off reveals quite the opposite: people are butting their heads against this and desperate for a way to turn off this new 'feature'.

Some further digging shows that Microsoft sort of documents this on MSDN:
"By default, the Windows 7 item view does not support custom positioning, custom ordering, or hyperlinks, which were supported in the Windows Vista list view. Use this interface when you require those features of the older view. If, at some later time, the item view adds support for those features, these options will automatically use the newer view rather than continuing to revert to the older view as they currently do."
(source: http://msdn.microsoft.com/en-us/library/dd378351(VS.85).aspx)

So, Vista and Windows 7 both not only get confused and occasionally can't be bothered to refresh media in one's optical drive, but when it comes to folders, there's no way to stop it from refreshing.  There's a very nice explanation from the Classic Shell developer(s) FAQ:
"Can Classic Shell disable the "Auto-arrange" feature in Explorer?
No. The Auto-arrange is not a feature, but rather the absence of the feature to "remember the position of any icon in any folder". As far as I know there is no switch to turn on and the feature has to be implemented from scratch. This is further complicated by the fact that Explorer in Windows 7 uses a new undocumented control "DirectUIHWND" instead of the documented "SysListView32" control like all the versions before it. Most likely when the functionality was moved from the old control to the new, this feature didn't make it.
I understand many people are upset about this (since it worked fine on Vista and before), but I don't believe this can be solved by a shell extension. You have a better chance complaining to Microsoft about it."


I become more disgusted with Vista daily, but there is a work around on it; in a folder where you're working on your files, simply select one and move it 'out of order'.  This prevents Vista from refreshing after every rename --- for that folder, until you close it.  

The long term solution, obviously, is to use a replacement explorer, or, for those adventurous sorts, buy a Mac or run a 'nix and leave the Redmond nightmare behind. 

2010-02-28

Paranoia and Filtility

While trying to figure the reason Vista sometimes can't seem to read optical media, I came across this rather amusing nugget regarding mini-filters, aka file system filters:
"A file system filter driver intercepts requests targeted at a file system or another file system filter driver. By intercepting the request before it reaches its intended target, the filter driver can extend or replace functionality provided by the original target of the request. "
Source: http://www.microsoft.com/whdc/driver/filterdrv/default.mspx

Well, golly, seems sort of scary to me; as if it weren't bad enough having keyboard hooks for any aspiring malware writer to whet their skills with, now Microsoft makes it easy for any skript kiddie to get themselves inserted between me and my data.  

I realize this functionality existed before, but, gosh, it's just so EASY now.  What's eye opening to me, though, is I had no idea about it; it's been around since XP!  

Obviously, the first thing I did after reading about it was to see what was hanging about on my system:
C:\bin\si>fltmc

Filter Name                     Num Instances    Altitude    Frame
------------------------------  -------------  ------------  -----
aswFsBlk                                7       388400         0
PROCMON20                               1       385200         0
aswMonFlt                               9       320700         0
luafv                                   1       135000         0
SbieDrv                                 8        86900         0
FileInfo                                9        45000         0

Huh.  Happily, Microsoft provides a handy reference in the form of an excel spreadsheet for any 'registered' filters: http://www.microsoft.com/whdc/driver/filterdrv/alloc-alt.mspx (File System Minifilter Allocated Altitudes); aswsFsBlk belongs to... Avast.  As does aswMonFlt.  The amusing part is that I only use Avast to scan some large data drops... never for residential shield. (For that matter, I don't use any AV... but I also don't use IE, so... it works.).  It looks like Avast needs its wedge to exist constantly.  This, I think, is the final straw regarding antivirus for me; I'm tossing the lot of them (AVG, Avast, Avira... ) into a vm and scanning from there.

I mean, seriously, why does a program need a filter in place to open and read a file?  When that's ALL I want it to do?  

ProcMON20, of course, is Process Monitor's wedge.  This one makes sense; it needs to monitor all file I/O to show me pretty screens of ACCESS DENIED.  I like that.

luafv, on the other hand, belongs to Microsoft.  This blog post: http://fsfilters.blogspot.com/2010/02/deal-with-luafvsys.html does an excellent job of explaining what it is, and its functionality.  

However, I don't need that; I'm running as Admin, and I want my misbehaving programs to do so with wild abandon!  This one was easy to get rid of; I just had to turn off UAC's virtualization. 

SbieDrv is Sandboxie's wedge. This one's existence makes sense, as well --- except, again, I get annoyed at programs that keep running after I've closed them.  For fun, I wanted to see if I could unload it (since it wasn't running):
C:\bin\si>fltmc unload SbieDrv

Unload failed with error: 0x801f0010
Do not detach the filter from the volume at this time.

Huh; doesn't seem I can.  Certainly there must be some performance penalty, to have every filesystem api call traverse a filter chain, no?  Granted, altitudes decide just what they 'see', but, still... mightn't this be just one more drop in the bucket of what made Vista such a dog?

Moving on, to the last one, we've got FileInfo.  This is simply bloat.  It serves both ReadyBoost and Superfetch: both of which I've disabled.  (This is a decent explanation of it: http://winprogger.com/?p=971)

Despite having them disabled, this filter is still loading, and, presumably, being referenced every time filesystem I/O occurs.

Naturally, I wanted to get rid of it, so, expecting it to behave, I bopped into regedit, and set the service start type to 4... and it still started... which admittedly had me scratching my head.

(DISCLAIMER: Following random advice on the Internet is BAD. Don't do this on your own system.)

So, I took the sledgehammer approach, and simply deleted the service key altogether... and it worked!

As I type this, I get the following Kirsten Dunst Turning Japanese (NSFW) warm and tingly feeling giving result:

C:\>fltmc


No filters loaded


Vunderbar! I can't say it feels faster, but I know my bits appreciate not being fondled quite as much; at least, that's what the voices in my head told me, when I was changing my tinfoil headgear.




2010-02-21

Vista x64 SP1 Doesn't Refresh CD/DVD Drive View (Volume / Directory)

Ah, the frustration of a Microsoft operating system.  This one's got me stumped.

A brief description of the issue:  After ejecting a disc, and putting a new one in, the old directory shows up, and not the one from the newly loaded disc.  This is in Explorer, in a command prompt, and also in FreeCommander.  A procmon watch of Freecommander shows it's calling CreateFile on the drive and getting the old list directly from Windows, and not some cached file.  At least, the caching's not taking place in the userland file manager.  With Imgburn, I can eject and load, have it show stats of the disc (as well as using DVDIdentifier), but Windows Explorer, cmd, and FC all display the stale information.  From some googling, it doesn't look like anyone's found a real solution to this, and it appears to still exist on Windows 7.

The often mentioned fix is:
gpedit.msc
-Local Group Policy
--User Configuration
---Administrative Templates
----Windows Components.
-----Windows Explorer.
Double click on “Remove CD burning features“.
Set the value to “Enabled”

Or, for anyone fixing a system with Home on it:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Create a DWORD, name it NoCDBurning, and put a 1 in it.
The above does fix the issue where Vista sees a UDF disc as blank and wants to format it, but wasn't much use to me.

Another solution which tends to be mentioned is to enable Autorun, which is counterintuitive for those of us who have specifically disabled it.  However, in true Microsoft fashion (and to get a Princess Bride reference in), they tell us, "I do not think that word means what you think it means." and go on to create much confusion.  The following apply to HKLM\SYSTEM\CurrentControlSet\Services\Cdrom and not to Windows Explorer.

http://technet.microsoft.com/en-us/library/cc960238.aspx says AutoRunsAlwaysDisabled "Suppresses the Media Change Notification (MCN) message for particular CD-ROM drives."

http://technet.microsoft.com/en-us/library/cc976182.aspx says Autoruns "Determines whether the system sends a Media Change Notification (MCN) message to the Windows interface when it detects that a CD-ROM is inserted in the drive. The MCN message triggers media-related features, such as Autoplay.
If the MCN message is disabled, the media features that use it do not operate."

This is great, except the official documentation says the upshot of this is, if Media Change Notification isn't enabled, you have to hit F5 or select Refresh to show changes; obviously not the issue here, since hitting F5 or refresh just shows the previous disc directory listing, again.

Am I the only one flabbergasted Vista can't _list the damn contents of a DVD_?! And, this IS Vista (and Windows 7?) specific.  In XP, you might see something almost like this, but deleting the \burn directory would clear it right up.  This also isn't the same issue as Upper and Lower filters by idiotic programs.  This really seems to be some new 'feature' present in cdrom.sys from Vista forward.  The cynic in me would tend to think it has to do with ci.dll (code integrity) and the Protected Environment Authentication crap, but, then again, it could just be some sort of stupidity in the file system parsing code.  

As a point of amusement, leaving an Explorer window open to a share on a NAS... goes blank after an amount of time (files are still there, the view just disappears until it's refreshed).  

My temporary 'solution' (obviously, rebooting fixes this, as everyone knows.  However, rebooting every damn time you want to read a new disc is ludicrous) is to right click on the drive in device manager, Uninstall, select 'no' to the query to reboot now (you'll note the drive's still there, unlike in XP...) and then Scan For Hardware Changes.  This _works_.  Explorer now sees the disc that's actually IN the drive.  Rinse, repeat.
Of note is there doesn't seem any nice (and hence, scriptable) way of doing this using devcon; the drive isn't happy to be restarted or disabled/enabled there, and happily reports its status as running the whole time.

Some info for anyone digging into this:
X64 Vista SP1 Ultimate
i975x chipset 
Drive:
C:\bin\devcon\i386>devcon stack @IDE\CDROM*
IDE\CDROMSONY_DVD_RW_DRU-190A____________________1.65____\5&36E1B51B&0&0.0.0
    Name: SONY DVD RW DRU-190A ATA Device
    Setup Class: {4d36e965-e325-11ce-bfc1-08002be10318} CDROM
    Controlling service:
        cdrom
1 matching device(s) found.

There isn't any third party junkware installed (no sonic, or easycd, or even Nero; no daemontools, or poweriso, etc).  Imgburn is used exclusively to burn.  Services HAVE been trimmed, but nothing that should be related to this have been modified; most are set to 'manual' (remote registry to disabled, etc).  Nothing is odd looking at the service registry entries.

Based on the other posts regarding this issue by people who obviously don't tinker about with their system, I doubt it has to do with anything I've messed with.

So, it begs the question: where is Vista saving this, WHY is Vista saving this, and how does one stop it?

Update #1:  Interesting tidbit; using dskprobe (yes, from the Windows Support Tools for XP2) and the LOGICAL volume, I can happily read 2048 sectors (arbitrarily picked to test) and see the 'real' new disc, despite even Disk Manager showing the stale volume header.  So, the problem must be in the file system driver and caching... 

Update #2: Another quicker solution than the uninstall temporary solution: Using diskmgmt.msc, eject disc, and then (in my case, because computer is actually in another room; gotta dig strings of cables and KVMs) using Imgburn to reload, works: Drive is refreshed.  However, using Imgburn, or Windows Explorer even, to eject, or the button on physical drive, _doesn't_ refresh.  

2010-02-04

For All Your Glowing Rod Of Light Needs...

If you're in the UK, you're no doubt familiar with the experience of being told that "this video is not available in your country" on streaming websites such as Hulu. This is particularly problematic if you're looking for anime shows, versus more shared genres.


Good news, then: AnimeOnUK.tv is back! The webmaster has had the cobwebs dusted off and is bringing the site firmly into the Internet video age, with plans to feature listings of which sites have what, plus breaking news about UK digital distribution of anime.


After all, no one should be without a little bit of Noir.

2010-02-03

Vista x64 All Tasks aka "God Mode"

The recent hype over Windows' "God Mode" likely hasn't done much to put to rest the contention the whole operating system is little more than a rather cheesy game.

http://brandonlive.com/2010/01/04/the-so-called-god-mode/ (of ambiguous officialness by a Microsoft employee) goes into a little bit of detail; but the main point of interest is the general amount of hawing from Microsoft, and the tossing around of how goofy and silly people are for their use of this 'trick'.  Vista, and Windows 7 both illustrate this mentality of giving their users what Microsoft has decided they'll need, rather than what, perhaps, their customers actually want.

Sadly, no one in Redmond seems to be asking what the significance of all this interest being shown by so many less technologically-savvy and historically oblivious users in what should be system errata could mean.

An obvious answer, of course, is by hiding so many system settings and focus grouping ease of configuration into oblivion, users of Microsoft's newer versions of Windows have become so desperate for a way of getting at the options they remember from the older releases that the 'All Tasks' view must indeed seem diety-given.

Whatever the case, it's handy for not having to wade through the sometimes mind-bogglingly unintuitive depths of control panel applets when doing initial system setup by having most of the published settings in a simple list.

After all, as we all learned from random girls throwing themselves off rooftops after being bit by T-virus infected subjects, a little information really can save lives. (I'm not at all insinuating that the Umbrella corporation is in anyway controlled by Microsoft. Please stand the black helicopters down now..)

For those folks privileged enough to be running x64 Vista and would rather not crash their shell (if using Explorer), the following method perhaps will give more joyous results.  Create a shortcut, and use the following command line:
explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}


Then, simply pin to start menu and enjoy; a productive citizen is a happy citizen!


Some further reference:
http://www.windowsvalley.com/blog/windows-7-god-mode-behind-the-scenes/

A not so useful list:
http://msdn.microsoft.com/en-us/library/ee330741(VS.85).aspx