From owner-freebsd-questions@freebsd.org Mon Aug 13 21:25:29 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E180A107E20A for ; Mon, 13 Aug 2018 21:25:28 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CE4D8DFA2 for ; Mon, 13 Aug 2018 21:25:28 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id y2-v6so10269306wma.1 for ; Mon, 13 Aug 2018 14:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=cUR6qvfVvxwMcGq8a3zHhVBK0FjWHAw542k2tieHc14=; b=uXL+MZYiCpJ6JeFXALkBM2Zmcg55kgZl9sJ6c5spYJNzAJMEFXggRBnnNaUuw4ifk9 DnoGgfC09/U9sfuxq0o0H79kcv48ylcUki/ov0L/plVjn8KIxgGPcDsQYldM5/ux5SHn 2pTdL9K6Q5+UgRAKDmaaJn9lGgdCUAoeFFOIxws8j6CWkS4mPF4DHAH7qlF4nF3iNtVR LkQCy+imj6H/qVaUcOhsmmCdHSWOkq3ttxVxcTp4XVccWKNb/Lc6ysT3mIw/cjsr70IH lJOMscQeJ9JWxp6i3Nzb+G8BqDPNgABdar+MjVqYAJknswey7AUoTG698TnYfc0N5css 3gAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:references:from:to:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=cUR6qvfVvxwMcGq8a3zHhVBK0FjWHAw542k2tieHc14=; b=oSbDkW0zXQVxodg8fgl2p7zXoo64Se1nFIGSDV283GJkDoVz5RICJJZHTR/9pTgqmP SwUNHSbNoLfiRCB0pECDpr541pycH6FKl2y+F0GW7ipsKhobBAjkMrVlbqAFjP2sEnw9 6bszcWXJO4aA0vAxoyzOhoJqK8vUa6fRlz3IA/mOa/8bhyq4qwcUPLMC9FadRSAKx62f /2pQHITp6tWv/oX/bPjj+yCNjcuOQYEHeyJOED9hl9NAqvfgsyiOicRpkyzqmi56uQls HBbAJtbg98l/of1SvsHYcXrpIYGpWIC2YNfN60aYolaIJ7F2+scMLOliHd+FOO8NBveV X/yA== X-Gm-Message-State: AOUpUlEVHZEACbr80RJc9K533wHRL1k14BMJDBPIkCiLlDtsh8USg9OW pFmsEJuI1+5w5up1+RR+21Dfwcr5 X-Google-Smtp-Source: AA+uWPyPRYasS0IJBG5U3yT6X5Pr6h4pEBMqWtTPibvRl79DNf0G8t+1lulqdX3TBl2TmqjR+Bh4KQ== X-Received: by 2002:a1c:b58e:: with SMTP id e136-v6mr8554277wmf.141.1534195526573; Mon, 13 Aug 2018 14:25:26 -0700 (PDT) Received: from Sting-Ray.optiplex-networks.com (optiplexnetworks.plus.com. [212.159.80.17]) by smtp.gmail.com with ESMTPSA id 66-v6sm22965507wmw.34.2018.08.13.14.25.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 14:25:25 -0700 (PDT) Subject: Fwd: Fresh install of 11.2 hung at boot - no login prompt reached References: <6afd9eb9-982a-66e1-4641-2fe846592d92@gmail.com> From: Kaya Saman To: "freebsd-questions@freebsd.org" X-Forwarded-Message-Id: <6afd9eb9-982a-66e1-4641-2fe846592d92@gmail.com> Message-ID: <10da9fc7-91bc-0347-3e3b-f2643326b735@gmail.com> Date: Mon, 13 Aug 2018 22:25:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <6afd9eb9-982a-66e1-4641-2fe846592d92@gmail.com> Content-Language: en-US-large Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2018 21:25:29 -0000 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* 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 To: freebsd-questions@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 <-- 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