Fwd: Fresh install of 11.2 hung at boot - no login prompt reached

Kaya Saman kayasaman at gmail.com
Mon Aug 13 21:25:29 UTC 2018


Just in case anyone stumbles across this with the same issue I figured 
out part of the problem!


The reason why the system didn't get to the login prompt was simply due 
to the ZFS root being wrong.


The mountpoint for the filesystem zroot should have been /zroot and not / .


zfs get all zroot:

zroot  mountpoint            /zroot                 local


virtually I just cross-compared the output with a different server.


Of course a few errors came up as the edited files were all in /zroot 
mount point now. So a quick and easy fix was to backup the /etc 
directory and then restore the modified one in /zroot/ ; also the 
/usr/local directories were all under /zroot/ too... so cp -r 
/zroot/usr/local across to its correct location then rebuild all @ports 
just in case something didn't go to plan.


Unfortunately I am still getting these errors:

read 264 from 384 to 0x7c0f5f80 .... until final message: error: 0x10

which seem to indicate CRC errors?? 
https://www.freebsd.org/cgi/man.cgi?query=boot&sektion=8&apropos=0&manpath=FreeBSD+11.2-RELEASE+and+Ports

Towards the bottom:

*DIAGNOSTICS*  <https://www.freebsd.org/cgi/man.cgi?query=boot&sektion=8&apropos=0&manpath=FreeBSD+11.2-RELEASE+and+Ports#end>
      When disk-related errors occur, these are reported	by the second-stage
      bootstrap using the same error codes returned by the BIOS,	for example
      ``Disk error 0x1 (lba=0x12345678)''.  Here	is a partial list of these
      error codes:

      0x1   Invalid argument
      0x2   Address mark	not found
      0x4   Sector not found
      0x8   DMA overrun
      0x9   DMA attempt across 64K boundary
      0xc   Invalid media
      0x10  Uncorrectable CRC/ECC error
      0x20  Controller failure
      0x40  Seek	failed
      0x80  Timeout


perhaps I just need to redo the bootstrap? gpart bootcode -b /boot/pmbr 
-p /boot/gptzfsboot -i 1 ada1

--K

-------- Forwarded Message --------
Subject: 	Fresh install of 11.2 hung at boot - no login prompt reached
Date: 	Wed, 8 Aug 2018 18:59:49 +0100
From: 	Kaya Saman <kayasaman at gmail.com>
To: 	freebsd-questions at freebsd.org



Hi,


I've just performed a fresh install of 11.2: 11.2-RELEASE FreeBSD 
11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018


Basically as I have a custom partition layout I decided to install ZFS 
on Root manually.


# gpart show ada0
=>       40  468862048  ada0  GPT  (224G)
          40       1024     1  freebsd-boot  (512K)
        1064    2097152     2  freebsd-swap  (1.0G)
     2098216   14679256        - free -  (7.0G)
    16777472  233292168     3  freebsd-zfs  (111G)
   250069640  218792448     4  freebsd-zfs  (104G)


This is mirrored with ada1 in the zroot:


# gpart show ada1
=>       40  468862048  ada1  GPT  (224G)
          40       1024     1  freebsd-boot  (512K)
        1064    2097152     2  freebsd-swap  (1.0G)
     2098216   14679256        - free -  (7.0G)
    16777472  233292168     3  freebsd-zfs  (111G)
   250069640  218792448     4  freebsd-zfs  (104G)


The zpool has been constructed as such:


# zpool status zroot
   pool: zroot
  state: ONLINE
   scan: none requested
config:

     NAME        STATE     READ WRITE CKSUM
     zroot       ONLINE       0     0     0
       mirror-0  ONLINE       0     0     0
         ada0p3  ONLINE       0     0     0
         ada1p3  ONLINE       0     0     0

errors: No known data errors


As there seems to be little documentation on customized or manual 
install of ZFS on root as the installation medium partitioner utilizes 
the whole disk, I am a little lost!


The information on the Fbsd wiki: 
https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition is outdated and 
later steps are not relevant any more as there is no more 'sysinstall'.


The steps I followed are off a thread in the forum: 
https://forums.freebsd.org/threads/installing-freebsd-manually-no-installer.63201/


This works so long as I boot the kernel from my installation USB drive 
using the steps:


ok unload
ok load /boot/kernel/kernel
ok load /boot/kernel/opensolaris.ko
ok load /boot/kernel/zfs.ko

<any extra modules> <-- for me iscsi.ko, if_lagg.ko, iscsi_initiator.ko, 
ctl.ko, cfiscsi.ko

ok set vfs.root.mountfrom="zfs:zroot"

ok boot


Now if I try to boot directly from the system (I have already installed 
the kernel and issued: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot 
-i 1 ada(x) for both drives ada0 & ada1)

the system I think at Boot Stage 2? following: 
https://www.freebsd.org/doc/handbook/boot-introduction.html

comes up with:

BIOS drive [...]

read 264 from 384 to 0x7c0f5f80 .... until final message: error: 0x10

Then finally shows the Beastie pic with menu which I think is Stage 3? 
then boots the kernel.


I get messages complaining about some /dev devices not being accessible 
or writable then it complains about not being able to read the 
/etc/defaults/devfs rules file.

Afterwards I see the standard kernel messages until the date/time is 
shown after which the boot process hangs and no login prompt appears.


Is there anyone who is familiar with the boot process who can help me 
out here....?? I'm not sure if I missed configuring something in the 
boot loader or if I need to map /dev to the system or something.....


Anyway, it is a fresh install so nothing I think is corrupted, as the 
pool is fine. Just something to do with booting and loading things I think??


Many thanks in advance.


Kaya









More information about the freebsd-questions mailing list