I am submitting a patch to kernel/sys.c that walks through all IDE drives (#ifdef CONFIG_BLK_DEV_IDE, of course), and issues a "sleep" command (as code in hdparam) to each one of them right before the kernel halts. Here goes the diff: