UFS no /boot/loader

Hello,

I had two drives on this machine both with FreeBSD. I removed one of them to use on another machine. Booting this machine gets me the message below. Is there a way to pinpoint where the loader is from "boot:" promt or this has to be a new installation? I added storage drives, none with OSs.

Code:
No /boot/loader

FreeBSD/x86 boot
Default: 0:ad(0,a)/boot/kernel/kernel
boot:
No /boot/kernel/kernel

FreeBSD/x86 boot
Default: 0:ad(0,a)/boot/kernel/kernel
boot:

Thank you,
 
Impossible to answer without more information. Does the remaining drive actually have an installed FreeBSD installation?

And well.. You could always use a rescue system (CD or a memory stick).
 
Were both drives able to boot FreeBSD?
Yes, the one (SSD) I removed was connected and the other one (SATA) was just sitting there but not connected. I previsouly booted from the SATA that was not connected.

To easily follow:

Drive 1 was SSD
Drive 2 is SATA
 
When you had both connected, could you select either as your boot device from BIOS and have both successfully boot FreeBSD?
 
Impossible to answer without more information. Does the remaining drive actually have an installed FreeBSD installation?

And well.. You could always use a rescue system (CD or a memory stick).
I guess I was not too specific but yes, both drives have installations of FreeBSD.
 
When you had both connected, could you select either as your boot device from BIOS and have both successfully boot FreeBSD?
I never really tried. I simply disconnected the SATA from the board. I did not do a dual boot of sort or never switched from one installation to the other.
 
I suspect the SATA drive is actually ada1. It should keep that number even if you remove ada0. But it looks like it has a fairly old boot loader installed. Is that SATA disk partitioned as MBR or GPT? It might just help to boot from the install media and rewrite the bootloader on the SATA disk.
 
I suspect the SATA drive is actually ada1. It should keep that number even if you remove ada0. But it looks like it has a fairly old boot loader installed. Is that SATA disk partitioned as MBR or GPT? It might just help to boot from the install media and rewrite the bootloader on the SATA disk.
I believe it is GPT. So is there a way to detect if the drive is ada1 or ada0? If so, can one actually use "boot:" prompt to fire up the drive?
 
You can try entering 1:ad(0,a)/boot/kernel/kernel or 1:ad(1,a)/boot/kernel/kernel.

The first number indicates the BIOS drive number, see boot(8).
 
If this is the first or only drive, then the BIOS drive number is 0, because the BIOS always starts numbering drives with 0 (a.k.a. “C:”).

You say the drive uses GPT partitioning, right? Are you trying to boot it with EFI or with CSM (legacy BIOS)? If the latter, I suspect that either gptboot(8) or a pmbr are missing from the drive.
 
If this is the first or only drive, then the BIOS drive number is 0, because the BIOS always starts numbering drives with 0 (a.k.a. “C:”).

You say the drive uses GPT partitioning, right? Are you trying to boot it with EFI or with CSM (legacy BIOS)? If the latter, I suspect that either gptboot(8) or a pmbr are missing from the drive.
Legacy.
 
At this point, we need more information in order to be able to help you. For a start, the output from gpart show so we can see the partitions, and the contents of the /boot directory of the drive. (Obviously you’ll have to plug the drive into another machine in order to retrieve that information.)
 
At this point, we need more information in order to be able to help you. For a start, the output from gpart show so we can see the partitions, and the contents of the /boot directory of the drive. (Obviously you’ll have to plug the drive into another machine in order to retrieve that information.)
gpart show does not seem to be yielding anything good since the return is:

Code:
boot: gpart showNo show

FreeBSD/x86 boot
Default: 0:ad(0,a)show
boot:

I think a new installation might be needed. I was treading that. I will try a live session first.
 
this doesn't look like a shell of a running system to me :-/

Boot from the installer stick and select "Shell" in the first dialog, THEN issue the gpart command.
 
This is gpart show
PXL_20210317_163925188new.jpg
 
This is gpart show
Just for the record, this is not a GPT partition scheme, it’s a legacy BSD disklabel. This should work, you should be able to boot it with legacy BIOS.
However, you can’t boot without a /boot directory, of course. :)
 
Just for the record, this is not a GPT partition scheme, it’s a legacy BSD disklabel. This should work, you should be able to boot it with legacy BIOS.
However, you can’t boot without a /boot directory, of course. :)
Just one more, is there a way to create /boot on an existing installation? Thank you.
 
Did you try SirDice's recommendation yet? /boot is probably in your UFS partition on ada0 per your photo but the loader is confused because the bios drive numbers changed out from under it.

You're stuck in "boot2" of boot(8), if I understand this correctly.
 
Just one more, is there a way to create /boot on an existing installation? Thank you.
If you have another FreeBSD installation (but same FreeBSD version), you can just copy it over.
Note that /boot also contains the kernel(s).
 
Just one more, is there a way to create /boot on an existing installation? Thank you.
Uhm, maybe copying it over from an installer stick could get you running, otherwise you'd need to extract it from both base.txz and kernel.txz for your FreeBSD version.

But first, to be sure, you don't expect to see /boot in the partition table, do you?
 
Back
Top