Jump to content

Minimal command shell Win7


Mexxi

Recommended Posts

I'm trying to get the most out of my RAM for some command line tools. I ran XP x64 and Win 7 x64 only as command prompt in safe mode, but they still consumed up to 400MB of RAM. I created a minimalistic PE based on Server 2003 x64, but the memory usage was comparable to that of the safe mode's command prompts. Seeing that Microsoft made use of componentizing by using Minwin in Win7, I wondered if there was a way to strip down a PE x64 or the safe mode to a similar performance. It's all about lowering the RAM requirements for me. All I need is a bootable x64 command shell with really low requirements. I found the registry settings for the safe mode and already started experimenting with kicking out several drivers and services. However, I'd prefer having a seperate PE available instead of butchering the life line of my Windows. Any ideas, programs, tools or informations you might have heard of that would help me in my endeavor?

Edited by Mexxi
Link to comment
Share on other sites


Any particular reason this has to be x64?

Yes, I'm using 4GB RAM. If I only had 3GB, I'd use Freedos, but there doesn't seem to be an equivalent for x64 users.

Edit: This thread might be more appropriate in the WinPE-section.

Edited by Mexxi
Link to comment
Share on other sites

Probably, and I'll move it, but x64 itself does give some overhead compared to x86 just because binaries and memory pools are larger. I'm not sure what you can strip from a base PE image, but we'll see if anyone else has any ideas in the WinPE section.

Link to comment
Share on other sites

Yes, I'm using 4GB RAM. If I only had 3GB, I'd use Freedos, but there doesn't seem to be an equivalent for x64 users.

I am sorry, but I cannot see the connection between the 400 Mb and the 4Gb (or if you want between the, say, 128 Mb needed to run a 32 bit PE 1.x and the 2Gb normally addressable) and the x64 command line.

I mean, what command line program (available only in x64 build) doo you plan to use that needs more than 4000-400=3600 Mb of RAM?

Have you checked the various PE 3.0 builds on boot-land?

http://www.boot-land.net/forums/index.php?showforum=91

And/or the PE 1.x ones:

http://www.boot-land.net/forums/index.php?showforum=52

Not at all my field, but I believe there are x64 based projects. :unsure:

jaclaz

Link to comment
Share on other sites

Thanks for the move cluberti :)

I'm aware that the system's overhead is bigger than on x86 systems, but those are limited to 3GB per app, so gaining that 1GB is very well worth it ;)

I mean, what command line program (available only in x64 build) doo you plan to use that needs more than 4000-400=3600 Mb of RAM?

7z ;) Unless you have at least 12GB in your system, you just can't ever have enough for that app ;)

Have you checked the various PE 3.0 builds on boot-land?

http://www.boot-land.net/forums/index.php?showforum=91

Well I only saw two VistaPE and Win7PE and both seem to be way bloated. I'm more looking for something like PicoXP.

Yeah, I did. In fact I asked there first a few days ago under my other nick "nanaga". The projects I tried weren't compatible with my Windows versions, that's why I made my own PE x64. Also, it's noteworthy to say that no PE over there offers such a minimalistic approach for x64-systems as PicoXP does for x86. LiveXP might be able to do it, but I couldn't test it yet due to mentioned issues. Anyway, I have a PE 1.x now and it works nicely. The problem is, that Windows seems to lock more memory the more the system has available. For example, I can run my PE on a 112MB virtual machine (this is the absolute minimum. The OS will take like 50MB under these conditions. If I raise the memory to 1GB it eats 150MB and on my 4GB machine it occupies 400MB for no good reasons. If I could eliminate the culprit which bloats Windows so dynamically that would already help and I could use my current PE instead of making a new one.

Since I don't think it's possible, I want to strip Windows 7 down to its bare Winmin bones. Even if Winmin behaves similarly to XP, occupying more space as more space is accessible, I could still make use of a pagefile, which might help compensate that behavior. While PE 1.x only supports pagefiles on systems with 64MB RAM and less, this is a native feature of WIN PE 2 and 3, so using those would have advantages in any case.

Seeing that Eric Traut mentioned Windows 7's Winmin roots in his presentation made me wonder that no one yet tried to strip Windows down to expose the core. I can't believe that I'm the first one trying that.

Edited by Mexxi
Link to comment
Share on other sites

Have you tried building your PE to not use the RAMDISK function?

My PE doesn't work as a RAMDISK. I used Microsoft's deployment tools and they don't activate RAMDISK-functionality automatically. At least judging from the help-file.

Edited by Mexxi
Link to comment
Share on other sites

Ok, I will then rephrase the original question ;):

What the HECK are you compressing or uncompressing with 7zip to need that amount of RAM? :unsure:

jaclaz

Everything and nothing. I'm just into testing different compression algorithms and programs and maxing them out, but I also have some projects going on that require maximum compression and profit massively from bigger dictionaries, such as installers. Anyway, who wouldn't like better compression without having to upgrade the computer? ;) Also it's not like the 256MB dictionary size you get on 4GB machines is anywhere near enough. The most efficient dictionary-size equals file size and nowadays files tend to be a lot bigger than that, so any improvement can have a major impact.

Edited by Mexxi
Link to comment
Share on other sites

Everything and nothing.

Good plan. :w00t:

I quite frankly cannot see the point, unless you are using a very asymmetric compression engine, there is probably no practical use of having a compression algorithm that requires non-standard settings. :unsure:

However, it's your machine, your compression experiments, so good luck for 'em. :)

jaclaz

Link to comment
Share on other sites

Mexxi,

Have you tried the new feature of WinPE 3.0 called profiling. I haven't, but apparently you can turn it on with DISM in a basic winpe, run the winpe and use only what you want, then rebuild the winpe using the created profile, and everything should be stripped out except what you need... apparently...

Maybe worth a try.

Regards

Link to comment
Share on other sites

  • 2 weeks later...

I quite frankly cannot see the point, unless you are using a very asymmetric compression engine, there is probably no practical use of having a compression algorithm that requires non-standard settings.

Asymmetry describes the behavior of decompression being performed faster than compression. This has nothing to do with increasing compression efficiency by using bigger dictionaries. Anyway, the best compression efficiency can be reached if the dictionary size matches the combined size of the files that have to be compressed. 256MB is rather small if you compare it to many compressible sources such as images, games, backups etc. So an increase in dictionary size is not necessarily only useful for outstanding compression jobs. Many run-in-the-mill archives can profit from it.

Mexxi,

Have you tried the new feature of WinPE 3.0 called profiling. I haven't, but apparently you can turn it on with DISM in a basic winpe, run the winpe and use only what you want, then rebuild the winpe using the created profile, and everything should be stripped out except what you need... apparently...

Thanks a lot! That was a very valuable clue! I created a profiled WinPE 3.0-image and RAM-usage is already lower than that of the command prompt of XP x64's Safe Mode.

Edited by Mexxi
Link to comment
Share on other sites

Asymmetry describes the behavior of decompression being performed faster than compression. This has nothing to do with increasing compression efficiency by using bigger dictionaries.

Not really :angel , asimmetry may also mean that you have something that needs LOTS of RAM and computing power (usually the two things go together ;)) when you compress something to an archive, but when you (or the people that need to use the archive) want to UNcompress it, far lower RAM (and CPU) requirements are needed.

I mean, if you need, say 4 GB of RAM to compress a file, and this requirement is needed also when uncompressing, myself and 7/8 to 99/100 of all the members of the board will never be able to UNcompress it, which is not very practical.

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Not really :angel , asimmetry may also mean that you have something that needs LOTS of RAM and computing power (usually the two things go together ;)) when you compress something to an archive, but when you (or the people that need to use the archive) want to UNcompress it, far lower RAM (and CPU) requirements are needed.

Indeed, I forgot about that part of asymmetry ;)

I mean, if you need, say 4 GB of RAM to compress a file, and this requirement is needed also when uncompressing, myself and 7/8 to 99/100 of all the members of the board will never be able to UNcompress it, which is not very practical.

True and fortunately most symmetric archivers are actually capped. I don't know of one that uses more than 2GB RAM. Asymmetric ones like 7z and FreeArc do go beyond that, but thanks to their asymmetric algorithms, even an archive with a 1GB dictionary in 7z can be extracted on all modern machines.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...