about small bug

Ask your support questions in here

Moderator: Moderator Team

Post Reply
mnzn2530
Posts: 2
Joined: Fri Jan 16, 2009 4:25 pm

about small bug

Post by mnzn2530 »

version is 0.3.7 in \reactos-0.3.7\boot\freeldr\bootsect\isoboot.asm

today, I am debug this file, found debug information is turn off.like this:
;%define DEBUG_MESSAGES Uncomment to get debugging messages

mean if this isn't comment, next is active:
%ifdef DEBUG_MESSAGES
mov si, isolinux_banner ; si points to hello message
call writestr ; display the message
mov si,copyright_str
call writestr
%endif

but auther seem don't found there is a line at the end of file :

times 2046-($-$$) db 0 ; Pad to file offset 2046


if debug is turn on, erris here:

isoboot.asm:1022: error: TIMES value -100 is negative

end of file is overflow. ok let add file to this:

times 2146-($-$$) db 0 ; Pad to file offset 2046

and now, isoboot.bin is build, but in boot stage, I found I can't boot computer.
and i haven't debug it.

I think It's helpful for developer.

thank for your work.

Lone_Rifle
Test Team
Posts: 802
Joined: Thu Apr 03, 2008 2:17 pm
Contact:

Re: about small bug

Post by Lone_Rifle »

We have a patch available for this in

http://www.reactos.org/bugzilla/show_bug.cgi?id=2470

But the author has since abandoned the patch. We cannot commit this into trunk unless we understand what it does. Will you like to help examine and document it? (Don't worry, you'll find the isoboot has not changed much between 0.3.3 and 0.3.7)

led-bloon
Posts: 27
Joined: Fri Jan 09, 2009 10:08 am

Re: about small bug

Post by led-bloon »

I am just finding my way around the ReactOS code in general, but have looked at your problem.
You cannot just change the 2048 to 2148 as this will move the boot sector signature from it's
allocated position - hence you can't boot!
I have checked the bin file created (without any debug info) and there appears to be 300+ bytes left.
I believe that enabling debug code pushes the size of the file out of its limits (2048 bytes).
I think I can fix this, but will take a little time.
Rgds
Don
:(
AMD Athlon 2650e - Windows XP Home SP3 - VMWare Player v2

led-bloon
Posts: 27
Joined: Fri Jan 09, 2009 10:08 am

Re: about small bug

Post by led-bloon »

Ooops, sri 2046 to 2146 (effectively making it 2048 to 2148) :oops:
AMD Athlon 2650e - Windows XP Home SP3 - VMWare Player v2

User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: about small bug

Post by Black_Fox »

Patch author's name can be found here

vicmarcal
Test Team
Posts: 2732
Joined: Mon Jul 07, 2008 12:35 pm

Re: about small bug

Post by vicmarcal »

Led join us in IRC channel maybe you can help us with this issue, we need your help with it.There if you (also) have any doubts will be answered faster ;)

cigar
Posts: 2
Joined: Sat Jan 03, 2009 4:45 am

Re: about small bug

Post by cigar »

fixed by mangling strings to be smaller. if you can do better, go for it.


Index: boot/freeldr/bootsect/isoboot.asm
===================================================================
--- boot/freeldr/bootsect/isoboot.asm (revision 38804)
+++ boot/freeldr/bootsect/isoboot.asm (working copy)
@@ -932,39 +932,39 @@



-isolinux_banner db CR, LF, 'Loading IsoBoot...', CR, LF, 0
-copyright_str db ' Copyright (C) 1994-2002 H. Peter Anvin', CR, LF, 0
+isolinux_banner db CR, LF, 'Loading IsoBoot', CR, LF, 0
+copyright_str db 'Copyright 1994-2002 H. Peter Anvin', CR, LF, 0
presskey_msg db 'Press any key to boot from CD', 0
dot_msg db '.',0

%ifdef DEBUG_MESSAGES
-startup_msg: db 'Starting up, DL = ', 0
-spec_ok_msg: db 'Loaded spec packet OK, drive = ', 0
+startup_msg: db 'Starting, DL=', 0
+spec_ok_msg: db 'Loaded spec packet, drive:', 0
secsize_msg: db 'Sector size appears to be ', 0
-rootloc_msg: db 'Root directory location: ', 0
-rootlen_msg: db 'Root directory length: ', 0
-rootsect_msg: db 'Root directory length(sectors): ', 0
-fileloc_msg: db 'SETUPLDR.SYS location: ', 0
-filelen_msg: db 'SETUPLDR.SYS length: ', 0
-filesect_msg: db 'SETUPLDR.SYS length(sectors): ', 0
-findfail_msg: db 'Failed to find file!', 0
+rootloc_msg: db 'Root dir location:', 0
+rootlen_msg: db 'Root dir length:', 0
+rootsect_msg: db 'Root dir length(sectors):', 0
+fileloc_msg: db 'SETUPLDR.SYS location:', 0
+filelen_msg: db 'SETUPLDR.SYS length:', 0
+filesect_msg: db 'SETUPLDR.SYS length(sectors):', 0
+findfail_msg: db 'Failed to find file', 0
startldr_msg: db 'Starting SETUPLDR.SYS', 0
%endif

nosecsize_msg: db 'Failed to get sector size, assuming 0800', CR, LF, 0
-spec_err_msg: db 'Loading spec packet failed, trying to wing it...', CR, LF, 0
-maybe_msg: db 'Found something at drive = ', 0
-alright_msg: db 'Looks like it might be right, continuing...', CR, LF, 0
-nothing_msg: db 'Failed to locate CD-ROM device; boot failed.', CR, LF, 0
-isolinux_str db 'IsoBoot: ', 0
+spec_err_msg: db 'Loading spec packet fail, try wing it', CR, LF, 0
+maybe_msg: db 'Found something at drive:', 0
+alright_msg: db 'Might be right, continuing', CR, LF, 0
+nothing_msg: db 'Failed to locate CD-ROM device; boot failed', CR, LF, 0
+isolinux_str db 'IsoBoot:', 0
crlf_msg db CR, LF, 0
-diskerr_msg: db 'Disk error ', 0
+diskerr_msg: db 'Disk error', 0
ondrive_str: db ', drive ', 0
-err_bootfailed db CR, LF, 'Boot failed: press a key to retry...'
+err_bootfailed db CR, LF, 'Boot fail: press a key to retry'
isolinux_dir db '\LOADER', 0
-no_dir_msg db 'Could not find the LOADER directory.', CR, LF, 0
+no_dir_msg db 'LOADER dir not found', CR, LF, 0
isolinux_bin db 'SETUPLDR.SYS', 0
-no_isolinux_msg db 'Could not find SETUPLDR.SYS.', CR, LF, 0
+no_isolinux_msg db 'SETUPLDR.SYS not found', CR, LF, 0

;
; El Torito spec packet

Lone_Rifle
Test Team
Posts: 802
Joined: Thu Apr 03, 2008 2:17 pm
Contact:

Re: about small bug

Post by Lone_Rifle »

Please upload the above patch as an attachment to
http://www.reactos.org/bugzilla/show_bug.cgi?id=2470

cigar, if you could, could you also test and inspect the first patch? Would like you to pick whichever is the better patch and if it happens to be the first one, could you help study and document it? Thanks!

mnzn2530
Posts: 2
Joined: Fri Jan 16, 2009 4:25 pm

Re: about small bug

Post by mnzn2530 »

what can I do for you?

sorry for my poor english.

cigar
Posts: 2
Joined: Sat Jan 03, 2009 4:45 am

Re: about small bug

Post by cigar »

The changes moving mov si, message; call writestr into a print macro aren't meaningful. I'm not sure about the other changes.

Post Reply

Who is online

Users browsing this forum: DotBot [Crawler], Google [Bot], Semrush [Bot] and 2 guests