From owner-freebsd-current@freebsd.org Mon Dec 7 21:56:52 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D7634B869D for ; Mon, 7 Dec 2020 21:56:52 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqcbS2g78z3tlH for ; Mon, 7 Dec 2020 21:56:52 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 493C38390 for ; Mon, 7 Dec 2020 21:56:52 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f172.google.com with SMTP id g15so14280204ybq.6 for ; Mon, 07 Dec 2020 13:56:52 -0800 (PST) X-Gm-Message-State: AOAM531TN17RvDCZDVd2asJVtNnXWV5o5rrXzb2tfxyJ/w0BCE0fehD5 DU3IiOuQb93aIQlVZ23LwGcGiRMTrY5g5FFpJ6M= X-Google-Smtp-Source: ABdhPJwo9kZgEPHMGsxq2Bn6/djQ5D7/ZUhnkD4sRzLr7TfgiZ2Yc3fG1sxu98aiDWSSa5H7s2amdRnBnPalOElVJQ0= X-Received: by 2002:a25:9208:: with SMTP id b8mr24789701ybo.515.1607378211691; Mon, 07 Dec 2020 13:56:51 -0800 (PST) MIME-Version: 1.0 References: <4fcf5f35-481b-a321-cb52-7264fc10d1d4@callfortesting.org> In-Reply-To: <4fcf5f35-481b-a321-cb52-7264fc10d1d4@callfortesting.org> From: Mitchell Horne Date: Mon, 7 Dec 2020 17:56:40 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: RISC-V root device question To: Michael Dexter Cc: FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 21:56:52 -0000 On Mon, Dec 7, 2020 at 4:54 PM Michael Dexter wrote: > > All, > > The FreeBSD wiki page on RISC-V reads: > > If you get mountroot prompt, then indicate to the kernel the location of > rootfs: > > mountroot> ufs:/dev/vtbd0 > > This indeed appears to be remain the case on CURRENT as of last week. > > Specifying a device and partition, or disklabel at the mountroot> prompt > works every time but none of these do not help in loader.conf (tested > individually): > > cam.boot_delay="100000" > vfs.root.mountfrom="ufs:/dev/vtbd0p3" > vfs.root.mountfrom="ufs:/dev/gpt/rootfs" > rootdev="/dev/vtbd0p3" > rootdev="vtbd0p3" > currdev="vtbd0p3" > > Or these in the fstab: > > /dev/gpt/rootfs / ufs rw,noatime 1 1 > /dev/vtbd0p3 / ufs rw,noatime 1 1 > > Are there any other options? Perhaps building the device name into the > kernel? > > Thank you! > > Michael Hi Michael, If you have followed the directions on that wiki page exactly, then you have booted without FreeBSD's loader(8), and that is why your loader.conf variables are not taking effect. There are a couple solutions to this. As you suggest, it is possible to overwrite the default root device in the kernel config, by adding a line such as: options ROOTDEVNAME=\"ufs:/dev/vtbd0p3\" You can also override it using the QEMU commandline, which is simpler since you won't need to recompile anything. Adding the following argument should suffice: -append="vfs.root.mountfrom=ufs:/dev/vtbd0p3" Note that you can set arbitrary kernel environment variables this way ^^ Finally, we do have support for loader.efi on RISC-V, although I have not yet documented how to use it on the wiki page. If you would like to try this method, please follow up with me and I can provide instructions. Otherwise, you can expect to see weekly RISC-V snapshots appear in the next week or two, and I will ensure that the wiki page is up to date with how to run them. Cheers, Mitchell > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"