Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!fstgds15.tu-graz.ac.at!fstgds01.tu-graz.ac.at!not-for-mail From: chmr@edvz.tu-graz.ac.at (Christoph Robitschko) Newsgroups: comp.os.386bsd.development Subject: Re: kernel hacking tips Date: 11 May 1993 13:59:06 +0200 Organization: Technical University of Graz, Austria Lines: 27 Message-ID: <1so4eaINNibt@fstgds01.tu-graz.ac.at> References: <PC123.93May11105430@bootes.cus.cam.ac.uk> NNTP-Posting-Host: fstgds01.tu-graz.ac.at X-Newsreader: TIN [version 1.1 PL7] In article <PC123.93May11105430@bootes.cus.cam.ac.uk> Pete Chown (pc123@cus.cam.ac.uk) wrote: > Actually, when I am trying to test code, I just reboot my box with the > new kernel, then if it crash dumps or seems unusable I use the fixit > floppy to take it away. A long time ago, I copied a kernel to > /386bsd.old, so after I take it away and reboot, it comes up with a > usable kernel (rebuilding the kernel after having booted off the fixit > floppy is not easy...). mount /dev/wd0a /mnt; chroot /mnt /bin/csh (or something similar) > > Actually, there's a question. Isn't there some way of telling the > boot system that you don't want /386bsd loaded, but actually want > /386bsd.old, without having to remove /386bsd first? > YES ! Use julians bootblocks (available on the agate mirrors). You can specify the boot device (wd0, fd0, sd0, wd1,...), the boot kernel (386bsd, vmunix,...) and some boot flags (-s for singleuser, -d to jump into the kernel debugger before probing for devices). Very very useful, and much less painful than a fixit floppy. To test my kernel mods, I also use the kernel debugger to single-step through my routines (for low-level code), look at variables, or change debugging flags during runtime. Also to create environments to test special cases. Christoph