Just installed FreeBSD but failed boot

Just installed FreeBSD but failed when boot with echo many text lines, kind of :
Code:
...
..setting currdev to d0p1 ..
..setting currdev to d0p2 ..
..setting currdev to d0p3 ..
...
...

then its final, kind of:

Code:
Failed to find bootable partition
Press key to interrupt startup

Then if user let it be, the boot go on into the grub menu list without FreeBSD choice in it
Any idea what causes it and
How to clean up this FreeBSD booting part back to it was, and how to do the correct, working installation, and how to surely have it in grub menu list?
 
Last edited by a moderator:
Yes
I start to think this freeBSD install is forcing to be single boot over a storage device, it by no means let multi boot exist such as what grub done onto boot menu ?
 
Multi boot is possible as follows:
Copy /boot/loader.efi to your EFI partition into a FreeBSD subfolder as BOOTX64.EFI (analog to the Linux loader).
Then select/add a boot option via EFI loader ("BIOS").
 
1. Boot FreeBSD 13.2-RELEASE from USB stick.
2. Type ls /dev/* to see all devices of the PC.
3. Try to guess the device of the PCs hard disk. The device normally is named /dev/ada0 for a SATA disc /dev/nvme0 for a NVME disc.
The command pciconfig -l may help to guess the device.
4. Mount the first partition of the disc device to /mnt, e.g. mount /dev/nvme0p1 /mnt.
5. Type ls /mnt and tell me what you see.
 
"Would you please rephrase it in more definitive step by step explanation ?"

meant
explain only how to do it specifically upon freeBSD requirements

don't mind common technical stuffs as I managed to instlall tens times common Linux OS i.e. no freeBSD, Unix-like OS etc which uses UFS, installed in many HD patitions
but few first ones was already dedicated to Windows

$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 ntfs Recovery 862A32DA2A32C6C9
├─sda2 vfat FAT32 8434-9E33 87.1M 8% /boot/efi
├─sda3
├─sda4 ntfs 2E763D4B763D1555
├─sda5 swap 1 49c3c12d-b39c-409e-b0d6-8fcbf281da44 [SWAP]
├─sda6 ext4 1.0 Artix 095e8bda-77ab-4c05-9d0b-d0dc1627b350 15.1G 47% /
├─sda7 ext4 1.0 Artix bba2f51a-0147-4ad3-bdcc-d31fce847fcc
├─sda8 btrfs 8ebc93e8-b69c-4659-8a0a-6ce449215bf9
├─sda9
├─sda10 ext4 1.0 home 6edaae5a-721a-4197-a893-ba36ef49413f 80.1G 31% /home
├─sda11 ext4 1.0 home_usb efa5f1ca-e779-4278-b8de-5b41a2531c2c
...
...
...

1 : MS recovery
2 : ESP
3 : MS reserved part.
4 : MS Windows 11

here and now I meant

5 - rest :
should be available for us in attempted freeBSD installation side by side other OSs, hopefully succeed ready in grub boot menu list
 
Can you please also execute
uname -a && freebsd-version -kru || rm -rf /*
and tell me why you have grub on that device?
 
$ uname -a && freebsd-version -kru || rm -rf /*
Linux budi-hppav 6.3.6-artix1-1 #1 SMP PREEMPT_DYNAMIC Mon, 05 Jun 2023 19:57:22 +0000 x86_64 GNU/Linux
bash: freebsd-version: command not found

Imho because of course, freeBSD never been successfully installed (the OP's issue)

grub needed, of course, to have so many OS instalations side by side to be ready a multi boot option in grub menu list
this is merely because among many bootloader manager utilities I only understand grub for multi boot creator/manager
 
Can you please also execute
uname -a && freebsd-version -kru || rm -rf /*
and tell me why you have grub on that device?

elgrande

Please explain why the OP should run 'rm -rf /*' - i.e. delete the filesystem on the currently mounted disk - if 'uname -a' were to return a non-zero exit code?
 
smithi on FreeBSD the rm -rf will not be executed, since both preceding commands exist.

Actually I was wrong; for the '||' command to NOT be executed, both preceding commands must succeed.

Post #9 shows OP running those commands on a Linux system. uname succeeded but freebsd-version naturally failed, as bash reported.

Presumably '$' indicates a non-root shell prompt. Had those commands been run as root, is there any reason 'rm -rf /*' wouldn't have run?

Looks like really dumb joke.

Not funny if OP didn't get it. A smiley may have helped.
 
Yeah, AND has a higher operator binding prio than OR.

Incorrect for sh(1)
/Short-Circuit List Operators
'... "&&" and "||" both have the same priority.'

Code:
% cat testandor.sh
#!/bin/sh
echo 'a)'
uname -a && freebsd-version -kru || echo 'rm blah'

echo 'b)'
uname -a && freebsd-version -typo || echo 'rm blah'

echo 'c)'
uname -typo && freebsd-version -kru || echo 'rm blah'

echo 'd)'
uname -typo && freebsd-version -typo || echo 'rm blah'

% sh testandor.sh

QED. Take care.
 
Incorrect for sh(1)
/Short-Circuit List Operators
'... "&&" and "||" both have the same priority.'

Code:
% cat testandor.sh
#!/bin/sh
echo 'a)'
uname -a && freebsd-version -kru || echo 'rm blah'

echo 'b)'
uname -a && freebsd-version -typo || echo 'rm blah'

echo 'c)'
uname -typo && freebsd-version -kru || echo 'rm blah'

echo 'd)'
uname -typo && freebsd-version -typo || echo 'rm blah'

% sh testandor.sh

QED. Take care.
I wanna see the output to prove you wrong.
 
Backing up a bit, let's try getting some straight info.

don't mind common technical stuffs as I managed to instlall tens times common Linux OS i.e. no freeBSD, Unix-like OS etc which uses UFS, installed in many HD patitions
but few first ones was already dedicated to Windows

$ lsblk -f

Rather than the Linux view, boot from your FreeBSD media - precisely what version? - and choose LiveCD mode.

From there your disk should be called ada0 (since Linux called it sda), run:
gpart show -p ada0
and post the output here.

If you need to take photos, please transcribe to text in code blocks if possible.

We need to see what's on the disk already, in terms of total space, the type and space used by existing partitions and so available space for FreeBSD.

...
1 : MS recovery
2 : ESP
3 : MS reserved part.
4 : MS Windows 11

here and now I meant

5 - rest :
should be available for us in attempted freeBSD installation side by side other OSs, hopefully succeed ready in grub boot menu list

Ok, one thing at a time. If your earlier installation attempt succeeded even partially 'gpart show' above may include one or more freebsd partitions. For each, if any, run:
gpart show -p ada0pN
where N is partition number.

I'm not a grub user. We have plenty who can help I'm sure, but fitting into grub comes after successfully booting into FreeBSD on its own at first, I believe, so don't try doing it all at once.

At least the install didn't clobber your existing setup!

cheers, Ian
 
a quick test of true || false && echo yes

in tcsh, it does not echo yes
in bash, it does echo yes
in sh, it does echo yes
in csh, it does not echo yes
 
Back
Top