Solved GENERIC Kernel

If I have a trouble in future, can I boot my system?
I am afraid of that now. >_>


# cd /usr/src
# make kernel __MAKE_CONF=/dev/null SRCCONF=/dev/null
# reboot


https://www.freebsd.org/doc/handboo...sdupdate.html#freebsd-update-custom-kernel-9x


# uname -ar

Code:
FreeBSD FreeBSD.example.ne.jp 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #2: Thu Apr  6 04:42:50 JST 2017    root@FreeBSD.example.ne.jp:/usr/obj/usr/src/sys/GENERIC  amd64


# ls -l /boot/GENERIC

Code:
-r-xr-xr-x  1 root  wheel  27134768 Mar 17 07:32 /boot/GENERIC

# nextboot -k GENERIC

Code:
Error: /boot/GENERIC doesn't exist. Use -f to override.

# nextboot -fk GENERIC

Code:
WARNING: loader(8) has only R/O support for ZFS
nextboot.conf will NOT be reset in case of kernel boot failure

Why did I get this error message?
After rebooting system, it dose not boot.
So I had to select kernel.old to boot system. >_>


And..........

https://www.freebsd.org/doc/handbook/bsdinstall/bsdinstall-newboot-loader-menu.png
When system started, I selected 3 .Escape to loader prompt.

OK unload kernel
OK load /boot/GENERIC
OK boot


Then,I got following messages.

Code:
Loader variables:
  vfs.root.mountfrom=ufs:/zroot/ROOT/default

Manual root filesystem specification:
  <fstype>:<device> [options]
  Mount <device> using filesystem <fstype>
  and with the specified (optional) option list.

  eg. ufs:/dev/da0s1a
  zfs:tank
  cd9660:/dev/acd0 ro
  (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /)

  ?  List valid disk boot devices
  .  Yield 1 second (for background tasks)
  <empty line>  Abort manual input

mountroot>
 
If that is what you have done, then obviously make installkernel is missing.

BTW I build GENERIC only like this make kernel which is sufficient. But always make buildworld should be done before building the (first) kernel.

Also see https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html

I installed FreeBSD-11.0 from install media.
Then, I made custom kernel.
After that, I only wanted to get GENERIC kernel for trouble someday.

Do I need to do make installkernel ?

Handbook says nothing about it. >_>
Then I did make installkernel .
After rebooting system, I used selected 3 .Escape to loader prompt.
I got same error. I can not boot my system. >_>
 
I installed FreeBSD-11.0 from install media.
Then, I made custom kernel.
After that, I only wanted to get GENERIC kernel for trouble someday.

If you installed a custom kernel successfully, a previous kernel is moved to /boot/kernel.old.

So if you installed no more than one kernel, it should be the original GENERIC.

Do I need to do make installkernel ?

make kernel only builds a kernel. If you want to use it you need to do make installkernel. The link I gave you is pretty clear about that.

On troubles see https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-trouble.html
 
selected 3 .Escape to loader prompt.

OK boot # OK : boot from /boot/kernel/kernel



OK unload kernel
OK load /boot/kernel/kernel # Failure : Why?
OK boot



OK unload kernel
OK load /boot/kernel.old/kernel # Failure : Why?
OK boot



OK unload kernel
OK load /boot/GENERIC # Failure : Why?
OK boot


If I unload kernel, I get same error message.
Why?
And , It takes a few seconds to type ? .


mountroot>?

Code:
List of GEOM managed disk devices:
 gpt/zfs0 gpt/swap0 gpt/gptboot0 msdosfs/EFI gpt/efiboot0 nvd0p4 nvd0p3 nvd0p2 nvd0p1 nvd0

mountroot>

Can I boot my system after this ?
 

OK unload kernel
OK load /boot/kernel.old/kernel
OK load /boot/kernel.old/opensolaris.ko
OK load /boot/kernel/zfs.ko
OK lsmod
OK boot


I got prompt.
Code:
Enter full pathname of shell or RETURN for /bin/sh:

Okay,thank you.
 
Back
Top