Hello dear guest!

Why not join our boot disk community? So do it. Life's short.

4 Pages V  < 1 2 3 4 >  
Reply to this topic
 MakeBS.cmd ALPHA RELEASE, A small batch file to modify NTLDR bootsectors
post Oct 1 2007, 11:39 AM
Post #21
jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06
Posts: 5,198
Thank(s): 361


Italy


MakeBS.cmd 0.07 ALPHA attached.

Now it:
- creates BackupBS.ori if no such file exists in Root of drive (no prompt)
- if it finds a BackupBS.ori file, it checks whether it's contents are the same of current bootsector and:
- if file is identical to current bootsector skips the creation of the BackupBS.ori (no prompt)
- if file is different prompts for overwriting (as before)

jaclaz
Attached File(s)
Attached File  MakeBS007.zip ( 3.01K ) Number of downloads: 406
 


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

Light Blue Ribbon Campaign for Freedom of Skin
+Quote Post
post Apr 3 2008, 10:50 AM
Post #22
ktp
Frequent Member   ***
Group: Advanced user

  Joined: 16-February 07
Posts: 424
Thank(s): 15


I am trying to understand what are the functional differences between Jaclaz's makebs.cmd versus Bart's mkbt.exe (and in less extent MS Vista bootsect.exe).

Is there one-size-fits-all utility ? smile.gif
+Quote Post
post Apr 11 2008, 02:16 PM
Post #23
ktp
Frequent Member   ***
Group: Advanced user

  Joined: 16-February 07
Posts: 424
Thank(s): 15


@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.
+Quote Post
post Apr 11 2008, 04:32 PM
Post #24
jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06
Posts: 5,198
Thank(s): 361


Italy


QUOTE (ktp @ Apr 11 2008, 03:16 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.


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

What you want is:
1) get "somewhere" an alternate bootsector
2) extract from existing bootsector just the partition data and volume number
3) rewrite the bootsector

As long as we are talking of the partition you booted from, this can be done by BOOTPART by Gilles Vollant:
http://www.winimage.com/bootpart.htm

Bootpart can do what you need/want entirely by itself if run under DOS, or can create a bootsector file to be later used by dsfo/dsfi to write it to the Logical Drive.

Bootpart stores internally a number of botsectors (English ones), a more general "native" solution should extract these bootsectors from FreeDOS, DOS, win9x/ME or 2K/XP system files, in order to have the same ones as if a "format" was performed from the "native" language corresponding Operating System, which would of course need that the final user would add the needed files to the working directory or however point the batch to them.

All in all, since the advent of grub4dos and it's direct system files chainloading, the easiest solution remains bootpart.
Since any DOS/FreeDOS/Win9X can only boot from First Active Partition on First Hard Disk, it is easy, even when for any reason you are working from a non-first hard disk or partition, to boot to it using grub4dos mapping and direct chainloading and then use bootpart from it.

Read this:
http://forum.winimage.com/viewtopic.php?t=276

jaclaz





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

Light Blue Ribbon Campaign for Freedom of Skin
+Quote Post
post Apr 11 2008, 05:17 PM
Post #25
ktp
Frequent Member   ***
Group: Advanced user

  Joined: 16-February 07
Posts: 424
Thank(s): 15


@jaclaz
Thank you very much for your explanations (and for your time wroting them down).
I found your following explanation really worthwhile:
QUOTE
All in all, since the advent of grub4dos and it's direct system files chainloading


This phrase is really synthethic and helps me now to understand better grub4dos. I always used grub4dos
without really having the "theory" behind it. It appears for me as a very powerful boot manager, and in fact
a boot loader too, and in fact is not depending on existing boot sector on a given partition.

So I can just simply chainload io.sys to get booting under DOS without requiring to change the partition boot sector.

This explains also:
Master bootloader (mbldr) http://sourceforge.net/projects/mbldr/ on contrary can boot partitions, but cannot chainload.
This is why mbldr cannot boot for example Mac OS X. but grub4dos or bootmgr (Vista) can chainload chain0 (or tboot) to boot
MAC OS X.
+Quote Post
post Apr 11 2008, 07:36 PM
Post #26
ilko
Frequent Member   ***
Group: Members

  Joined: 27-May 07
Posts: 196
Thank(s): 10


Bulgaria


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
+Quote Post
post Apr 12 2008, 04:17 AM
Post #27
jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06
Posts: 5,198
Thank(s): 361


Italy


QUOTE (ilko @ Apr 11 2008, 09:36 PM) *
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 File(s)
Attached File  MakeBS0071.zip ( 3.31K ) Number of downloads: 130
 


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

Light Blue Ribbon Campaign for Freedom of Skin
+Quote Post
post Apr 13 2008, 07:22 PM
Post #28
ilko
Frequent Member   ***
Group: Members

  Joined: 27-May 07
Posts: 196
Thank(s): 10


Bulgaria


Thanks Jaclaz.
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
+Quote Post
post Apr 22 2008, 02:13 PM
Post #29
ktp
Frequent Member   ***
Group: Advanced user

  Joined: 16-February 07
Posts: 424
Thank(s): 15


QUOTE (ktp @ Apr 11 2008, 03:16 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/nedlasting/mbrfix.htm
CODE
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.]
+Quote Post
post Apr 22 2008, 05:37 PM
Post #30
jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06
Posts: 5,198
Thank(s): 361


Italy


QUOTE (ktp @ Apr 22 2008, 03:13 PM) *
I found out that mbrfix can do that:
http://www.sysint.no/nedlasting/mbrfix.htm


Good find ! smile.gif

The feature has been added recently, it wasn't there some time ago.
QUOTE
Updated by Kåre Smith, 10. september 2007


I guess I will have to update the pseudo-GUI for it:
http://home.graffiti.net/jaclaz:graffiti.net/index.html

it's more than two years old, and it shows it! wink.gif

jaclaz


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

Light Blue Ribbon Campaign for Freedom of Skin
+Quote Post

4 Pages V  < 1 2 3 4 >
Reply to this topic
7 User(s) are reading this topic ()

Members Who Viewed Topic Today ()

Collapse

  Topic Replies Topic Starter Views Last Action
No new Topic has attachmentsRelease candidate of plop with USB support
26 jaclaz 5,852 9th October 2007 - 06:09 PM
Last post by: ktp
No New Posts Topic has attachmentsRelease 52
Some open issues
11 psc 2,573 8th November 2006 - 11:40 PM
Last post by: Nuno Brito


Display Mode: Standard · Switch to: Linear+ · Switch to: Outline