Jump to content











Photo
- - - - -

RAM disk not auto-formatted at boot


  • Please log in to reply
17 replies to this topic

#1 tyommik

tyommik
  • Members
  • 3 posts
  •  
    Russian Federation

Posted 13 October 2017 - 11:46 AM

Hello!
Is there an opportunity to automatic format ram-disk to ntfs every windows boot when it created by CLI-interface?
I used this command:

C:\Windows\system32\imdisk.exe -a -s 512M -m R: -p "/fs:ntfs /q /y" -P

But after every reboot I have to format disk manually :(
When I created disk from GUI it's persistance and formated automatically in ntfs every reboot.


Edited by tyommik, 13 October 2017 - 11:46 AM.


#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 October 2017 - 11:54 AM

Hello!
Is there an opportunity to automatic format ram-disk to ntfs every windows boot when it created by CLI-interface?
I used this command:



C:\Windows\system32\imdisk.exe -a -s 512M -m R: -p "/fs:ntfs /q /y" -P

But after every reboot I have to format disk manually :(
When I created disk from GUI it's persistance and formated automatically in ntfs every reboot.

Are you sure you used the IMDISK GUI (and not the IMDISK TOOLKIT one)?

http://reboot.pro/to...across-reboots/

 

:duff:

Wonko



#3 tyommik

tyommik
  • Members
  • 3 posts
  •  
    Russian Federation

Posted 13 October 2017 - 12:56 PM

 WoW! Yes, I' using IMDISK TOOLKIT for creation persistance RAM-disk. I need create disk every boot and it has to NTFS. No img needed.



#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 October 2017 - 01:11 PM

 WoW! Yes, I' using IMDISK TOOLKIT for creation persistance RAM-disk. I need create disk every boot and it has to NTFS. No img needed.

Then, ask your question here:

http://reboot.pro/to...imdisk-toolkit/

 

that feature you are asking for is peculiar (AFAICR) to the Imdisk Toolkit (and not to the "plain" IMDISK).

 

:duff:

Wonko



#5 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 13 October 2017 - 02:58 PM

Then, ask your question here:
http://reboot.pro/to...imdisk-toolkit/
 
that feature you are asking for is peculiar (AFAICR) to the Imdisk Toolkit (and not to the "plain" IMDISK).

 
I am not the author of the command line tool imdisk.exe...
What he ask here has nothing to do with the toolkit, and you should be able to easily answer.

And the answer is that the result is exactly as expected. With the -P switch, the volume creation is registered. So the volume is created by the driver at system startup. Therefore, the command fails because the volume already exists. But the driver cannot format the volume, so it appears as unformatted.

This is said in the syntax help for the -P switch:
Only features directly implemented in the kernel level driver are
saved, so for example the -p switch to format a virtual disk will not
be saved.

So tyommik has to unregister his command, and then use it at each startup without -P.

#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 October 2017 - 04:07 PM

 
I am not the author of the command line tool imdisk.exe...
What he ask here has nothing to do with the toolkit, and you should be able to easily answer.

 

Maybe I should have been able to easily answer it :unsure: or maybe not. :dubbio:

 

I understood that the GUI the OP referred to (which is part of the Imdisk Toolkit and NOT of Imdisk) has some additional (not present in the Imdisk GUI) setting that allowed the OP doing the *whatever* he wants and assumed that you would have been able to tell him how to replicate it with a plainer (set of) Imdisk.exe command(s) and/or batch file or similar.

 

So, if I get it right, besides telling me that I should have been able to easily answer the question and explaining why the Imdisk command line the OP used was wrong, you completely failed to answer the actual question asked, that conversely you should be able to easily answer.

 

Dealing with you has been a pleasure, as always...

 

:duff:

Wonko



#7 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 13 October 2017 - 05:02 PM

you completely failed to answer the actual question asked


This answer is in my message, and I will add nothing about that.

#8 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 October 2017 - 05:28 PM

This answer is in my message, and I will add nothing about that.

 

Yep :thumbsup: , I easily understood how the non-answer in your previous post was definitive and not negotiable, but thanks for confirming that :).

 

:duff:

Wonko 



#9 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 13 October 2017 - 06:41 PM

Yep :thumbsup: , I easily understood how the non-answer in your previous post was definitive and not negotiable, but thanks for confirming that :).


Really tiring...
The question was:
"Is there an opportunity to automatic format ram-disk to ntfs every windows boot when it created by CLI-interface?"
So he wants to use imdisk.exe to create a formatted ramdisk at windows startup. He already has the command, except a small mistake. So I explained where was the error, and how to revert it.
What is wrong with that?

#10 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 13 October 2017 - 07:06 PM

(I just moved this discussion to a new thread to make things easier to follow.)



#11 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 October 2017 - 07:26 PM

So he wants to use imdisk.exe to create a formatted ramdisk at windows startup. He already has the command, except a small mistake. So I explained where was the error, and how to revert it.
What is wrong with that?

 

The difference (as I read it, maybe incorrectly) is that he ran ONE SINGLE TIME the Imdisk Toolkit GUI to obtain that, and (possibly because you programmed in it an automatic mechanism of some sort) from that point on the ramdisk would be automatically created and formatted automatically at each reboot.

 

The OP IMHO asked how to do the same with imdisk.exe (run once and set it for good) so that automatically at each subsequent reboot the disk would be created and formatted.

 

What you suggested (which may well be - besides a good suggestion - also possibly the only way to obtain the expected result) is to simply run the (corrected) command at each reboot (presumably by some autoexecuting mechanism such as any of the Registry auto start related keys or - if it is a PE of some kind - making use of WinpeSHL.ini) without specifying a specific (and suitable) method.

 

I thought (again maybe incorrrectly) that in your toolkit you used a definite such automatic mechanism (as reported by the OP as working) and that you could describe such hypothetical mechanism so that it could be - possibly - replicated on command line and/or without using the toolkit.

 

To the OP that lamented:

 

 

 


But after every reboot I have to format disk manually  :(
When I created disk from GUI it's persistance and formated automatically in ntfs every reboot.

 

You essentially replied (besides noting what I should be able to do easily):

"Your command is wrong, run it manually at each reboot but without the -P" 

 

Hence my opinion that it is a "non-answer".

 

:duff:

Wonko



#12 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 13 October 2017 - 08:13 PM

The difference (as I read it, maybe incorrectly) is that he ran ONE SINGLE TIME the Imdisk Toolkit GUI to obtain that, and (possibly because you programmed in it an automatic mechanism of some sort) from that point on the ramdisk would be automatically created and formatted automatically at each reboot.


The OP is trying to achieve something through command line. So I assume that he first disabled the volume creation in the GUI. Despite his bad english, he said "created", so it's a past that no longer exists.

 

What you suggested (which may well be - besides a good suggestion - also possibly the only way to obtain the expected result) is to simply run the (corrected) command at each reboot (presumably by some autoexecuting mechanism such as any of the Registry auto start related keys or - if it is a PE of some kind - making use of WinpeSHL.ini) without specifying a specific (and suitable) method.


Oh yes, I assumed that the OP knows a way to run a command at startup. If he knows not a single method to do that, then there are too many things to explain before to say how to use imdisk.exe...

 

I thought (again maybe incorrrectly) that in your toolkit you used a definite such automatic mechanism (as reported by the OP as working) and that you could describe such hypothetical mechanism so that it could be - possibly - replicated on command line and/or without using the toolkit.


The toolkit creates a specific service for that. Nothing that can be simply "replicated".

 

"Your command is wrong, run it manually at each reboot but without the -P"


Maybe you did read "manually", but I never wrote that.

#13 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 14 October 2017 - 01:05 AM

@ v77

 

Hi, I am glad to see you arround, I know you are a very nice person, please my friend do not start a futil fight with Wonko, you should know some times he likes to argue a little too much, maybe just because ATM he is bored.  Our community is very small now and we need all valuable people as both of you.

On the other hand the OP is a new member coming for help, and I think he deserves your patience untill you know better his skills.

 

Best Regards

 

alacran


  • v77 likes this

#14 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 14 October 2017 - 09:37 AM

The toolkit creates a specific service for that. Nothing that can be simply "replicated".

Ah ha! :

http://www.imdb.com/...uotes/qt1099763

 

 

I remembered correctly, then:

that feature you are asking for is peculiar (AFAICR) to the Imdisk Toolkit (and not to the "plain" IMDISK).

 

:duff:

Wonko



#15 kKrhTgXcmS

kKrhTgXcmS
  • Members
  • 2 posts
  • Location:Minsk
  •  
    Belarus

Posted 20 October 2017 - 07:31 PM

Hello!
Is there an opportunity to automatic format ram-disk to ntfs every windows boot when it created by CLI-interface?
 

Hello, tyommik

 

I use  RAMDrive.bat  with a such content

-------------------------------

imdisk.exe -a -t file -m R: -o awe -s 512M 
sleep.exe 15
format R: /fs:ntfs  /y
-------------------------------
 
It works fine (for me). Without delay for 15 seconds (sleep.exe 15) RAMDrive.bat  doesn't work.


#16 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 20 October 2017 - 07:55 PM

I think you can skip the 15 second delay if you set the driver to not auto-start.

sc config imdisk start= demand
sc config awealloc start= demand

Then, at next reboot I would think that it works without 15 second delay.

#17 kKrhTgXcmS

kKrhTgXcmS
  • Members
  • 2 posts
  • Location:Minsk
  •  
    Belarus

Posted 21 October 2017 - 06:15 AM

I think you can skip the 15 second delay if you set the driver to not auto-start.

sc config imdisk start= demand
sc config awealloc start= demand

Then, at next reboot I would think that it works without 15 second delay.

 

Unfortunately, this did not work. The disk in the RAM was created, but it was not formatted.



#18 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 21 October 2017 - 10:37 AM

not sure if this will help but below the command line as I am using for years to create a ram drive and format it :

imdisk -D -m r:
imdisk -a -f \\.\awealloc -s 1G -m R: -p "/fs:ntfs /q /y /v:RAMDRIVE" -o par





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users