grub4dos icon indicating copy to clipboard operation
grub4dos copied to clipboard

Request: Improve the --in-situ command

Open MichaelWeaser opened this issue 6 years ago • 14 comments

I would like the ability to change partition ID to anything you want maybe like this : --in-situ=0x00. The problem is that for fat12/16 and fat32 it uses LBA partition ID's by default and need CHS partition ID. Also in addition to the change partition ID parameter also have a parameter for CHS partition ID , --in-situ=CHS, LBA parameter wouldn't be needed since by default its already LBA partition ID's being used.

MichaelWeaser avatar Mar 23 '18 17:03 MichaelWeaser

I do not understand your request . Do not check the CHS parameters ?

yaya2007 avatar Mar 24 '18 04:03 yaya2007

Not really getting what you mean????? Need to collaborate more? What I mean by CHS parameter is that in-situ should have a option for CHS partition IDs like for example 0x06 is the partition ID for CHS fat12/16 and the LBA equivalent is 0x0E which by default LBA partition is used in grub4dos. Also the ability to change the ID if needed like in-situ=0x00

MichaelWeaser avatar Mar 24 '18 04:03 MichaelWeaser

see http://reboot.pro/topic/21732-windows-for-workgroups-311-grub4dos-and-protected-mode/page-3#entry206527 Code assumes ptn type = E

steve6375 avatar Mar 24 '18 08:03 steve6375

Yes I know , I started that forum post. Its only a request for a parameter to change the ID

MichaelWeaser avatar Mar 24 '18 12:03 MichaelWeaser

Have a try grldr.rar.txt

yaya2007 avatar Mar 24 '18 12:03 yaya2007

I really don't need that, I already recompiled it , with the change in the partition ID to make fat12/16 a 0x06 partition ID. I am pretty sure it's easy adding a parameter to the --in-situ to allow you to change the ID.

MichaelWeaser avatar Mar 24 '18 13:03 MichaelWeaser

--in-situ=CHS If you don't need it, please revoke the request

yaya2007 avatar Mar 24 '18 13:03 yaya2007

I mean I need it, and other people could use this improvement as well. my compile is temporary , until a solution added to the main code base. as well as --in-situ=CHS , also put an option for any partition ID like =0x06 or something like that.

MichaelWeaser avatar Mar 24 '18 13:03 MichaelWeaser

hey yaya2007 , I tried your version ( what you send me to download) , It works great, I like this compiled version than my own.

MichaelWeaser avatar Mar 25 '18 01:03 MichaelWeaser

Revoke --in-situ=CHS Increase --in-situ=FLAGS_AND_ID

If --in-situ=FLAGS_AND_ID is used, the low byte is FLAGS and the high byte is partition ID(use 0xnn00 to specify). grldr.rar.txt

yaya2007 avatar Mar 25 '18 04:03 yaya2007

I will test the grldr whenever I can . I think the --in-situ=CHS really wasn't necessary because that would only be useful with older MS-DOS and other compatible OS. The option to change the partition ID is much better because =CHS limits to CHS partition ID's for fat12/16/32.

MichaelWeaser avatar Mar 25 '18 16:03 MichaelWeaser

Tested the new compile , it works great :)

MichaelWeaser avatar Mar 25 '18 18:03 MichaelWeaser

Great! @Yaya - Can you document the format\usage of FLAGS_AND_ID in help text or change log comments please? i.e. FLAGS ?? ID = partition type ID

P.S I assume that the in-situ command is useful to boot OS's like DOS that only use BIOS calls. OS's that switch to protected mode won't use the BIOS and so the false MBR created by in-situ and the patched int 13 interrupt would not be accessed and so would be of no use (so only DOS partition types would be needed). In any case, FLAGS_AND_ID is more flexible.

steve6375 avatar Mar 25 '18 18:03 steve6375

@steve6375 I really don't get how Windows 3.1x protected mode still works ? Since Windows 3.1x is a protected mode OS. But I think windows 3.1x still uses the BIOS for disk access even when its in protected mode, which is why it probably works?

MichaelWeaser avatar Mar 25 '18 18:03 MichaelWeaser