Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Saturday, March 03, 2012 3:59:19 am rank1see...@gmail.com wrote: Using: MD5 (boot2_test.patch) = c2d6d2c9806df5915419987f200c05af Still fails to build. /usr/src/sys/boot/i386/boot2/boot2.c: In function 'main': /usr/src/sys/boot/i386/boot2/boot2.c:282: error: expected ':' before ')' token My test build didn't actually build all of boot2. This should be fixed now. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Mon, 5 Mar 2012 12:44:44 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, March 03, 2012 3:59:19 am rank1see...@gmail.com wrote: Using: MD5 (boot2_test.patch) = c2d6d2c9806df5915419987f200c05af Still fails to build. /usr/src/sys/boot/i386/boot2/boot2.c: In function 'main': /usr/src/sys/boot/i386/boot2/boot2.c:282: error: expected ':' before ')' token My test build didn't actually build all of boot2. This should be fixed now. -- John Baldwin Using: MD5 (boot2_test.patch) = b06e290859041cefc8ab38df37d06a36 Built and installed ... Checking 2 times in a row ... BINGO! It works! Excellent job John! ;) So, what was an issue? Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Monday, March 05, 2012 1:18:03 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Mon, 5 Mar 2012 12:44:44 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, March 03, 2012 3:59:19 am rank1see...@gmail.com wrote: Using: MD5 (boot2_test.patch) = c2d6d2c9806df5915419987f200c05af Still fails to build. /usr/src/sys/boot/i386/boot2/boot2.c: In function 'main': /usr/src/sys/boot/i386/boot2/boot2.c:282: error: expected ':' before ')' token My test build didn't actually build all of boot2. This should be fixed now. -- John Baldwin Using: MD5 (boot2_test.patch) = b06e290859041cefc8ab38df37d06a36 Built and installed ... Checking 2 times in a row ... BINGO! It works! Excellent job John! ;) So, what was an issue? The problem is that in your case when you used a custom loader string, kname was set to point to 'cmd', but 'cmd' is set to an empty string (to avoid re-parsing it) after the initial parse is done. This caused kname to point to an empty string. Even worse, if a user entered some unparseable text, with kname pointing at 'cmd', kname could effectively be overwritten with garbage. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 17:20:11 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 2:58:16 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 14:46:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 1:46:37 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 12:24:24 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 10:17:03 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Ah, was using sizeof() on the wrong thing, and I have a fix for the garbage you saw for kname as well. Patch is updated at the normal URL. Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) Actually, you've been rather rude for the entire thread, I am just doing my best to ignore it in the interest of getting the bug fixed. -- John Baldwin I'm sorry if you think so, especially part where I am rude through the entire thread. That I can hardly believe. I am also actively testing and am persistant in solving issue. Or is problem in my perception? I think it may just be that your language comes off as being a bit demanding, plus a fair bit of all caps, etc. If English is not your native language then that may also be a factor. If you are not intending to be rude then that is plenty good enough for me. :) Anyway, yours latest patch has a same md5 hash as a previous one and also built binary /boot/boot had same md5 hash. So I've simply skipped installing boot code. Yes, my bad, I updated it locally but forgot to upload it to the URL. It should really be updated now. -- John Baldwin Using MD5 (boot2_test.patch) = 05c46840163f789d362b46bf51b6c79f I can't build it. # cd /sys/boot # make clean make obj make depend make make install make clean -- === i386/boot2 (all) objcopy -S -O binary boot1.out boot1 dd if=/dev/zero of=boot2.ldr bs=512 count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.000116 secs (4409617 bytes/sec) cc -Os -fno-guess-branch-probability -fomit-frame-pointer -fno-unit-at-a-time -mno-align-long-strings -mrtd -mregparm=3 -DUSE_XREAD - DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common - I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing- prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -Winline --param max-inline-insns-single=100 - ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99 -S -o boot2.s.tmp /usr/src/sys/boot/i386/boot2/boot2.c /usr/src/sys/boot/i386/boot2/boot2.c: In function 'main': /usr/src/sys/boot/i386/boot2/boot2.c:282: error: expected ':' before ')' token /usr/src/sys/boot/i386/boot2/boot2.c: In function 'parse': /usr/src/sys/boot/i386/boot2/boot2.c:468: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type Oops, should be fixed now. -- John Baldwin Using: MD5 (boot2_test.patch
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On 2 Mar 2012 15:17, rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) That was sent privately for a reason. Please respect that in future. Chris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: Chris Rees utis...@gmail.com To: rank1see...@gmail.com Cc: Andriy Gapon a...@freebsd.org, hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, John Baldwin j...@freebsd.org Date: Sat, 3 Mar 2012 09:38:26 + Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On 2 Mar 2012 15:17, rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) That was sent privately for a reason. Please respect that in future. Chris Sorry. I really didn't notice. I've simply started to reply to his message, which was destined to all. Then I've cut your mail with same subject and answered, to put it all in 1 email. This spared me of sending 3 emails. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Thursday, March 01, 2012 5:23:11 pm Doug Barton wrote: On 3/1/2012 1:14 PM, John Baldwin wrote: My firefox on my BSD desktop was caching the image. Holding down Shift when clicking reload usually handles this. Only if you already know that FF is incorrectly caching the image. :( -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Friday, March 02, 2012 10:17:03 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Ah, was using sizeof() on the wrong thing, and I have a fix for the garbage you saw for kname as well. Patch is updated at the normal URL. Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) Actually, you've been rather rude for the entire thread, I am just doing my best to ignore it in the interest of getting the bug fixed. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On 03/02/2012 08:52, John Baldwin wrote: On Thursday, March 01, 2012 5:23:11 pm Doug Barton wrote: On 3/1/2012 1:14 PM, John Baldwin wrote: My firefox on my BSD desktop was caching the image. Holding down Shift when clicking reload usually handles this. Only if you already know that FF is incorrectly caching the image. :( True'ish (since incorrectly depends on a lot of details that are outside the scope of this thread) but isn't it always a safe assumption that browsers are doing something other than what we want in order to help us? :) -- This .signature sanitized for your protection ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 12:24:24 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 10:17:03 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Ah, was using sizeof() on the wrong thing, and I have a fix for the garbage you saw for kname as well. Patch is updated at the normal URL. Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) Actually, you've been rather rude for the entire thread, I am just doing my best to ignore it in the interest of getting the bug fixed. -- John Baldwin I'm sorry if you think so, especially part where I am rude through the entire thread. That I can hardly believe. I am also actively testing and am persistant in solving issue. Or is problem in my perception? Anyway, yours latest patch has a same md5 hash as a previous one and also built binary /boot/boot had same md5 hash. So I've simply skipped installing boot code. Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Friday, March 02, 2012 1:46:37 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 12:24:24 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 10:17:03 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Ah, was using sizeof() on the wrong thing, and I have a fix for the garbage you saw for kname as well. Patch is updated at the normal URL. Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) Actually, you've been rather rude for the entire thread, I am just doing my best to ignore it in the interest of getting the bug fixed. -- John Baldwin I'm sorry if you think so, especially part where I am rude through the entire thread. That I can hardly believe. I am also actively testing and am persistant in solving issue. Or is problem in my perception? I think it may just be that your language comes off as being a bit demanding, plus a fair bit of all caps, etc. If English is not your native language then that may also be a factor. If you are not intending to be rude then that is plenty good enough for me. :) Anyway, yours latest patch has a same md5 hash as a previous one and also built binary /boot/boot had same md5 hash. So I've simply skipped installing boot code. Yes, my bad, I updated it locally but forgot to upload it to the URL. It should really be updated now. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 14:46:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 1:46:37 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 12:24:24 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 10:17:03 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Ah, was using sizeof() on the wrong thing, and I have a fix for the garbage you saw for kname as well. Patch is updated at the normal URL. Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) Actually, you've been rather rude for the entire thread, I am just doing my best to ignore it in the interest of getting the bug fixed. -- John Baldwin I'm sorry if you think so, especially part where I am rude through the entire thread. That I can hardly believe. I am also actively testing and am persistant in solving issue. Or is problem in my perception? I think it may just be that your language comes off as being a bit demanding, plus a fair bit of all caps, etc. If English is not your native language then that may also be a factor. If you are not intending to be rude then that is plenty good enough for me. :) Anyway, yours latest patch has a same md5 hash as a previous one and also built binary /boot/boot had same md5 hash. So I've simply skipped installing boot code. Yes, my bad, I updated it locally but forgot to upload it to the URL. It should really be updated now. -- John Baldwin Using MD5 (boot2_test.patch) = 05c46840163f789d362b46bf51b6c79f I can't build it. # cd /sys/boot # make clean make obj make depend make make install make clean -- === i386/boot2 (all) objcopy -S -O binary boot1.out boot1 dd if=/dev/zero of=boot2.ldr bs=512 count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.000116 secs (4409617 bytes/sec) cc -Os -fno-guess-branch-probability -fomit-frame-pointer -fno-unit-at-a-time -mno-align-long-strings -mrtd -mregparm=3 -DUSE_XREAD -DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common -I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -Winline --param max-inline-insns-single=100 -ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99 -S -o boot2.s.tmp /usr/src/sys/boot/i386/boot2/boot2.c /usr/src/sys/boot/i386/boot2/boot2.c: In function 'main': /usr/src/sys/boot/i386/boot2/boot2.c:282: error: expected ':' before ')' token /usr/src/sys/boot/i386/boot2/boot2.c: In function 'parse': /usr/src/sys/boot/i386/boot2/boot2.c:468: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type *** [boot2.s] Error code 1 Stop in /usr/src/sys/boot/i386/boot2. *** [all] Error code 1 Stop in /usr/src/sys/boot/i386. *** [all] Error code 1 Stop in /usr/src/sys/boot. -- Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Friday, March 02, 2012 2:58:16 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 14:46:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 1:46:37 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Fri, 2 Mar 2012 12:24:24 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, March 02, 2012 10:17:03 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org, Andriy Gapon a...@freebsd.org Date: Thu, 1 Mar 2012 16:14:43 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) However, avg@ might have found the actual cause of the bug. And Roman did indeed break this earlier. Try the updated boot2_test.patch again. You should still try this. -- John Baldwin Using patch: MD5 (boot2_test.patch) = 72412f9b47b114302268561f12c1b46b http://www.starforce.biz/stage2boot_1.jpg This is the worst patch as even RE-typing doesn't work. That is, it is completely unable to boot. Throw me another patch! Ah, was using sizeof() on the wrong thing, and I have a fix for the garbage you saw for kname as well. Patch is updated at the normal URL. Please don't treat John this way. He has put in a lot of time for you, and many others, and is one of THE experts. Chris He didn't got a bad treatment, nor any side is angry. Relax! ;) Actually, you've been rather rude for the entire thread, I am just doing my best to ignore it in the interest of getting the bug fixed. -- John Baldwin I'm sorry if you think so, especially part where I am rude through the entire thread. That I can hardly believe. I am also actively testing and am persistant in solving issue. Or is problem in my perception? I think it may just be that your language comes off as being a bit demanding, plus a fair bit of all caps, etc. If English is not your native language then that may also be a factor. If you are not intending to be rude then that is plenty good enough for me. :) Anyway, yours latest patch has a same md5 hash as a previous one and also built binary /boot/boot had same md5 hash. So I've simply skipped installing boot code. Yes, my bad, I updated it locally but forgot to upload it to the URL. It should really be updated now. -- John Baldwin Using MD5 (boot2_test.patch) = 05c46840163f789d362b46bf51b6c79f I can't build it. # cd /sys/boot # make clean make obj make depend make make install make clean -- === i386/boot2 (all) objcopy -S -O binary boot1.out boot1 dd if=/dev/zero of=boot2.ldr bs=512 count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.000116 secs (4409617 bytes/sec) cc -Os -fno-guess-branch-probability -fomit-frame-pointer -fno-unit-at-a-time -mno-align-long-strings -mrtd -mregparm=3 -DUSE_XREAD - DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common - I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing- prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -Winline --param max-inline-insns-single=100 - ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99 -S -o boot2.s.tmp /usr/src/sys/boot/i386/boot2/boot2.c /usr/src/sys/boot/i386/boot2/boot2.c: In function 'main': /usr/src/sys/boot/i386/boot2/boot2.c:282: error: expected ':' before ')' token /usr/src/sys/boot/i386/boot2/boot2.c: In function 'parse': /usr/src/sys/boot/i386/boot2/boot2.c:468: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type Oops, should be fixed now. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b File being patched: MD5 (/sys/boot/i386/boot2/boot2.c) = 2c3fe29ced282a6fccf84e9061bb3d68 Your patch received via attachment: MD5 (boot2_test.patch) = f750c1275f45aeded970c3014a50f333 And on your side it is: '888f90f32bd20d1bf7e2d3277d9b697b', which is a PATCH MISMATCH. It is best to give me patches, as you did up to now, via url. Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Thursday, March 01, 2012 10:42:27 am rank1see...@gmail.com wrote: Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b File being patched: MD5 (/sys/boot/i386/boot2/boot2.c) = 2c3fe29ced282a6fccf84e9061bb3d68 Your patch received via attachment: MD5 (boot2_test.patch) = f750c1275f45aeded970c3014a50f333 And on your side it is: '888f90f32bd20d1bf7e2d3277d9b697b', which is a PATCH MISMATCH. It is best to give me patches, as you did up to now, via url. Hmm, I thought you asked for it to be an attachment previously. I just saved the attachment out of my saved copy of the e-mail and it MD5'd correctly here, so I've no idea why it didn't show up correct on your end. Perhaps something mangled it in the middle. I will only send you URLs for the future. http://www.FreeBSD.org/~jhb/patches/boot2_test.patch -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 16:05:08 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Wednesday, February 29, 2012 3:08:36 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 11:26:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b I'll give you a hint (which I've mentioned at start) In order to expose bug, 2 conditions have to be met: 1) boot.config in use 2) daX device (i.e; USB stick) That is ... I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots. BUT when I 'dd' it to USB's slice it hangs. USB booting uses a different chunk of BIOS code, and it may be doing different things which result in uninitialized memory having different values (e.g. the cmd[] array). -- John Baldwin Using new: MD5 (boot2_test.patch) = 01cc3a9dda1f1ecbd5125092ebccc476 Result is: http://www.starforce.biz/stage2boot.jpg Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Thursday, March 01, 2012 3:02:35 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 16:05:08 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Wednesday, February 29, 2012 3:08:36 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 11:26:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b I'll give you a hint (which I've mentioned at start) In order to expose bug, 2 conditions have to be met: 1) boot.config in use 2) daX device (i.e; USB stick) That is ... I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots. BUT when I 'dd' it to USB's slice it hangs. USB booting uses a different chunk of BIOS code, and it may be doing different things which result in uninitialized memory having different values (e.g. the cmd[] array). -- John Baldwin Using new: MD5 (boot2_test.patch) = 01cc3a9dda1f1ecbd5125092ebccc476 Hmmm, it seems you have autoboot == 0, but kname set (but you didn't get the printf where autoboot is set to 0, and you didn't get the printf where kname is set to a non-NULL value). I'll update the patch again (same URL), but if you don't get any new messages, then I suspect you aren't actually using the new boot2. You do realize you have to use gpart to install the new boot code on the USB stick after you have built it, yes? -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Thu, 1 Mar 2012 15:43:25 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Thursday, March 01, 2012 3:02:35 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 16:05:08 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Wednesday, February 29, 2012 3:08:36 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 11:26:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b I'll give you a hint (which I've mentioned at start) In order to expose bug, 2 conditions have to be met: 1) boot.config in use 2) daX device (i.e; USB stick) That is ... I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots. BUT when I 'dd' it to USB's slice it hangs. USB booting uses a different chunk of BIOS code, and it may be doing different things which result in uninitialized memory having different values (e.g. the cmd[] array). -- John Baldwin Using new: MD5 (boot2_test.patch) = 01cc3a9dda1f1ecbd5125092ebccc476 Hmmm, it seems you have autoboot == 0, but kname set (but you didn't get the printf where autoboot is set to 0, and you didn't get the printf where kname is set to a non-NULL value). I'll update the patch again (same URL), but if you don't get any new messages, then I suspect you aren't
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Thursday, March 01, 2012 3:58:02 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Thu, 1 Mar 2012 15:43:25 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Thursday, March 01, 2012 3:02:35 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 16:05:08 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Wednesday, February 29, 2012 3:08:36 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 11:26:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b I'll give you a hint (which I've mentioned at start) In order to expose bug, 2 conditions have to be met: 1) boot.config in use 2) daX device (i.e; USB stick) That is ... I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots. BUT when I 'dd' it to USB's slice it hangs. USB booting uses a different chunk of BIOS code, and it may be doing different things which result in uninitialized memory having different values (e.g. the cmd[] array). -- John Baldwin Using new: MD5 (boot2_test.patch) = 01cc3a9dda1f1ecbd5125092ebccc476 Hmmm, it seems you have autoboot == 0, but kname set (but you didn't get
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Thursday, March 01, 2012 4:09:58 pm John Baldwin wrote: On Thursday, March 01, 2012 3:58:02 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Thu, 1 Mar 2012 15:43:25 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Thursday, March 01, 2012 3:02:35 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 16:05:08 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Wednesday, February 29, 2012 3:08:36 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 11:26:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b I'll give you a hint (which I've mentioned at start) In order to expose bug, 2 conditions have to be met: 1) boot.config in use 2) daX device (i.e; USB stick) That is ... I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots. BUT when I 'dd' it to USB's slice it hangs. USB booting uses a different chunk of BIOS code, and it may be doing different things which result in uninitialized memory having different values (e.g
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On 3/1/2012 1:14 PM, John Baldwin wrote: My firefox on my BSD desktop was caching the image. Holding down Shift when clicking reload usually handles this. hth, Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Index: boot/i386/boot2/boot2.c === --- boot/i386/boot2/boot2.c (revision 232297) +++ boot/i386/boot2/boot2.c (working copy) @@ -225,6 +225,7 @@ { uint8_t autoboot; ino_t ino; +size_t nbyte; kname = NULL; dmadat = (void *)(roundup2(__base + (int32_t)_end, 0x1) - __base); @@ -241,13 +242,17 @@ autoboot = 1; -if ((ino = lookup(PATH_CONFIG))) - fsread(ino, cmd, sizeof(cmd)); +if ((ino = lookup(PATH_CONFIG))) { + nbyte = fsread(ino, cmd, sizeof(cmd) - 1); + cmd[nbyte] = '\0'; +} if (*cmd) { memcpy(cmddup, cmd, sizeof(cmd)); - if (parse()) + if (parse()) { autoboot = 0; + printf(parse() failed\n); + } if (!OPT_CHECK(RBX_QUIET)) printf(%s: %s, PATH_CONFIG, cmddup); /* Do not process this command twice */ @@ -260,6 +265,7 @@ */ if (autoboot !kname) { + printf(default loader\n); kname = PATH_BOOT3; if (!keyhit(3*SECOND)) { load(); ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 11:26:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Hmm... Looks like a unified diff to me... The text leading up to this was: -- |Index: boot/i386/boot2/boot2.c |=== |--- boot/i386/boot2/boot2.c(revision 232297) |+++ boot/i386/boot2/boot2.c(working copy) -- Patching file /sys/boot/i386/boot2/boot2.c using Plan A... Hunk #1 failed at 225. Hunk #2 failed at 242. Hunk #3 failed at 265. 3 out of 3 hunks failed--saving rejects to /sys/boot/i386/boot2/boot2.c.rej Hmm... Ignoring the trailing garbage. done I'll give you a hint (which I've mentioned at start) In order to expose bug, 2 conditions have to be met: 1) boot.config in use 2) daX device (i.e; USB stick) That is ... I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots. BUT when I 'dd' it to USB's slice it hangs. Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Wednesday, February 29, 2012 3:08:36 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Wed, 29 Feb 2012 11:26:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Tuesday, February 28, 2012 3:09:06 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) It was not as obvious before, and you are seeing a failure that no one else has reported, so you need to be patient. Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Ok. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Ok. That will take a bit longer to fix, but that is ok. I've attached a new patch with some debugging output. It shouldn't fix the problem yet, but I want to see if any of the new messages are output, and when they are output. How could it silently loose documented functionality? Several changes were made to boot2 to make it smaller so it could be compiled with clang, and it seems that at least one of those changes must have had a bug. -- John Baldwin Patch fails at 9.0 RELEASE: (Is this for 9 STABLE?) Nope, patch was made against a 9.0 tree: % svn info . Path: . URL: svn+ssh://svn.freebsd.org/base/releng/9.0/sys Repository Root: svn+ssh://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 232297 Node Kind: directory Schedule: normal Last Changed Author: kensmith Last Changed Rev: 229283 Last Changed Date: 2012-01-02 09:45:30 -0500 (Mon, 02 Jan 2012) % svn stat boot/i386/boot2 M boot/i386/boot2/boot2.c % svn diff boot/i386/boot2 | md5 888f90f32bd20d1bf7e2d3277d9b697b And the file I sent to you before: % md5 ~/work/patches/boot2_test.patch MD5 (/home/jhb/work/patches/boot2_test.patch) = 888f90f32bd20d1bf7e2d3277d9b697b I'll give you a hint (which I've mentioned at start) In order to expose bug, 2 conditions have to be met: 1) boot.config in use 2) daX device (i.e; USB stick) That is ... I've created vnode image. Then, ... when I 'dd' it to HDD's slice, it boots. BUT when I 'dd' it to USB's slice it hangs. USB booting uses a different chunk of BIOS code, and it may be doing different things which result in uninitialized memory having different values (e.g. the cmd[] array). -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Mon, 27 Feb 2012 11:23:59 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. I've already explained that, numerous times (RE-typing ...) Image is STILL valid for this latest patch. It is also valid for your latest patch Hmm, I think the problem is that 'opts' has garbage instead of being initialized to zero. Try this (also at www.freebsd.org/~jhb/patches/boot2_opts.patch): Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. What I meant was that I won't manually(edit file) apply patch, but via 'patch' tool/bin. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? I don't do nor understand c code. Oh, garbage in cmd[] could be bad. We might read beyond the end of the file. Try http://www.FreeBSD.org/~jhb/patches/boot2_cmd.patch -- John Baldwin ... Ah, 9.0 doesn't have the /boot/config support. Try www.freebsd.org/~jhb/patches/boot2_cmd_9.0.patch -- John Baldwin How could it silently loose documented functionality? It still doesn't work, Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Saturday, February 25, 2012 9:41:48 am rank1see...@gmail.com wrote: Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg Ahh, this is helpful. You do see the '/boot.config: /loader' message. It is also valid for your latest patch Hmm, I think the problem is that 'opts' has garbage instead of being initialized to zero. Try this (also at www.freebsd.org/~jhb/patches/boot2_opts.patch): Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. I have no idea what you mean here. However, it seems you don't have junk in your 'opts' variable anyway. Hmm, you could try adding some more debugging to boot2.c to see exactly what is failing. For example, does the first call to 'parse()' fail and clear autoboot? Oh, garbage in cmd[] could be bad. We might read beyond the end of the file. Try http://www.FreeBSD.org/~jhb/patches/boot2_cmd.patch -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Fri, 24 Feb 2012 15:31:11 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 24, 2012 2:11:52 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Fri, 24 Feb 2012 12:23:45 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 24, 2012 9:05:54 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: freebsd-hackers@freebsd.org Cc: rank1see...@gmail.com, Roman Divacky rdiva...@freebsd.org Date: Thu, 23 Feb 2012 08:02:04 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 17, 2012 2:43:55 am rank1see...@gmail.com wrote: Anyway, after upgrading to 9.0, my USB stick, when created, started to hang at stage 2 boot. I have a custom setup, where BSD label 'a', has a content of /boot/* So when 'a' is being hit by stage 2 boot, there is boot.config waiting for it. After it reads it and displays it's content, it echos 'No' and hangs. I stare at it and can't believe as boot.config's information is correct! I hit '?' and it list all files in 'a'. Then I simply RE-type what is displayed on screen (content of boot.config - path to loader) And loader kicks in! I do this a few times more and EACH time I have to RE-type correct info! Tested on other machine, same thing. However, this same custom layout works for HDD's, but NOT for USB stick. I've extracted binary installs of 8.2 and 9.0 R: MD5 (8_boot) = adb1e84e96bd434e51cafaaa0ef22584 MD5 (9_boot) = 40f3f6403ebd5e131259d1336b4b50ad Then: # gpart bootcode -b 8_boot da0s2 And sudenly that USB stick boots, without ANY other change! Just an old stage 2 boot code, from R8 was enough. Looks like it is thinking that 'kname' is empty. Ah, I think Roman broke this in 219186: @@ -474,11 +461,7 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i = sizeof(kname)) - return -1; - memcpy(kname, arg, i + 1); - } +kname = arg; } arg = p; } Before it only set kname if it wasn't an empty string. Now it always sets kname. Try this change: Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working copy) @@ -457,7 +457,8 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } -kname = arg; + if (*arg != '\0') + kname = arg; } arg = p; } -- John Baldwin It still doesn't work! And please, next time attach patch in a file (unified format), so I would have a less hassle (to avoid manuall patch application) Hmm, our mailing lists each attachments, so you are less likely to get the patch that way. Do you still get 'No ' with no other message before it breaks? I get 'No ' with no other message before it HANGS waiting for manual input? Manual input makes it work. I simply RE-type outputed contest of boot.config file. Can you show me the contents of your /boot.config file via hd? Both USB stick and HDD have a same boot.config file, contents: --- /loader --- Hmm, you didn't pass it to hd(1) like I asked. Anyway, I hacked up a test program to run the parse() routine from boot2.c and it DTRT. # hd boot.config 2f 6c 6f 61 64 65 72 0a |/loader.| 0008 Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? I don't have RBX_QUIET enabled nor any other flags Let the pic tell a story: http://www.starforce.biz/stage2boot.jpg It is also valid for your latest patch Hmm, I think the problem is that 'opts' has garbage instead of being initialized to zero. Try this (also at www.freebsd.org/~jhb/patches/boot2_opts.patch): Patch eliminates possible error, of manual intervention That is, a perfectly valid patch being classified as invalid. Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: freebsd-hackers@freebsd.org Cc: rank1see...@gmail.com, Roman Divacky rdiva...@freebsd.org Date: Thu, 23 Feb 2012 08:02:04 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 17, 2012 2:43:55 am rank1see...@gmail.com wrote: Anyway, after upgrading to 9.0, my USB stick, when created, started to hang at stage 2 boot. I have a custom setup, where BSD label 'a', has a content of /boot/* So when 'a' is being hit by stage 2 boot, there is boot.config waiting for it. After it reads it and displays it's content, it echos 'No' and hangs. I stare at it and can't believe as boot.config's information is correct! I hit '?' and it list all files in 'a'. Then I simply RE-type what is displayed on screen (content of boot.config - path to loader) And loader kicks in! I do this a few times more and EACH time I have to RE-type correct info! Tested on other machine, same thing. However, this same custom layout works for HDD's, but NOT for USB stick. I've extracted binary installs of 8.2 and 9.0 R: MD5 (8_boot) = adb1e84e96bd434e51cafaaa0ef22584 MD5 (9_boot) = 40f3f6403ebd5e131259d1336b4b50ad Then: # gpart bootcode -b 8_boot da0s2 And sudenly that USB stick boots, without ANY other change! Just an old stage 2 boot code, from R8 was enough. Looks like it is thinking that 'kname' is empty. Ah, I think Roman broke this in 219186: @@ -474,11 +461,7 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i = sizeof(kname)) - return -1; - memcpy(kname, arg, i + 1); - } +kname = arg; } arg = p; } Before it only set kname if it wasn't an empty string. Now it always sets kname. Try this change: Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working copy) @@ -457,7 +457,8 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } -kname = arg; + if (*arg != '\0') + kname = arg; } arg = p; } -- John Baldwin It still doesn't work! And please, next time attach patch in a file (unified format), so I would have a less hassle (to avoid manuall patch application) Thx in advance. Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Friday, February 24, 2012 9:05:54 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: freebsd-hackers@freebsd.org Cc: rank1see...@gmail.com, Roman Divacky rdiva...@freebsd.org Date: Thu, 23 Feb 2012 08:02:04 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 17, 2012 2:43:55 am rank1see...@gmail.com wrote: Anyway, after upgrading to 9.0, my USB stick, when created, started to hang at stage 2 boot. I have a custom setup, where BSD label 'a', has a content of /boot/* So when 'a' is being hit by stage 2 boot, there is boot.config waiting for it. After it reads it and displays it's content, it echos 'No' and hangs. I stare at it and can't believe as boot.config's information is correct! I hit '?' and it list all files in 'a'. Then I simply RE-type what is displayed on screen (content of boot.config - path to loader) And loader kicks in! I do this a few times more and EACH time I have to RE-type correct info! Tested on other machine, same thing. However, this same custom layout works for HDD's, but NOT for USB stick. I've extracted binary installs of 8.2 and 9.0 R: MD5 (8_boot) = adb1e84e96bd434e51cafaaa0ef22584 MD5 (9_boot) = 40f3f6403ebd5e131259d1336b4b50ad Then: # gpart bootcode -b 8_boot da0s2 And sudenly that USB stick boots, without ANY other change! Just an old stage 2 boot code, from R8 was enough. Looks like it is thinking that 'kname' is empty. Ah, I think Roman broke this in 219186: @@ -474,11 +461,7 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i = sizeof(kname)) - return -1; - memcpy(kname, arg, i + 1); - } +kname = arg; } arg = p; } Before it only set kname if it wasn't an empty string. Now it always sets kname. Try this change: Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working copy) @@ -457,7 +457,8 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } -kname = arg; + if (*arg != '\0') + kname = arg; } arg = p; } -- John Baldwin It still doesn't work! And please, next time attach patch in a file (unified format), so I would have a less hassle (to avoid manuall patch application) Do you still get 'No ' with no other message before it breaks? Can you show me the contents of your /boot.config file via hd? -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
- Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Fri, 24 Feb 2012 12:23:45 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 24, 2012 9:05:54 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: freebsd-hackers@freebsd.org Cc: rank1see...@gmail.com, Roman Divacky rdiva...@freebsd.org Date: Thu, 23 Feb 2012 08:02:04 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 17, 2012 2:43:55 am rank1see...@gmail.com wrote: Anyway, after upgrading to 9.0, my USB stick, when created, started to hang at stage 2 boot. I have a custom setup, where BSD label 'a', has a content of /boot/* So when 'a' is being hit by stage 2 boot, there is boot.config waiting for it. After it reads it and displays it's content, it echos 'No' and hangs. I stare at it and can't believe as boot.config's information is correct! I hit '?' and it list all files in 'a'. Then I simply RE-type what is displayed on screen (content of boot.config - path to loader) And loader kicks in! I do this a few times more and EACH time I have to RE-type correct info! Tested on other machine, same thing. However, this same custom layout works for HDD's, but NOT for USB stick. I've extracted binary installs of 8.2 and 9.0 R: MD5 (8_boot) = adb1e84e96bd434e51cafaaa0ef22584 MD5 (9_boot) = 40f3f6403ebd5e131259d1336b4b50ad Then: # gpart bootcode -b 8_boot da0s2 And sudenly that USB stick boots, without ANY other change! Just an old stage 2 boot code, from R8 was enough. Looks like it is thinking that 'kname' is empty. Ah, I think Roman broke this in 219186: @@ -474,11 +461,7 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i = sizeof(kname)) - return -1; - memcpy(kname, arg, i + 1); - } +kname = arg; } arg = p; } Before it only set kname if it wasn't an empty string. Now it always sets kname. Try this change: Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working copy) @@ -457,7 +457,8 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } -kname = arg; + if (*arg != '\0') + kname = arg; } arg = p; } -- John Baldwin It still doesn't work! And please, next time attach patch in a file (unified format), so I would have a less hassle (to avoid manuall patch application) Do you still get 'No ' with no other message before it breaks? I get 'No ' with no other message before it HANGS waiting for manual input? Manual input makes it work. I simply RE-type outputed contest of boot.config file. Can you show me the contents of your /boot.config file via hd? Both USB stick and HDD have a same boot.config file, contents: --- /loader --- -- John Baldwin Domagoj Smolčić ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Friday, February 24, 2012 2:11:52 pm rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: rank1see...@gmail.com Cc: hack...@freebsd.org, Roman Divacky rdiva...@freebsd.org Date: Fri, 24 Feb 2012 12:23:45 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 24, 2012 9:05:54 am rank1see...@gmail.com wrote: - Original Message - From: John Baldwin j...@freebsd.org To: freebsd-hackers@freebsd.org Cc: rank1see...@gmail.com, Roman Divacky rdiva...@freebsd.org Date: Thu, 23 Feb 2012 08:02:04 -0500 Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot) On Friday, February 17, 2012 2:43:55 am rank1see...@gmail.com wrote: Anyway, after upgrading to 9.0, my USB stick, when created, started to hang at stage 2 boot. I have a custom setup, where BSD label 'a', has a content of /boot/* So when 'a' is being hit by stage 2 boot, there is boot.config waiting for it. After it reads it and displays it's content, it echos 'No' and hangs. I stare at it and can't believe as boot.config's information is correct! I hit '?' and it list all files in 'a'. Then I simply RE-type what is displayed on screen (content of boot.config - path to loader) And loader kicks in! I do this a few times more and EACH time I have to RE-type correct info! Tested on other machine, same thing. However, this same custom layout works for HDD's, but NOT for USB stick. I've extracted binary installs of 8.2 and 9.0 R: MD5 (8_boot) = adb1e84e96bd434e51cafaaa0ef22584 MD5 (9_boot) = 40f3f6403ebd5e131259d1336b4b50ad Then: # gpart bootcode -b 8_boot da0s2 And sudenly that USB stick boots, without ANY other change! Just an old stage 2 boot code, from R8 was enough. Looks like it is thinking that 'kname' is empty. Ah, I think Roman broke this in 219186: @@ -474,11 +461,7 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i = sizeof(kname)) - return -1; - memcpy(kname, arg, i + 1); - } +kname = arg; } arg = p; } Before it only set kname if it wasn't an empty string. Now it always sets kname. Try this change: Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working copy) @@ -457,7 +457,8 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } -kname = arg; + if (*arg != '\0') + kname = arg; } arg = p; } -- John Baldwin It still doesn't work! And please, next time attach patch in a file (unified format), so I would have a less hassle (to avoid manuall patch application) Hmm, our mailing lists each attachments, so you are less likely to get the patch that way. Do you still get 'No ' with no other message before it breaks? I get 'No ' with no other message before it HANGS waiting for manual input? Manual input makes it work. I simply RE-type outputed contest of boot.config file. Can you show me the contents of your /boot.config file via hd? Both USB stick and HDD have a same boot.config file, contents: --- /loader --- Hmm, you didn't pass it to hd(1) like I asked. Anyway, I hacked up a test program to run the parse() routine from boot2.c and it DTRT. Do you only see the No message? Do you see the '/boot.config: /loader' message? (Do you have RBX_QUIET enabled perhaps? (-q)) Do you get the actual boot2 prompt at all? Hmm, I think the problem is that 'opts' has garbage instead of being initialized to zero. Try this (also at www.freebsd.org/~jhb/patches/boot2_opts.patch): Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working copy) @@ -224,6 +224,7 @@ uint8_t autoboot; ino_t ino; +opts = 0; kname = NULL; dmadat = (void *)(roundup2(__base + (int32_t)_end, 0x1) - __base); v86.ctl = V86_FLAGS; -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: BUG: 9.0 stage 2 boot (/boot/boot)
On Friday, February 17, 2012 2:43:55 am rank1see...@gmail.com wrote: Anyway, after upgrading to 9.0, my USB stick, when created, started to hang at stage 2 boot. I have a custom setup, where BSD label 'a', has a content of /boot/* So when 'a' is being hit by stage 2 boot, there is boot.config waiting for it. After it reads it and displays it's content, it echos 'No' and hangs. I stare at it and can't believe as boot.config's information is correct! I hit '?' and it list all files in 'a'. Then I simply RE-type what is displayed on screen (content of boot.config - path to loader) And loader kicks in! I do this a few times more and EACH time I have to RE-type correct info! Tested on other machine, same thing. However, this same custom layout works for HDD's, but NOT for USB stick. I've extracted binary installs of 8.2 and 9.0 R: MD5 (8_boot) = adb1e84e96bd434e51cafaaa0ef22584 MD5 (9_boot) = 40f3f6403ebd5e131259d1336b4b50ad Then: # gpart bootcode -b 8_boot da0s2 And sudenly that USB stick boots, without ANY other change! Just an old stage 2 boot code, from R8 was enough. Looks like it is thinking that 'kname' is empty. Ah, I think Roman broke this in 219186: @@ -474,11 +461,7 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - if ((i = ep - arg)) { - if ((size_t)i = sizeof(kname)) - return -1; - memcpy(kname, arg, i + 1); - } +kname = arg; } arg = p; } Before it only set kname if it wasn't an empty string. Now it always sets kname. Try this change: Index: boot2.c === --- boot2.c (revision 231983) +++ boot2.c (working copy) @@ -457,7 +457,8 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } -kname = arg; + if (*arg != '\0') + kname = arg; } arg = p; } -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org