MakeBS.cmd ALPHA RELEASE
#26
Posted 11 April 2008 - 07:36 PM
For example- want to use GRLDR as boot loader:
makeBS X:\grldr /write
ilko
#27
Posted 12 April 2008 - 04:17 AM
Jaclaz, would you mind adding an option, once bootsector is changed with the desired file name, to be written back on disk?
For example- want to use GRLDR as boot loader:
makeBS X:\grldr /write
ilko
@ilko
Try the attached 0.071.
You will have to change something in the ":Writesect" section to actually enable writing to disk, and besides dsfo.exe, dsfi.exe is also needed in batch directory.
@ALL OTHERS
DO NOT, and I mean DO NOT fiddle with this, until it is tested by Ilko and confirmed to be working, you can easily make a drive unbootable if anything goes wrong!
WAIT until 0.08 is released.
jaclaz
Attached Files
#28
Posted 13 April 2008 - 07:22 PM
No issues found for now. Tested it with FAT16,FAT16x, FAT32 and NTFS. USB stick formatted by HP USB format tool and PEtoUSB. 3 internal hard disks and 1 USB stick.
However, NOT tested with multiple USB mass storage devices or any other scenarios. Please be careful, backup data etc.
ilko
#29
Posted 22 April 2008 - 02:13 PM
@jaclaz
Can makebs change the boot sector of given drive I: to MS-DOS boot sector (loading io.sys, msdos.sys etc...) ?
bootsect.exe is handy to change between ntldr (NT/XP) and bootmgr (Vista), but how about MS-DOS/Win9x ?
Thank you.
I found out that mbrfix can do that:
http://www.sysint.no...ting/mbrfix.htm
MbrFix /drive <num> /partition <part> fixbootsector <os> Update Boot code in boot sector
Excerpt from the site:
When fixing boot sector of a chosen partition, the wanted OS version must be specified. For now, the only valid choices are WIN98, DOS5 and DOS6.
The purpose of the fixbootsector command is to insert boot code for loading DOS from a partition created and formatted as FAT using the Windows 2000/XP/2003 tools, since those tools inserts boot code for loading NTLDR.]
#30
Posted 22 April 2008 - 05:37 PM
I found out that mbrfix can do that:
http://www.sysint.no...ting/mbrfix.htm
Good find !
The feature has been added recently, it wasn't there some time ago.
Updated by Kåre Smith, 10. september 2007
I guess I will have to update the pseudo-GUI for it:
http://home.graffiti....net/index.html
it's more than two years old, and it shows it!
jaclaz
#31
Posted 22 June 2008 - 04:32 PM
436 downloads of version ALPHA 0.01
267 downloads of version ALPHA 0.02
211 downloads of version ALPHA 0.03
91 downloads of version ALPHA 0.04
87 downloads of version ALPHA 0.05 (should have been one)
108 downloads of version ALPHA 0.06
258 downloads of version ALPHA 0.07
44 downloads of version ALPHA 0.071 (should have been one)
With no rants about erased, unbootable drives and the like, reasonably allow me to call the attached new version (which is just 0.071 with the writing block removed) BETA 0.10
Have fun.
jaclaz
Attached Files
#32
Posted 05 October 2008 - 07:17 PM
and of course a few downloads of latest 0.10 version, 176 of them.
Now, quite obviously since the 22nd of june:
550-436=114
331-267=64
286-211=75
112-91=21
112-87=25
131-108=23
294-258=36
75-44=31
114+64+75+21+25+23+36+31=389
Thus:
389+176=565 downloads took place, of which roughly two thirds were for obsolete versions.
Out of the 389 "wrong" downloads, particularly, 25+31=56, i.e. about 15%, were for versions that were RECOMMENDED to be NOT downloaded.
I would be curious if anyone wishing to emulate the "389 group", and particularly those emulating the "56 sub-group", would care to post stating the reason that is leading them to download that particular version.
Or if anyone else has a possible explanation for this recorded behaviour, I am really puzzled...
jaclaz
#33
Posted 14 November 2008 - 10:34 AM
Is there a specific topic for makeBS.cmd questions ? I start using makebs.cmd and surprisingly it creates a 8Kb boot sector size while I expected to be only 512-byte file. I would lke to replace a NT boot sector (invoking ntldr) with one invoking grldr (since I cannot use grubinst.exe to do this due to MBR not correctly recognized by grubinst).
With 8Kb boot sector, how can I replace it usnig HDHacker for example ?
Please move this topic to appropriate section if needed, thank you.
Edit: I looked at the code and ok there is NTFS-specific processing and using 8KB instead of 512-byte.
I wonder why it cannot simply substitute NTLDR string occurrences with GRLDR in the original NT boot sector, am I missing something ?
Edit 2: I found that the right topic is
http://www.boot-land...?showtopic=2362
so jaclaz please to move/merge this topic to the above.
I also found that I used an old version of makebs.cmd, the latest one has /W option to write to disk which is very convenient.
Incidentally makebs.cmd could also be used to backup boot sector for different drives.
#34
Posted 11 April 2009 - 07:06 PM
I put together a small batch file to perform a copy of current bootsector of a partition (FAT16 or FAT32, NT/2K/XP/2003 "standard" bootsector invoking NTLDR) and to modify this copy as to load ANOTHER loader, for example SETUPLDR.BIN, thus making this copy "chainloadable" from NTLDR through a BOOT.INI entry.
Please Jaclaz, can you explain this sentence in more detail?
Bear in mind that I want to know WHY you do WHAT.
What do you mean by "a partition",is it a hard disk or a USB Stick?
Why do not you let SETUPLDR.BIN be loaded directly from "boot.ini" without your "*.BS" "invention" directly ?
Please elaborate on the above quot of yours.
#35
Posted 12 April 2009 - 03:20 PM
I'll answer this question:
Please Jaclaz, can you explain this sentence in more detail?
Bear in mind that I want to know WHY you do WHAT.
As soon as you answer this one:
How can SETUPLDR.BIN be loaded directly from "boot.ini" ?
About the other one:
A partition, or volume or superfloppy is anything, on any media, which first sector is a bootsector.What do you mean by "a partition",is it a hard disk or a USB Stick?
The batch was expressly made in honour of spacesurfer, who started messing around renaming grldr->NTLDR and NTLDR->NTLDRXP in one of his multiboot tutorials.
The procedure is common in the BartPE world as well (renaming SETUPLDR.BIN to NTLDR).
Instead of renaming files, I rename the name of the loader in bootsector, something that anyone with a hex editor can do, but the batch can make it automated, and it is therefore useful/used in projects like the "Install XP from USB".
jaclaz
#36
Posted 15 April 2009 - 06:40 AM
Now I am fully aware of the fact that :
"SETUPLDR.BIN" must or should be loaded either from a "PHYSICAL BOOTSECTOR" or from
an "existing" BOOTSECTOR file.Right?
Your method is to take the already existent [existing] written bootsector file and edit it behind the scene transparently to the user.Right?
So the newly edited existing bootsector file can load NTLDR or SETUPLDR.BIN either by their REAL NAMES or with any other names.Right?
A couple of questions please:
Why do you ask the user to offer the BOOTSECTOR ?
Can't your app extract the bootsector directly from the required partition?
If the answer is "no",which tool do you recommend to be used in extracting the BOOTSECTOR to give it to your app?
Note that
ktp In the post number 33
asked a similar question which you have not [kindly]answered yet
With 8Kb boot sector, how can I replace it usnig HDHacker for example ?
Please move this topic to appropriate section if needed, thank you.
Edit: I looked at the code and ok there is NTFS-specific processing and using 8KB instead of 512-byte.
Another question which may seems out of topic but not so much:
Briefly, is the name of the folder "cmdcons" hard-coded and can NOT be edited ?
I want to load Recovery console from "Boot.ini "and I already has a folder calle cmdcons on the STICK.
I know that this can be done by GRUB4DOS,but I want to do it fromm "boot.ini" so i would be able to load different kinds of Recovery Console of XP 2000 2003 through boot.ini and the famous switch
C:\btsec\CMDGX.bs=="Microsoft Windows XP Recovery Console" /cmdcons
C:\btsec\CMDGK.bs=="Microsoft Windows 2000 Recovery Console" /cmdcons
C:\btsec\CMDGS.bs=="Microsoft Windows 2003 Recovery Console" /cmdcons
Happy Birhday Jaclaz
anewerauser
#37
Posted 15 April 2009 - 08:04 AM
Yep. (or chainloaded through another loader, such as grub4dos or Siblo, or syslinux chain.c32).Ok,Jaclaz.
Now I am fully aware of the fact that :
"SETUPLDR.BIN" must or should be loaded either from a "PHYSICAL BOOTSECTOR" or from
an "existing" BOOTSECTOR file.Right?
Why do you ask the user to offer the BOOTSECTOR ?
Can't your app extract the bootsector directly from the required partition?
If the answer is "no",which tool do you recommend to be used in extracting the BOOTSECTOR to give it to your app?
Are you sure the batch asks for a bootsector?
Are you really sure-sure?
Why don't you try using the batch?
(DO NOT use the /W parameter on first experiments....)
Or try reading the thread, here is a hint:
http://www.boot-land...?...=2362&st=23
Note that
ktp In the post number 33
asked a similar question which you have not [kindly]answered yet
I am taking notes , but ktp is a smart guy, and after having asked his question he also found himself the answers (they are actuallly not very hidden, all is needed is reading the thread):
since version 0.06 (actually 0.05) NTFS bootsector is supported:
http://www.boot-land...?...=2362&st=14
Have you ever actually tried using HDHacker?
Why do you think it has a drop down box for "LogicalDrives" to backup up to 16 sectors?
Another question which may seems out of topic but not so much:
Briefly, is the name of the folder "cmdcons" hard-coded and can NOT be edited ?
I want to load Recovery console from "Boot.ini "and I already has a folder calle cmdcons on the STICK.
I know that this can be done by GRUB4DOS,but I want to do it fromm "boot.ini" so i would be able to load different kinds of Recovery Console of XP 2000 2003 through boot.ini and the famous switch
Well, this is not a "Recovery Console" dedicated thread (though the bootsector hack was presented here):
http://www.boot-land...?...c=2362&st=7
You need to read threads related to Recovery Console, these:
http://www.boot-land...?showtopic=2254
http://www.boot-land...?showtopic=5316
http://www.911cd.net...showtopic=20983
http://www.911cd.net...showtopic=21049
http://www.911cd.net...showtopic=21312
Last one gives a hint, it's up to you to experiment with it.
jaclaz
#38
Posted 15 April 2009 - 10:32 AM
Not "as is", but it is a feature that it is possible to create, or add, using the MAKEBS.CMD and MBRBATCH.CMD as "example/skeleton".
What current makebs does is just:
1) take EXISTING bootsector
2) change the name of the loader
3) rewrite the bootsector
You see here that the batch NEEDS EXISTING bootsector.
Please elaborate .
#39
Posted 15 April 2009 - 10:50 AM
You see here that the batch NEEDS EXISTING bootsector.
Please elaborate .
Yep, it must EXIST , the whole point is WHERE should it exist?
On the normal place for a bootsector (i.e. starting from the first sector of the given partition )?
Or, as assumed without actually trying the batch, in a file stored somewhere , for which the batch quick help:
:HELP::<Command line usage:::<MakeBS Driveletter:\NewLoader [/W] [/A] [BootIniEntryText]::<Where:::<Driveletter can be any letter assigned to a partition from C: to Z:::<::<Newloader is the filename of the loader, it must already exist on root::<of the given Drive::<::<The output file will have the first part of the 8(+3) DOS given::<name for NewLoader with the .BS extension::<::<If you add the /W switch, the created bootsector will be written to::<the given drive, the use of the /W switch prevents the use of the /A::<one, as it makes no sense. ::< ::<If you add the /A switch, the program will attempt adding::<an entry to the BOOT.INI file on the given partition (if any)::< ::<If you add the [BootIniEntryText] as parameter, the program will use the ::<supplied string instead of the default "Load Newloader bootsector" ::< ::<The supplied string MUST be enclosed in double quotes!::<::<A copy of Original Bootsector is made on root of Drive as "BackupBS.ori"::< ::<Examples:::<MakeBS C:\SETUPLDR.BIN::<Will create a file C:\SETUPLDR.BS and a file C:\BackupBS.ori::< ::<MakeBS C:\MYLDR /A::<Will create a file C:\MYLDR.BS,a file C:\BackupBS.ori and add an entry in ::<BOOT.INI as this: C:\MYLDR.BS="Load MYLDR bootsector"::< ::<MakeBS C:\ANOTHER.LDR /A "Start custom bootsector"::<Will create a file C:\ANOTHER.BS AND add an entry in BOOT.INI as this:::<C:\ANOTHER.BS="Start custom bootsector"::<---------------------------------------------------------------------provides NO info (and doesn't allow/explains how to pass this supposedly needed parameter)?
There is NO help file, but if you run the batch in any directory without parameters or with /? as parameter it will display in the console window detailed usage info and links for the "inner engine" aka the dsfo.exe part of the DSFOK toolkit.
Since the "ALPHA" status of the release, the use and testing of the batch is suggested ONLY to
individuals that can be referred to as:
Now there's a frood who really knows where his towel is.
with, additionally, a decent knowledge of booting/multibooting in the DOS/NT/WINDOWS world.
Are you sure you know where your towel is?
jaclaz
#40
Posted 14 November 2012 - 02:26 AM
The /rollback parameter writes "undo" instead of "cmdcons" to the bootsector (at memory address: 0x0000:7c03).Now, the even more interesting thing is that the /rollback parameter:
http://support.micro...kb/312569/en-us
which is NOT listed here:
http://www.microsoft...on/bootini.mspx
appears to be working much in the same way, cannot say what it could be useful for, but I am going to experiment a bit with it too.
The rollback parameter is listed at http://www.geoffchap...editoptions.htm but not further info about what is supposed to do.
Maybe this parameter allows you to uninstall Windows XP Pro and go back to Windows 95/98/ME when installed on a FAT partition:
http://www.petri.co...._windows_xp.htm
#41
Posted 14 November 2012 - 11:22 AM
The "original" MSDOS5.0 8 character long string is replaced by "cmdcons/00", I presume (but haven't tested) that what is written will be "undo/00/00/00/00"
What supposedly does is also in the original MS article initially cited:
http://support.micro...kb/312569/en-us
The nice Geoff Chapel's article is about Vista and the way BOOTMGR or the BCD (or both) "emulate" BOOT.INI.
The original (only hinted ) question/doubt was attempting to go a bit further than knowing what the switch does (i.e. besides writing a different string to the bootsector).particularly when "The Boot.cab file does not exist" and if this sequence of actions could be adapted/tweaked/etc. to have this feature work for strange new uses....
You know, something *like* :
Space: the final frontier. These are the voyages of the starship Enterprise. Her ongoing mission: to explore strange new worlds, to seek out new life-forms and new civilizations; to boldly go where no one has gone before.
As an example from the info we have, and judging from the files that one has to copy if the "boot.cab" isn't found, it sounds a lot like a sort of Recovery Console or Setup booting and interpreting the TXTSETUP.SIF "the other way round".
The MS article seems to suggest that the summmed up procedure actually creates:
BUT the boot.ini entry seems like assuming that the file c:$win_nt$.~btbootsect.dat exists already.C:$ldr$
C:txtsetup.sif
C:undo <-Directory
c:undo*.txt
c:$win_nt$.~bt <-Directory
c:$win_nt$.~bti386 <-Directory
c:$win_nt$.~bti386autochk.exe
c:$win_nt$.~btsystem32 <-Directory
c:$win_nt$.~btsystem32smss.exe
c:$win_nt$.~btsystem32ntdll.dll
Which other files are involved?
Can we use the procedure to quickly remove (say) a "wrong" driver or a set of features from an installed OS?
Wonko
#42
Posted 02 August 2013 - 06:02 AM
are you still online?
#43
Posted 02 August 2013 - 07:19 AM
are you still online?
You talkin' to me?
Or to the Author of the batch?
http://reboot.pro/to...-all-the-bytes/
Wonko
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users