Записки на #linux@RusNet

Search in calcs
Назад

gpt-signature добавлено пользователем shrtr. permanent link
на bash: # disk=sda; echo; case $(for skip in 512 "$((($(<"/sys/block/$disk/size") - 1) * 512))"; do dd if="/dev/$disk" iflag=skip_bytes,count_bytes skip="$skip" count=8 status=none; done) in 'EFI PARTEFI PART') echo OK: both GPT signatures;; 'EFI PART'*) echo FAIL: first: ok, second: broken;; *'EFI PART') echo FAIL: first: broken, second: ok;; *) echo FAIL: No GPT headers found;; esac


CalcScript v. 1.1
Author: mdma special for #linux channel on RusNet. 2011