korfhage@CS.UCLA.EDU (05/11/88)
As part of a class I am teaching, the students are modifying the MINIX kernel. However, quite a number of have found that at some point, trivial changes to the kernel create a system that will not boot. After you hit =, it hangs. I, myself, had this problem when I implemented their assignment. Adding a for statement to a new routine in dmp.c, code that would not possibly be run while booting, would create an unbootable system. Comment out the for statement, but leave its body in the code, and the system boots just fine. They report similar circumstances. One possible cure seems to be removing printf statements in the kernel, but even this doesn't always work. Does anyone have an answer for this problem? It's driving them nuts, and they are driving me nuts. Help! Willard Korfhage ARPA : korfhage@cs.ucla.edu UUCP : {ucbvax,ihnp4,randvax,trwrb!trwspp,ism780}!ucla-cs!korfhage
vandys@hpindda.HP.COM (Andy Valencia) (05/11/88)
Just for completeness, you should have told us what version you are working with. I will give you some guesses, all more or less obvious. 1. Kernel Size/Process Size MINIX has edge cases where things will not work as you approach the 64K limit for various processes. While writing your boot floppy the build program will tell you the size of each member. If these are getting *near* 64K, then you could have hit one of the edge conditions. There are various pieces of code which can be chopped out to try and lower this--I always start with the Olivetti support! :-> 2. sbrk() craziness Definitely not your problem, but in the same vein. Giving large numbers to sbrk() can mess things up, due to the signed arithmetic used. As I recollect, the code says something like "if the break is higher than the bottom of stack, fail". Which is fine, unless you give break a number which wraps it around into your text segment. Now, although break is *much* lower than the stack, you are in trouble. This was discovered by my housemate; I will ask him to post the actual results. Good luck, and happy hacking! Andy Valencia vandys%hpindda.UUCP@hplabs.hp.com
ast@cs.vu.nl (Andy Tanenbaum) (05/13/88)
In article <12189@shemp.CS.UCLA.EDU> korfhage@CS.UCLA.EDU (Willard Korfhage) writes: > > As part of a class I am teaching, the students are modifying the >MINIX kernel. However, quite a number of have found that at some point, >trivial changes to the kernel create a system that will not boot. It is hard to give a general answer to why kernels won't boot, but one thing to be careful about is trying to print in tasks at funny times, especially before all the tasks have been fully initialized. I have also used MINIX in a course, and have not run across this sort of problem, so I am not quite sure what the problem is. Maybe other people have ideas. Andy Tanenbaum (ast@cs.vu.nl)