On Wed, Mar 03, 2010 at 01:44:05PM -0700, Joey Korkames wrote: >> Usually, in BSD, you pass -P or -h to the /boot/loader in boot.config. >> But since that loader is now completely bypassed in the boot process, >> that doesn't work. I haven't found in the FreeBSD documentation what >> -P/-h actually *does* at the machine level, or rather if it passes >> "commandline" arguments to the kernel or what not. >> >> Basically, I need to do two things: >> >> 1. i need to enable the serial console. this is usually done at the >> loader level, with the -h flag, or at compile time, using the 0x30 flag >> on the sio driver > > In /boot/grub/grub.cfg, I use: > > menuentry "FreeBSD:blockdev_fs:da0s1a" { > insmod bsd > echo "Loading kernel: /boot/kernel/kernel ..." > kfreebsd /boot/kernel/kernel -D -h > kfreebsd_loadenv /boot/device.hints > set kFreeBSD.vfs.root.mountfrom=:/dev/da0s1a > echo "Booting: FreeBSD:blockdev_fs:da0s1a" > } > > If you go to the GRUB2 command prompt (ESC key) and type "kfreebsd > --help", you'll get a listing of all supported boot options, mostly > corresponding with http://www.freebsd.org/cgi/man.cgi?query=boot Excellent tip! Thanks! I didn't expect anybody to be as crazy as me at this point... ;) Unfortunately, that doesn't seem to be working: everything still seems to be blocked... This is my grub.conf entry: +--------------------------------------------------------------------------+ | insmod ufs2 | | insmod bsd | | set root=(hd0,1) | | search --no-floppy --fs-uuid --set 4b81dce84e75710d | | echo Loading kernel of FreeBSD 7.2-1-686 ... | | kfreebsd /boot/kfreebsd-7.2-1-686.gz -D -h | | kfreebsd_module_elf /lib/modules/7.2-1-686/acpi.ko | | kfreebsd_loadenv /boot/device.hints | | set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ad0s1 | | set kFreeBSD.vfs.root.mountfrom.options=rw | +--------------------------------------------------------------------------+ (As seen from the grub prompt.) I tried reconnecting to the console in 9600 baud, no luck either... Maybe the problem is with the bitrate, but I feel the kernel just freezes because i don't see disk activity and the machine doesn't seek an IP through DHCP... >> 2. i need to specify the speed of the port. this is usually done in >> config options or at compile time. > > I have had very little luck with this. Usually when something in the freebsd > documentations says that you can change baud rate at runtime with a flag, > I find that I have to recompile the relevant code with a macro or > env-variable changed. > I end up sticking with the 9600 baud default. Yeah, that's probably a better idea... Unfortunately, the default bitrate on the soekris is this odd 19200 thing, so the BIOS appears there only.. I'll try to turn everything to 9600. >> I tried setting hint.sio.0.flags="0x30" along with the other environment >> in grub, without any luck. > > Note the kfreebsd_loadenv on device.hints above, without it sio() (or uart() for FreeBSD 8) > won't start on the serial port and you won't get a console. > You can try setting your flags in there to see if you can change the baud rate. Yay! So how do I recompile *that* kernel now? :) >> Is there any way I can just >> revert back to the regular /boot/loader quickly? > > In /boot/grub/grub.cfg, I use: > > menuentry "BTX client: /boot/freebsd/loader" { > insmod bsd > echo "Loading btx client: /boot/freebsd/loader ..." > kfreebsd /boot/freebsd/loader -D -h > echo "Booting: BTX client: /boot/freebsd/loader" > } Hum... I don't seem to have /boot/freebsd/loader (or /boot/freebsd/ for that matter), in which package is it now? Thanks a lot for answering! A. -- Antoine Beaupré Réseau Koumbit Networks +1.514.387.6262
Attachment:
signature.asc
Description: Digital signature