From nobody Mon Dec 27 02:17:00 2021 X-Original-To: freebsd-ppc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8022C191D768 for ; Mon, 27 Dec 2021 02:17:15 +0000 (UTC) (envelope-from al@datazap.net) Received: from mail-qk1-f227.google.com (mail-qk1-f227.google.com [209.85.222.227]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JMhBf5SHXz3H7p for ; Mon, 27 Dec 2021 02:17:14 +0000 (UTC) (envelope-from al@datazap.net) Received: by mail-qk1-f227.google.com with SMTP id r139so12436607qke.9 for ; Sun, 26 Dec 2021 18:17:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:from:to:cc:references:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-language; bh=OHHke709VaKILIwOtjQ055W1eEY/aQTHnPC+sftX1rk=; b=sLC7sLb8MNuT07i5TxRrvGSXQycfM3M//F9PIMeoO8nTJZjUQ0ZtQ5eHi6arlhhgWB 9Bd2NfzckdU5IOn+UU9kYP5WahmQVER6TRr4E1v5322HYzj7LHCvZ553PRp4S3s7I6Jm 6hPRprKo/5zF3pUZjYzU7lTYb3YBfbLnL72upLgixpMvc7poA0SW676yScrDwE3mwDlQ 5SF91gFKKxMBglqwibiCVclCcyQ9vxSyVlkA71R9UUaiRcLnkwicmPbLS/rSX6hIIFnb hpKUK0N5tZYCB7JHoW96SMUNtGNcoz1LPaDaPUEWn9EcfykIbQsEUnwpHndEl8n47KHM PnmQ== X-Gm-Message-State: AOAM532OWIgQlk5FepitXYgaRFDNfMhidJAf5zzl6r+Mxri1cCTyNFta 2i/gpblVH6uV83VsW7WlPIMlzsRn7r2sFyYFD4HOjraR63M6mg== X-Google-Smtp-Source: ABdhPJw7VrXwX8ixtWlZpmY14mm56OZJYXjroQVqPqWi7ycwfGQ60BOunOsk05MZGCSfMEWKr3nyW/8xV1wa X-Received: by 2002:a37:b604:: with SMTP id g4mr8499719qkf.230.1640571427232; Sun, 26 Dec 2021 18:17:07 -0800 (PST) Received: from agnus.datazap.net (agnus.datazap.net. [209.160.40.35]) by smtp-relay.gmail.com with ESMTP id d4sm4967483qkn.4.2021.12.26.18.17.06; Sun, 26 Dec 2021 18:17:07 -0800 (PST) X-Relaying-Domain: datazap.net Received: from [127.0.0.1] (localhost [127.0.0.1]) by agnus.datazap.net (Postfix) with ESMTP id 8FE83B794B; Sun, 26 Dec 2021 21:17:00 -0500 (EST) Subject: Re: Disk setup X5000 From: al@familysafeinternet.com To: Justin Hibbits Cc: "freebsd-ppc@freebsd.org" , Justin Hibbits , Al References: <12b74e7c-ff7b-449a-d189-4d1795e446cb@datazap.net> <20211213124150.584ad1ca@ralga-linux> <8df08f5c-8f08-b1a6-3b04-f293b92a643e@datazap.net> Message-ID: <7880ad79-8588-b8bc-ecf9-c0e2d666dda3@datazap.net> Disposition-Notification-To: al@familysafeinternet.com Date: Sun, 26 Dec 2021 21:17:00 -0500 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ppc@freebsd.org X-BeenThere: freebsd-ppc@freebsd.org MIME-Version: 1.0 In-Reply-To: <8df08f5c-8f08-b1a6-3b04-f293b92a643e@datazap.net> Content-Type: multipart/alternative; boundary="------------2FE5BEE16CF2B118200E0C0A" Content-Language: en-US X-Rspamd-Queue-Id: 4JMhBf5SHXz3H7p X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of al@datazap.net has no SPF policy when checking 209.85.222.227) smtp.mailfrom=al@datazap.net X-Spamd-Result: default: False [0.20 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.227:from]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; HEADER_FORGED_MDN(2.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; DMARC_NA(0.00)[familysafeinternet.com]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.227:from]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[al@familysafeinternet.com,al@datazap.net]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[al@familysafeinternet.com,al@datazap.net]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com,datazap.net] X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------2FE5BEE16CF2B118200E0C0A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello, On 13/12/21 13:41, Justin Hibbits wrote: > On Sat, 11 Dec 2021 17:52:56 -0500 > Al wrote: > >> Hello, >> >> I have worked for the last few months on this issue without any real >> solution. I think I may have eliminated some things, but that is it. >> At first I thought maybe it was that the bootloader could see the >> partition, but the kernel could not see it, but after much testing I >> don't think that is the case. Then I thought because we have switched >> to mbr, that maybe I needed to setup the drives on an i386 system. I >> don't really own much in the way of i386, but I was able to use the >> school's laptop to setup a drive, but even the bootloader could not >> load the kernel from that partition. It really looks like adding >> bootargs: vfs.root.moutnfrom=ufs:/dev/ada0s2a to uboot does nothing, >> but doesn't hurt anything either. I think the problem is still with >> the disk setup. What it really looks like is that it finds the disk, >> but then later on it tries to remount it and then things go wrong. >> Before the kernel would look at: the ada disk first, but now it looks >> at mmcsd0: 4GB first. I guess that I thought a disklabel would fix >> this. > You *could* put ubldr on the SD card, but I've not tried that and you > need to be careful with the partitioning so you don't erase the uboot. > >> I have looked at many howto's on using gpart to setup disks. Nothing >> has helped me. >> >> 1. What should be in fstab? >> 2. Is there a gpart howto somewhere that explains what needs to be >> done to partition the drives on an X5000? > I think the u-boot on these systems only supports MBR partitioning, so > you're stuck with that. There should be many HOWTOs scattered over the > internet about using gpart to setup FreeBSD on an MBR system There are many HowTos on setting up MBR partitions in FreeBSD. I could not find anything exactly like what I am doing. What I used was a HowTo on setting up a thumbdrive and on setting up a second drive for i386. However, I wasn't sure if I was setting this up right, but I have this: => 63 234441585 ada1 MBR (112G) 63 204800 1 fat16 (100M) 204863 234236785 2 freebsd (112G) => 0 234236785 ada1s2 BSD (112G) 0 234236785 1 freebsd-ufs (112G) It shouldn't need swap or a zfs partition to boot, so I really believe this is right. >> 3. Should the disklabel be added with newfs and is there anything >> else that I need to know? > The boot partition should be a small FAT partition that just has ubldr > and your dtb. Everything else can go on the rootfs which should > be in the disklabel. > > My X5000 has the following layout from 'gpart show': > > => 63 1000215153 ada0 MBR (477G) > 63 262144 1 fat16 (128M) > 262207 999953009 2 freebsd (477G) > > => 0 999953009 ada0s2 BSD (477G) > 0 62914560 1 freebsd-ufs (30G) > 62914560 16777216 2 freebsd-swap (8.0G) > 79691776 920261233 4 freebsd-zfs (439G) > >> 4. Does the slice of the root partition need to be marked active? > I don't think so. > >> 5. Should I be creating a UFS1 or UFS2 partition? > UFS2. You can also run ZFS on these systems. My setup has a rootfs > that's UFS2, and dedicates the entire rest of the disk to ZFS. I have tried both and neither has worked. >> 6. Should -T option be set with newfs? > Trim? If you're using an SSD it's a good idea. All SSDs. > 7. Could there be something missing in the kernel? > What other issues are you running into? Only not booting after it gets to where it mounts the rootfs. Of course, I am using a serial console, but I believe the video driver needs to be installed on a working system with ports, so this may be an issue later on. > > For reference, relevant U-Boot environment variables (transcribed): > > bootargs_sata=vfs.root.mountfrom=ufs:/dev/ada0s2a > bootcmd=run bootcmd_sata > bootcmd_sata=sata start; fatload sata 0:1 ${loadaddr} ${bootfile}; > fatload sata 0:1 ${fdtaddr} ${fdtfile}; fdt addr ${fdtaddr}; fdt > boardsetup; bootelf ${loadaddr} > bootfile=ubldr > fdtfile=cyrus_p5020.dtb This is what I am using. >> I really need to verify at this point that my setup is correct. I >> guess it could be something set in uboot, but I don't see how. If I >> can't figure this out, then maybe someone on this list could help me. >> I would be willing to pay $100 an hour, or what you make at your day >> job per hour, or what ever seems reasonable to you to get this issue >> resolved. I think this could be done remotely by ssh into another >> computer and then using the serial console, or I can send you a disk, >> or maybe I could buy time on a working FreeBSD X5000, or I am sure >> there are other options. I just don't want it to be 2025 and I am >> still stuck on this issue. >> >> Kind Regards, >> Al >> >> > The easiest way to install would be to gpart from another powerpc > machine, mount the rootfs, mount the bootfs to ${rootfs}/boot/uboot, > then extract the base.txz and kernel.txz, that you can find on the > download server, in the mounted rootfs. You can then use bsdconfig to > configure it. > > - Justin > I didn't know there were binaries available. I looked all over the download server, which ones are for the X5000? PowerPC64? Also, would I need to add the boot fs to fstab? The system always stops in the same place when booting. The kernel does not find the root fs and is looking for it, then the boot stops right there. Even using disklabels has not helped. If I change the root partition in fstab to something besides the root partition, then its behavior different, so I believe that it is finding it, but it can't mount it for some reason. I think the next step is to try other binaries and see if that helps. Kind Regards, Al --------------2FE5BEE16CF2B118200E0C0A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hello,

On 13/12/21 13:41, Justin Hibbits wrote:
On Sat, 11 Dec 2021 17:52:56 -0500
Al <al@datazap.net> wrote:

Hello,

I have worked for the last few months on this issue without any real
solution. I think I may have eliminated some things, but that is it.
At first I thought maybe it was that the bootloader could see the
partition, but the kernel could not see it, but after much testing I
don't think that is the case. Then I thought because we have switched
to mbr, that maybe I needed to setup the drives on an i386 system. I
don't really own much in the way of i386, but I was able to use the
school's laptop to setup a drive, but even the bootloader could not
load the kernel from that partition. It really looks like adding
bootargs: vfs.root.moutnfrom=ufs:/dev/ada0s2a to uboot does nothing,
but doesn't hurt anything either. I think the problem is still with
the disk setup. What it really looks like is that it finds the disk,
but then later on it tries to remount it and then things go wrong.
Before the kernel would look at: the ada disk first, but now it looks
at mmcsd0: 4GB first. I guess that I thought a disklabel would fix
this.
You *could* put ubldr on the SD card, but I've not tried that and you
need to be careful with the partitioning so you don't erase the uboot.

I have looked at many howto's on using gpart to setup disks. Nothing
has helped me.

1. What should be in fstab?
2. Is there a gpart howto somewhere that explains what needs to be
done to partition the drives on an X5000?
I think the u-boot on these systems only supports MBR partitioning, so
you're stuck with that.  There should be many HOWTOs scattered over the
internet about using gpart to setup FreeBSD on an MBR system
There are many HowTos on setting up MBR partitions in FreeBSD. I could not find anything exactly like what I am doing. What I used was a HowTo on setting up a thumbdrive and on setting up a second drive for i386. However, I wasn't sure if I was setting this up right, but I have this:

=>       63  234441585  ada1  MBR  (112G)
         63     204800     1  fat16  (100M)
     204863  234236785     2  freebsd  (112G)

=>        0  234236785  ada1s2  BSD  (112G)
          0  234236785       1  freebsd-ufs  (112G)

It shouldn't need swap or a zfs partition to boot, so I really believe this is right.


3. Should the disklabel be added with newfs and is there anything
else that I need to know?
The boot partition should be a small FAT partition that just has ubldr
and your dtb. Everything else can go on the rootfs which should
be in the disklabel.

My X5000 has the following layout from 'gpart show':

=>        63  1000215153  ada0  MBR  (477G)
           63      262144     1  fat16  (128M)
       262207   999953009     2  freebsd  (477G)

=>        0  999953009  ada0s2  BSD  (477G)
           0   62914560       1  freebsd-ufs  (30G)
    62914560   16777216       2  freebsd-swap  (8.0G)
    79691776  920261233       4  freebsd-zfs  (439G)

4. Does the slice of the root partition need to be marked active?
I don't think so.

5. Should I be creating a UFS1 or UFS2 partition?
UFS2.  You can also run ZFS on these systems.  My setup has a rootfs
that's UFS2, and dedicates the entire rest of the disk to ZFS.

I have tried both and neither has worked.

6. Should -T option be set with newfs?
Trim?  If you're using an SSD it's a good idea.

All SSDs.

7. Could there be something missing in the kernel?
What other issues are you running into?

Only not booting after it gets to where it mounts the rootfs.

Of course, I am using a serial console, but I believe the video driver needs to be installed on a working system with ports, so this may be an issue later on.



For reference, relevant U-Boot environment variables (transcribed):

bootargs_sata=vfs.root.mountfrom=ufs:/dev/ada0s2a
bootcmd=run bootcmd_sata
bootcmd_sata=sata start; fatload sata 0:1 ${loadaddr} ${bootfile};
fatload sata 0:1 ${fdtaddr} ${fdtfile}; fdt addr ${fdtaddr}; fdt
boardsetup; bootelf ${loadaddr}
bootfile=ubldr
fdtfile=cyrus_p5020.dtb
This is what I am using.

I really need to verify at this point that my setup is correct. I
guess it could be something set in uboot, but I don't see how. If I
can't figure this out, then maybe someone on this list could help me.
I would be willing to pay $100 an hour, or what you make at your day
job per hour, or what ever seems reasonable to you to get this issue
resolved. I think this could be done remotely by ssh into another
computer and then using the serial console, or I can send you a disk,
or maybe I could buy time on a working FreeBSD X5000, or I am sure
there are other options. I just don't want it to be 2025 and I am
still stuck on this issue.

Kind Regards,
Al


The easiest way to install would be to gpart from another powerpc
machine, mount the rootfs, mount the bootfs to ${rootfs}/boot/uboot,
then extract the base.txz and kernel.txz, that you can find on the
download server, in the mounted rootfs.  You can then use bsdconfig to
configure it.

- Justin

I didn't know there were binaries available. I looked all over the download server, which ones are for the X5000? PowerPC64?

Also, would I need to add the boot fs to fstab?

The system always stops in the same place when booting. The kernel does not find the root fs and is looking for it, then the boot stops right there. Even using disklabels has not helped. If I change the root partition in fstab to something besides the root partition, then its behavior different, so I believe that it is finding it, but it can't mount it for some reason. I think the next step is to try other binaries and see if that helps.

Kind Regards,
Al


--------------2FE5BEE16CF2B118200E0C0A--