18-Ноя-2004 00:25 [EMAIL PROTECTED] (Bernd Blaauw) wrote to

>>     What about grub/lilo? What about other bootloaders, which not yet known
>>at time of writing/compiling OSCHECK? (I mean, adding some lines with FIND
>>is easier with (noncompilable) batch file).
BB> I lack the tools to determine 'there is NO (VALID) bootsector on this
BB> harddisk'.

     There is no absolutely safe method to detect "valid" bootsector,
especially because there are variety of file systems and conditions, when
bootsector may become invalid (for example, removing OS kernel files, which
loaded from boot sector).

BB> If there's no known bootsector, and we still want a bootable FreeDOS,
BB> then there's no other solution than doing SYS C: ,
BB> which overwrites the unknown bootloaders.

     Why not ask user before overwriting? (Sometime) user knows better,
which OSes (s)he have and when there already present valid bootloader.

BB> A solution is desirable though. Eric did not see the need to make the
BB> bootsector finder generic enough
BB> ("kernel file 'filename' exists both on root of partition and as string
BB> in capitals on that same partition")
BB> However, that was ASM, so it might be more difficult to do that.

     To make more generic solution, discussed utility may get some
arguments, which specify requested search (and not to built-in inside). For

isboot mbr "<string for lilo>"
if errorlevel
isboot c: "<string for XP bootloader>" boot.ini ntldr
if errorlevel 3 goto no_such_drive_letter
if errorlevel 2 goto requested_files_not_found_in_root
if errorlevel 1 goto no_such_string_in_bootsector

(first call searches in mbr requested string, second call searches requested
string in bootsector of C: and requested file(s) in root directory). To make
search through all drive letters, better to make isboot more generic:

isboot *: "<string for XP bootloader>" boot.ini ntldr
if errorlevel 3 goto no_defined_drive_letter_from_C_to_Z
if errorlevel 2 goto requested_files_not_found_in_all_roots
if errorlevel 1 goto no_such_string_in_all_bootsectors

This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
Freedos-user mailing list

Reply via email to