开启win7的大于4gb的内存win7开启大内存支持
番茄系统家园 · 2021-08-19 03:05:21

,,,,
,
,asisthekernel,thechecksumintheexecutable’sheadermustbesetcorrectly.Sincepatchingthekernelwillalmostcertainlyhaveinvalidatedthisstoredchecksum,youneedtoresetit.Signingthecode,asdiscussedunderthenextheading,willdothis.Ifyoudon’thavetoolsforsigningcode,thenasuitabletoolforsettingthechecksumisEDITBINfromMicrosoftVisualStudio.Its/releaseswitchexistssolelytosetthechecksum.Thecommandtorunis
editbin/releasentkr128g.exe
DigitalSignature
Itissometimessaidthatkernel-modedriversarenotcheckedfordigitalsignaturesin32-bitWindowsVista,ormoreaccuratelythatalthoughhashesarecomputed,driversarenotrejectedifthehashisnotvalidatedbyasignature.7Althoughthisisbroadlytrue,thereareadozenexecutablesthattheloaderordinarilyinsistsbesignedproperly.Thekernelisoneofthem,ofcourse.Itmustbesignedbyacertificatethatderivesfromoneofahandfulofrootcertficateswhosepublickeysarehard-codedintotheloader.SincepatchingthekernelwillhaveinvalidatedMicrosoft’ssignature,youhavetoresorttooneoftheexceptionsthatarecoveredbytheword“ordinarily”(unlessyouwanttopatchtheloadertoo).
OneoftheseexceptionsisaTestModewhichMicrosoftprovidessothatdriverscanbetestedduringdevelopment.Presumably,thisTestModealsoletsMicrosoft’sownkernelprogrammersgettheirkerneltestedwhileitisstillbeingworkedonandisnotreadyforapropersignature.Inpatchingthekerneltotestwhatwillappeartoyoutobeanewkernel-modefeature,youareinessentiallythesameposition,thoughonamuchsmallerscale,asMicrosoft’sownkernelprogrammerswhentheyhavechangedthekernel.Inthissense,theTestModeisthemostappropriatewayaroundthedigitalsignature.
InTestMode,theloaderrelaxesitsintegritycheckingsuchthatanyrootcertificateisaccepted.8Providedthatyouhavesuitabletools,youcancreateyourowntest-signingcertificateandtest-signyourmodifiedcopyofthekernel,suchthatitwillloadwhenyoubootWindowswiththetestsigningoption.Thereisapricehowever:TestModehasthedetractionofplacingsmallwarningsonthedesktop.
Forsuitabletools,withdocumentation,lookineithertheWindowsSoftwareDevelopmentKit(SDK)ortheWindowsDriverKit(WDK).Tomakeyourowncertificate,runsomesuchcommandas
makecert-r-ssmy-n"CN=MyOwnTestingAuthority"
ThiscreatesarootcertificateforaninventedcertificationauthoritynamedMyOwnTestingAuthorityandinstallsitinthePersonalcertificatestore,whichisrepresentedby“my”inthecommand.YoucanviewthenewcertificatebystartingtheCertificateManager(CERTMGR.MSC),whichalsoletsyousetaFriendlyNameforthecertificateifyouwanttokeepit.Tosignyourmodifiedkernelwiththiscertificate,runthecommand
signtoolsign-smy-n"MyOwnTestingAuthority"ntkr128g.exe
Notethatyoudonotneedadministrativeprivilegeforthesesteps.Also,youcanself-signthekernelononemachinebuttestitonanother.Thereisnoneedtotransferthecertificatetothetestmachine.Indeed,thereisnomoreneedtokeepthecertificate.YoucandeleteitfromthePersonalstoreeitherthroughtheuserinterfaceoftheCertificateManagerorbyrunningthecommand
certmgr-del-c-smy-n"MyOwnTestingAuthority"
BootingtheSelf-SignedPatchedKernel
Younowhaveamodifiedkernelwithwhichtotestyour32-bitWindowsVistaforitsuseofphysicalmemoryabove4GB.CopyittotheWindowsSystemdirectoryofthemachinethatyouwilltest.(Forthis,youtypicallywillneedadministrativeprivilegeforthetargetmachine.)Then,providedthatyousuccessfullyself-signedthekernel,youhavetorestartthatmachinewiththreebootoptions:
pae
,settoForceEnabletobesureofenablingPAE;
kernel
,settoNTKR128G.EXEsothatWindowswillstartwithyourpatchedkernel;
testsigning
,sothattheloaderwillacceptyourself-signedkernel.
PersistentTestMode
Tosetupapersistenttest,usetheBCDEDITutilitytowritetheoptionsintotheBCDstore.Itisprudenttoworkonacopyoftheconfigurationthatyouwanttotest.Assumingthatyouarecurrentlybootedintothisconfiguration,runningthecommand
bcdedit/copy{current}/d"WindowsVistaUsingAllMyMemory"
willcreateanewentryforthebootmenuandtellyouaGUIDwhichyouthenreproduce(e.g.,byacopyandpaste)inthecommands:
bcdedit/set{
guid
}paeForceEnablebcdedit/set{guid}kernelntkr128g.exebcdedit/set{guid
}testsigningon
Whenyourestartthecomputer,select“WindowsVistaUsingAllMyMemory”fromthebootmenu,andstarttesting.Ifyoudoturnouttohaveadefectivedriverandneedtoidentifyitandupdateit,thenyoucangothroughanyoftheusualprocessesofeliminationevenwhilestartinginTestMode.NoteinparticularthatTestModeisnotSafeMode.Youcanhavethetwotogether:while“WindowsVistaUsingAllMyMemory”isselectedatthebootmenu,justpressF8toopenthe
AdvancedBootOptionsMenuandthenselectSafeMode.
One-TimeTestMode
IfyoualreadyhaveanoperatingsystemconfigurationthathasPAEenabled,thenalessintrusivewaytostartyourtestsistoentertheoptionsattheEdit
BootOptionsMenu.Thisisadmittedlyaloteasierifyourmachineisalreadyconfiguredforbootingmultipleoperatingsystems(ortheoneoperatingsysteminmultipleconfigurations)sothatyouordinarilyseeabootmenuduringstartup.Atthisbootmenu,selecttheconfigurationthatyouwanttotest,thenpressF10toopentheEditBootOptionsMenu.ItistoolatetoenablePAEhere,buttheotheroptionscanbeaddedinthestyleofBOOT.INIswitches:
/kernel=ntkr128g.exe/testsigning
PressEnter,andtheselectedoperatingsystemwillstartwithyourmodifiedkernelinTestMode.Thismethodhastheadvantageofnotreconfiguringtheselectedoperatingsysteminanywaythatlasts,andthecorrespondingdisadvantagethatyouhavetotypesomethingeverytimeyouwanttodothetest.
BootingthePatchedKernelWithaBadSignature
Thepatchedkernelcanalsobebootedbydisablingtheloader’sintegritycheckingaltogether.YoucannotsetthisupentirelywithbootoptionsintheBCDstore,becausetheoptiontodisableintegritycheckingisnotpermittedtopersist.Theclosestyoucangetistodisableintegritycheckingatoneorotherofthebootmenus.
Prepareabootentrywithjustthepaeandkerneloptionsasabove.Whenyourestartthecomputer,select“WindowsVistaUsingAllMyMemory”butpressF8toopentheAdvancedBootOptionsMenuandthenselectDisableDriverSignatureEnforcement.
ThealternativewiththeEditBootOptionsMenuisalsoavailable,withthesameconstraintsaboutPAEbeingalreadyenabled,buttheswitchestoenterarenow:
/kernel=ntkr128g.exe/disable_integrity_checks
Curiouslyenough,bootingwithintegritycheckingdisabledleavesnowarningsonthedesktop(suchasyougetfrombootinginTestMode).Idonotmeantorecommendthismethodoftesting.Idescribeitonlyforcompletenessandbecauseitistheonlymethodavailableifyoudonothavetoolsforcode-signing,whicharerelativelynewfromMicrosoft,butareabletosetanexecutable’schecksum.
免责声明: 凡标注转载/编译字样内容并非本站原创,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如果你觉得本文好,欢迎推荐给朋友阅读;本文链接: https://m.nndssk.com/post/39206.html。
