Jump to content











Photo
- - - - -

How to write Registry keys with grub4dos


  • Please log in to reply
32 replies to this topic

#1 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 22 December 2013 - 07:27 AM

As the title: D! When I boot into my PE WIN it will automatically record 1 REG key into the WinPE that with grub4dos,
 
Please help me with everyone! Thank You Very Much !


#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 22 December 2013 - 08:51 AM

It is not possible.


  • TrungNT_HUST likes this

#3 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 December 2013 - 11:38 AM

Well, if the registry is not inside any container (iso, img, wim, vhd,). It should, at least in theory, be possible to replace a string in it with an equally long one.

Creating anything new, would indeed be impossible.

:cheers:
  • TrungNT_HUST likes this

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2013 - 12:00 PM

Yep, like - say- changing a setting from 0 to 1 (or other value).

Problem might be to find the location where the value is, but if the address is found before, it could work.

 

As a practical example, it would be possible to "switch" a WinPE to WinFE from grub4dos:

http://mistype.reboo...fe.htm#regedits

 

And again, since the Registry is a filesystem (and a filesystem similar to NTFS) since there is code to access the Registry as a filesystem:

http://reboot.pro/to...s-a-filesystem/

it is possible (if some programmer would take the matter in his/her hands) to add support to it.

 

:cheers:

Wonko


  • TrungNT_HUST likes this

#5 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 22 December 2013 - 01:38 PM

Thank you for the reply!
 
I want to boot by grub4dos it will automatically record 1 REG keys at the same WinPE Firadisk of karyonix :)
 
 

 

 

map --mem (md)0x800+4 (99)

map --hook

write
(99) [FiraDisk]\nStartOptions=cdrom,vmem=find:/file1.iso;floppy,vmem=find:/file2.img;\n\0

 

 

==> Is there a way to record one registry value from grub4dos as Firadisk !
 
Thank You Very Much  :suda:

Edited by iucuaong_1996, 22 December 2013 - 01:39 PM.


#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2013 - 01:53 PM

iucuaong_1996

Maybe there is a language barrier.

It is NOT possible (currently) to write (add) a Registry key through grub4dos.

It may be possible (with a little effort) to change one single value in an existing key.

 

WHICH specific, EXACT Registry key are you wanting/needing to add/modify? (post DETAILs).

 

:cheers:

Wonko


  • TrungNT_HUST likes this

#7 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 22 December 2013 - 02:03 PM

or so! Many Thanks
 
I mean this
 
- I boot file. ISO and want it to boot into the screen will automatically mount the ISO file to a virtual drive.
 
- I just need it to record 1 Registry keys are where, for example,
 

 

HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \ Control \ ISOPE

 
Value: MOUNTISO
 
data: \ ISO \ WINPE.ISO

 

==> Just for the record 1 can Grub4Dos registry keys and any one can edit or data value
 
And it does not burn on the important key
 
@@@
 
I'm Vietnam! My English is very poor should expect people to sympathize when I write articles!

Edited by iucuaong_1996, 22 December 2013 - 02:04 PM.


#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2013 - 02:49 PM

I'm Vietnam! My English is very poor should expect people to sympathize when I write articles!

 

Sure :), but if we cannot understand each other, we may be very sympathetic, BUT this won't solve your problem (if any). :frusty:

 

WHICH EXACT .iso? (an image of a Windows XP, of another Windows OS; a PE, if a PE WHICH version)?

 

There is NO need to use grub4dos to write a Registry entry to have it mount the same .iso from which you boot, AFAIK/AFAICR, you can add INSIDE the PE a provision to mount the actual .iso (as an example with IMDISK).

 

Check this seemingly UNrelated thread, where a way to automount the .iso through IMDISK has been used:

http://reboot.pro/to...required-cddvd/

 

:cheers:

Wonko


  • TrungNT_HUST likes this

#9 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 December 2013 - 05:23 PM

@iucuaong_1996
An iso that was booted from, is already mounted. Else one couldn't boot from it!

:cheers:
  • TrungNT_HUST likes this

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2013 - 05:38 PM

@iucuaong_1996
An iso that was booted from, is already mounted. Else one couldn't boot from it!

:cheers:

Not really.

See the case of the Windows 7 DVD mentioned, in that case what is actually mounted is the wim, but not the .iso:

http://reboot.pro/to...cddvd/?p=100947

 

:cheers:

Wonko


  • TrungNT_HUST likes this

#11 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 22 December 2013 - 06:02 PM

It's tough between us because of language issues  :dots:

 

It is true that there is no way to record how Grub4Dos Registry  :confused1:

 

@ @ @
 
How to boot Firadisk with this code it can record from Grub4Dos REGISTRY
 

 

 

map --mem (md)0x800+4 (99)

map --hook

write
(99) [FiraDisk]\nStartOptions=cdrom,vmem=find:/file1.iso;floppy,vmem=find:/file2.img;\n\0

 

 



#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2013 - 06:10 PM

iucuaong_1996, 

please :) try describing EXACTLY WHAT you want to boot (final GOAL), please FORGET (temporarily) the WAY you THINK it should be done.

 

There is (normally) NO need to write anything in the Registry to boot with Firadisk BUT it depends on the EXACT nature of the thing that is booted through it.

 

:cheers:

Wonko



#13 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 22 December 2013 - 06:20 PM

But we can create 1 Registry key in WIN PE boot with grub4dos ??
 
Can you do it ?


#14 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 22 December 2013 - 06:33 PM

Create a registry key? No, No and thrice No!


  • TrungNT_HUST likes this

#15 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 December 2013 - 06:46 PM

 

But we can create 1 Registry key in WIN PE boot with grub4dos ??
 
Can you do it ?

 

NO, it is NOT possible BUT it is also NOT NEEDED normally.

 

Do not get obsessed by this, describe what you want to do, as said the FINAL GOAL, and it is likely that we can suggest you a different way/method to get that (the GOAL, NOT the writing of a Registry key from grub4dos).

 

Example:

First question: Can you fill your car tires with an alloy of lead and tin?

First Answer: NO, it is NOT possible, but WHY exactly would you want to do that?

Reply to First answer: Where I live it snows during winter and by filling tires with some heavy metal I will increase their weight and thus increase adherence..

Second answer: NO, you CANNOT fill your tires with heavy metal, BUT you can use winter tires or snow tires, to increase adherence on snowy/iced surfaces, which car is it, how many centimeters of snow do you have normally, which country is it, do local Laws allow driving with snow tires?

Reply to Second answer: Can you fill your car tires with an alloy of lead and tin?

Third answer: NO.

 

 

:cheers:

Wonko


  • TrungNT_HUST likes this

#16 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 December 2013 - 09:17 PM

@Wonko
Better skip on the examples, i doubt they help in this case.

:cheers:
  • TrungNT_HUST likes this

#17 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 23 December 2013 - 04:48 AM

So why karyonix can use grub4dos and burn it to lock up REG MOUNT ISO file to a virtual drive  ????
 

 

title Start Hiren's test

set ISO = / bkavhiren.iso
map - mem (md) 0x800 +4 (99)
map% ISO% (222)
map - hook
write (99) [FiraDisk] \ nStartOptions = cdrom, Vmem = find:% ISO%, cdrom, Vmem = find :/ win7.iso; \ n \ 0
root (222)
chainloader
 
===> It has scored success !
 
HKLM \ SYSTEM \ CurrentControlSet \ Control \ FiraDisk \ Volidate
 
StartOptions value type REG_SZ
 
DATA =, = find :/ Vmem bkavhiren.iso; cdrom, Vmem = find :/ win7.iso;

 

- Everyone can help me explain ??


Edited by iucuaong_1996, 23 December 2013 - 04:48 AM.


#18 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 23 December 2013 - 09:40 AM

If you mean Hiren's Mini XP, it already has the Firadisk driver added to XP.

What the code is doing is creating a virtual floppy disk drive (99)  - any number below 128 is a floppy disk, 128-159 is a hard disk and 160-255 is a CD - these are BIOS device numbers.

The 'write (99)' line writes a string to the first 'sector' of the virtual floppy disk.

When Hiren's XP boots, the Firadisk driver is loaded (it is already installed in Hirens XP). 

When the Firadisk driver loads it searches all floppy disk devices for a string beginning with [Firadisk].

When it finds this string in device 99, it parses it to get the name of the ISO.

The find command tells Firadisk to search all volumes for /bkavhiren.iso.

When Firadisk finds the ISO it mounts is as a virtual CD.

It also writes the entry into the registry.

 

So grub4dos is not writing to the registry.

Also, Firadisk is already in Hirens.

 

Now it is possible to also have an F6 virtual floppy disk when booting XP. The F6 virtual floppy can make XP load firadisk as a driver. In this way Firadisk does not already have to be in XP.

 

As Wonko says, if you can explain exactly what it is you want to achieve, we may be able to suggest a solution.

 

 

 

 

 

 

 

 



#19 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 23 December 2013 - 11:22 AM

@iucuaong_1996

- grub4dos creates virtual floppy
- grub4dos writes "[FiraDisk]..." to virtual floppy
- grub4dos loads the XP into RAM
- XP starts
- Firadisk reads the "[FiraDisk]..." String form the virtual Floppy
- FiraDisk tells XP to write the StartOptions to Registry

Hope this is easier for you to understand.

:cheers:

#20 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 23 December 2013 - 11:23 AM

thank you! I understand the meaning the number (99) and (222)
 
Turns out Firadisk Registry entry through the virtual floppy drive
 
So the index
 

 

map - mem (md) 0x800 +4

 

 
What is meaningful ?

Edited by iucuaong_1996, 23 December 2013 - 11:25 AM.


#21 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 23 December 2013 - 11:31 AM

(md) is 'memory device'

 

(md)0+1 means the first sector in the computer's memory starting at 0 - i.e. the first 512 bytes of memory in the computer.

(md)0x800+4 means 2048 bytes of memory starting at sector 0x800 - i.e. 1024K or 1MB

 

so

map --mem (md)0x800+4 (99)

is defining an area of memory to be used as the virtual floppy device 99

 

The write command will write the string into memory at this point.

Actually I don't think the --mem is required or maybe by using --mem it is relocating it to the end of the memory map? :dubbio:

 

See my tutorial on grub4dos.



#22 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 23 December 2013 - 01:38 PM

I would like to thank you
 
Still can not solve the problem but the article you've explained my questions very clearly.
 
:clap:


#23 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 23 December 2013 - 03:16 PM

Still can not solve the problem

Maybe because you still haven't told us, what the actual problem is? :dubbio:

:cheers:

#24 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 23 December 2013 - 03:23 PM

Sounds like we will never know what problem you are trying to solve and so never be able to help...



#25 TrungNT_HUST

TrungNT_HUST

    Member

  • Members
  • 32 posts
  •  
    Vietnam

Posted 23 December 2013 - 03:33 PM

Actually, I found the boot code of karyonix firadisk can record MOUNT registry to be

 

I think it could use grub4dos to do the same thing (write REG key in certain key 1)​​.

 

1 I have few problems: I need to customize one of these registry keys without editing boot.wim, so I ask you to help me  :money:

 

Is there any other way to be able to write registry keys outside no. No one wants to edit boot.wim because few jobs!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users