1

I have been using hdparm fine for ssd's by booting a live debian or ubuntu from usb. Even if the device is frozen, sleeping the computer works fine because the os was loaded from usb.

But what if i am pxe grub booting ubuntu or debian, and i need to suspend the computer? The screen does not come back on. I haven't found another way of unfreezing the hdd without suspending the computer. I presume the screen does not come back because it's running from ram. The pxe server copies filesystem.squashfs into ram.

Has anyone had luck using hdparm, with suspending to unfreeze the hdd when the os is in ram or pxe booted?

philthy
  • 253

1 Answers1

0

It doesn't sound like the BIOS is fully setup when it goes through PXE boot. ACPI (provides suspend/resume + hotkeys ...) must be partially working because you were able to suspend, but when it's asked to resume, it's decided not to run the video card's option rom, if it even got that far.

To confirm that the system is resuming but you have no video, setup a serial console (or just ssh) and try again. If it does resume, you can start X windows which will "soft boot" the video card and maybe get your video back.

If you get no serial console then either the kernel is broken or the BIOS is broken. To help isolate, install 'fwts' and run the suspend/resume test. fwts uses an alarm timer provided by the platform to trigger itself to resume after N seconds. If it can't do that then you have deep platform issues to address.

If it can do that, you still have deep platform issues to address because it means the interrupts sent by the keyboard are going into la la land instead of getting ACPI to do it's job. However, you could leverage fwts to unfreeze the drive, script it, and shutdown when you're done.

Back to the frozen SSD issue. If you could unload/reload the module that would force a link reset on the HBA. Less satisfying approaches include using sysfs to delete the drive and then rescan the bus. I don't think that performs a link reset. You may be able to use sg_reset to whack the drive, I would just reset the whole bus.

Sometimes there's just no substitute for a hard disk cage with bay level power control.

ppetraki
  • 5,531