PartialVolume / shredos.x86_64

Shredos Disk Eraser 64 bit for all Intel 64 bit processors as well as processors from AMD and other vendors which make compatible 64 bit chips. ShredOS - Secure disk erasure/wipe
Other
1.53k stars 64 forks source link

Shutdown / --autopoweroff is broken #30

Closed betaprinz closed 3 years ago

betaprinz commented 3 years ago

my grub.cfg entry:

menuentry "ShredOS-ZERO-NoUSB-AutoOFF-AllDrives" { linux /boot/shredos console=tty3 loglevel=3 loadkeys=de nwipe_options="--method=zero --verify=off --noblank --nousb --autonuke --autopoweroff" }

After wipping my disk i get a error/message

"shutdown: -H and -P flags can only be used along with -h flag". ... ... ...

"Paused, press any key to restart nwipe."

Any Ideas?

PartialVolume commented 3 years ago

@betaprinz Interesting, shutdown -P (which is what nwipe uses in it's code) works on Ubuntu 18.04LTS without any issues. I'll check it out on buildroot (ShredOS) and keep back to you this afternoon.

PartialVolume commented 3 years ago

@betaprinz Confirmed, we have two different versions of the shutdown command that behave slightly differently.

The shutdown command that nwipe uses is shutdown -P +1 "Broadcast shutdown message". This works fine on Ubuntu 18.04 LTS but. as you found, on ShredOS fails with the error shutdown: -H and -P flags can only be used along with -h flag".

Luckily there is a shutdown command with options that work correctly on both ShredOS and Ubuntu 18.04 LTS, this is shutdown -Ph +1 "Broadcast shutdown message". i.e with the addition of -h.

I'll make the changes to nwipe and once that's done I'll release another version of ShredOS.

Thanks for reporting the problem.

PartialVolume commented 3 years ago

Fixed by #37