Solved Help to repair boot system

Hello
I attempted to install Linux Ubuntu and FreeBSD so I could dual boot. I first installed Ubuntu with no problems: at

/dev/sda1 - EFI system 512mb
/dev/sda2 - ext4 /boot 732mb
/dev/sda3 - ext4 / 400gb
There was free space of 450gb

I then installed FreeBSD in what I thought was the free space but when I reboot instead of going into Ubuntu- so I could edit Grub, the system boots into FreeBSD which sees the disk this way:

disk0p1: unknown
disk0p2: unknown
disk0p3: unknown
disk0p4: unknown
disk0p5: EFI
disk0p6: FreeBSD UFS
disk0p7: FreeBSD Swap

I’m stuck about what option to select that will make it possible to get a dual boot option: is there anyway of loading the Ubuntu partition from the boot option prompt?
Thanks
 
I'm not sure what unknown disk0p4 is since you made only 3 linux partitions, but consider this:

1, on boot, hit the key to enter your UEFI boot menu -- maybe [ESC] or [F2] or [F9] -- that allows the UEFI firmware to show any bootable partition
2, assuming the Ubuntu GRUB partition is visible, select it and you should be able to boot to Ubuntu
3, once booted, enter terminal and as root run
Code:
grub-mkconfig -o /boot/grub/grub.cfg
and this should find any bootable partition (including FreeBSD) and add it to GRUB menu

4, also as root, run
Code:
efibootmgr
and this will show the priority sequence for boot partitions -- now you can change the boot order so Ubuntu's GRUB gets priority, the command is something like
Code:
--bootorder {ubuntu's number},{freebsd's number}
see
Code:
man efibootmgr
 
Consult the dual boot howto here in the forum, and leave some feedback (click Thanks if it worked for you)
AFAIC, there are two methods to set up dual boot. You have to decide which one you want. IMHO UEFI is the sounder solution, YMMV.
  1. Use UEFI boot menu
  2. Use grub
Did you make progress with your math learning?
 
neilms
phalange

Code:
Code:
grub-mkconfig -o /boot/grub/grub.cfg
>and this should find any bootable partition (including FreeBSD) and add it to GRUB menu

You can also run as root:

# os-prober
 
Did you make progress with your math learning?
Hi - yes thank you. I am making steady progress though my math learning is a long term project. There is so much to do but so little time to do it all!
 
I am making steady progress though my math learning is a long term project.
Don't worry, it's a never ending story. And I mean that in a positive way, there's always something new to learn. Just keep progressing at your own pace.
 
Consult the dual boot howto here in the forum, and leave some feedback (click Thanks if it worked for you)
AFAIC, there are two methods to set up dual boot. You have to decide which one you want. IMHO UEFI is the sounder solution, YMMV.
  1. Use UEFI boot menu
  2. Use grub
Did you make progress with your math learning?
Hi I am following the How To dual boot referred to above. In the end I had to reinstall Ubuntu and am now trying to install FreeBSD 12.1 following these steps.

unfortunately I became stuck at this point:

“# Create your ZFS file system hierarchy:
zfs create -o mountpoint=none zroot/ROOT
zfs create -o mountpoint=/ zroot/ROOT/default”

Typing in :
zfs create -o mountpoint=none
I get:
“Missing file system argument
Usage: etc”
If I try:
zfs create -o mountpoint=none zroot/ROOT
I get ‘cannot create ‘zroot/ROOT’: no such pool ‘zroot’.

Can anyone help with this please?
 
Hi I am following the How To dual boot referred to above. In the end I had to reinstall Ubuntu and am now trying to install FreeBSD 12.1 following these steps.

unfortunately I became stuck at this point:

“# Create your ZFS file system hierarchy:
zfs create -o mountpoint=none zroot/ROOT
zfs create -o mountpoint=/ zroot/ROOT/default”

Typing in :
zfs create -o mountpoint=none
I get:
“Missing file system argument
Usage: etc”
If I try:
zfs create -o mountpoint=none zroot/ROOT
I get ‘cannot create ‘zroot/ROOT’: no such pool ‘zroot’.

Can anyone help with this please?
It’s ok folks I mistyped ‘o’ and ‘O’ in the instructions- I’m moving ahead again now
 
Hi I am following the How To dual boot referred to above. In the end I had to reinstall Ubuntu and am now trying to install FreeBSD 12.1 following these steps.
Then either there is s/th missing in the howto or s/th went completely wrong...
“# Create your ZFS file system hierarchy:
zfs create -o mountpoint=none zroot/ROOT
zfs create -o mountpoint=/ zroot/ROOT/default”
This does not look right. Here is a list of the mountpoints I have:
Code:
paul@t450s:~ % zfs get mountpoint
NAME                  PROPERTY    VALUE            SOURCE
t450s mountpoint / local
t450s/ROOT mountpoint /ROOT inherited from t450s
t450s/ROOT/default mountpoint legacy local
t450s/SWAP mountpoint - -
t450s/dist mountpoint /dist inherited from t450s
t450s/dist/12-STABLE mountpoint /dist/12-STABLE inherited from t450s
t450s/dist/12.1-REL mountpoint /dist/12.1-REL inherited from t450s
t450s/home mountpoint /home inherited from t450s
t450s/src mountpoint /src inherited from t450s
t450s/src/12-STABLE mountpoint /src/12-STABLE inherited from t450s
t450s/src/12.1-REL mountpoint /src/12.1-REL inherited from t450s
t450s/src/13-CUR mountpoint /src/13-CUR inherited from t450s
t450s/usr mountpoint /usr inherited from t450s
t450s/usr/ports mountpoint /usr/ports inherited from t450s
t450s/var mountpoint /var inherited from t450s
t450s/var/cache mountpoint /var/cache inherited from t450s
t450s/var/crash mountpoint /var/crash inherited from t450s
t450s/var/log mountpoint /var/log inherited from t450s
t450s/var/mail mountpoint /var/mail inherited from t450s
t450s/var/obj mountpoint /var/obj inherited from t450s
t450s/var/tmp mountpoint /var/tmp inherited from t450s
I name my ZFS pools after the machine or brand/model of disk device. So when I plug in a ZFS pool from my old machine, the pools do not have the same name zroot or zpool.
 
Hello, sadly I have encountered a problem getting FreeBSD to dual boot with Ubuntu. To clarify - this is my current setup:

I have a HP Laptop with a single 1 TB drive. Yesterday I installed Ubuntu 20.04 using a 'custom' partitioning scheme. Linux sees the hard disk as '/dev/sda'.

/dev/sda1 is my EFI system partition with a fat32 filesystem, mountpoint: /boot/efi = 512MB
/dev/sda2 is a /boot partition with a ext4 filesystem = 732MB
/dev/sda3 is the ubuntu install which is encrypted in a LVM = roughly 490GB

I had left the balance of the disc - over 457GB - free for FreeBSD. This morning I followed the instructions of the how to at: how to dual boot FreeBSD
using a verified USB image. Now almost everything went fine in accordance with the 'no news is good news' approach. Most of the commands did not report any error of any kind. There were a few bumps in the road when I made a few typos but everything seemed ok.

The only noticeable thing that concerned me was at the point which states:
# Instruct FreeBSD to mount ZFS pools during system initialization:
echo 'zfs_enable="YES"' >> /mnt/etc/rc.conf
My shell reported back "unable to create directory /mnt/etc/rc.conf"

I hoped that this was nothing to worry about and continued - no other errors seemed to appear.

Now I have looked at Grub2 in ubuntu and created a custom cfg file with the following in it:
Code:
menuentry "FreeBSD" {
insmod part_gpt
insmod fat
setroot=(hd0,gpt1)
chainloader /efi/boot/freebsd.efi
}
This file is saved in my /boot/grub/ directory

When I reboot and grub is presented, FreeBSD is on the menu, but if I select it I get this error:
/efi/boot/freebsd.efi not found
.

I have tried to examine the path and I have /boot/efi and thought that the writer of the how to may have made a mistake as he stated that he was not going to explain how to edit grub in any event. Changing the path to the chainloader command made no difference. FreeBDS still will not boot.

This is some output from using parted - to check my partitions:
Code:
GNU Parted 3.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                           
Model: ATA WDC WD10JPVX-60J (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name   Flags
 1      1049kB  514MB   513MB   fat32               boot, esp
 2      514MB   1259MB  746MB   ext4
 3      1259MB  451GB   450GB
 4      451GB   456GB   4295MB               swap0
 5      456GB   1000GB  545GB   zfs          zfs0

Can anyone see what may be wrong? Is there an easy way to fix the problem or would you advise me to try the procedure again in light of mjollnir's post above?
 
Hi all - I installed the refind boot manager recommended in the how to. It worked without any special configuration.

I can now use either Ubuntu or FreeBSD!

Now I’ve got to begin configuring the installations. Thanks for all your help.
 
Back
Top