Blocklist does not show partition in output if used on a partition
Opened this issue · 2 comments
Grub4dos function blocklist does not show partition in output if used ON a partition. Last version I could find WITHOUT this behavior is grub4dos 20210602.
No problems on devices without partition. Also the start sector and the blocks in the blocklist are NOT the problem, problem is only output on screen (and in a script, if piped output to a variable is used).
In the first and second print-screen the 'bad' behavior is showed first, can be corrected manually by inserting partition number.
In last print-screen the 'good' behavior is showed first (output already contains partition number). If partition number is left out 'bad' output is same as later versions of grub4dos.
很正常,没有什么错误。是你使用的问题。
(hd0) 对应的磁盘
(hd0,0) 对应的分区
If this is normal behavior, the partition offset should have been taken into account, which is not the case now with output '(hd0)-blocklist'
In case of floppy/ram-disk and CD the output can be directly used for 'cat' (for instance). On partitioned devices this is not possible now.
But I can make following workaround for use in a variable (not needed if output shows the partition already, like old grub4dos version) :
blocklist (hd0,0)/GRLDR > (md)0x300+1
cat --skip=6 (md)0x300+1 | set blcklstB=
set blcklstB=(hd0,0)%blcklstB%
So it is not a big deal!
Output showed: