Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocklist does not show partition in output if used on a partition #428

Open
deomsh opened this issue Sep 30, 2023 · 2 comments
Open

Blocklist does not show partition in output if used on a partition #428

deomsh opened this issue Sep 30, 2023 · 2 comments

Comments

@deomsh
Copy link

deomsh commented Sep 30, 2023

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.

GRUB4DOS 20230922 Blocklist (hd0)-SMALL71A IMG = (hd0)0x2672d9c+0x1680 NOTok, only with (hd0,0) OK
GRUB4DOS 20210813 Blocklist (hd0)-SMALL71A IMG = (hd0)0x2672d9c+0x1680 NOT ok, only with (hd0,0) OK
GRUB4DOS 20210602 Blocklist (hd0)-SMALL71A IMG = (hd0)0x2672d9c+0x1680 last version OK

@yaya2007
Copy link
Collaborator

yaya2007 commented Dec 3, 2023

很正常,没有什么错误。是你使用的问题。

(hd0) 对应的磁盘
(hd0,0) 对应的分区

@deomsh
Copy link
Author

deomsh commented Dec 3, 2023

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:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants