Multiboot

I created a multi-boot on my laptop with Debian Linux and FreeBSD and another Linux on a thumb drive. I updated and now when I boot into FreeBSD, it falls into a mountroot terminal. The message says "waiting for device /dev/ada0s1a" which is incorrect. It should be ada0s4b. I have searched for four days and even tried solutions from the /bin/sh shell, but it is read-only. One message says it is not a "login shell." I'm trying not to have to reinstall because I have had this setup for over a year learning and experimenting. Is there a way to change how it can go to the correct device or can I rollback? I am beyond my witts end. Can someone lead me to a solution? Thank you.
 
Boot to single user mode, I assume the entries in /etc/fstab are incorrect and that's why it's failing.

For UFS:
Code:
fcsk -y
mount -a

For ZFS:
zfs set readonly=off zroot/ROOT/default # Assuming the default pool name and BE, adjust where needed.

You should learn these commands by heart. In single user mode only the root filesystem is mounted and will be mounted read-only.
 
... when I boot into FreeBSD, it falls into a mountroot terminal.The message says "waiting for device /dev/ada0s1a"
When the boot ends printing the above message and presenting a mountroot prompt, then it's not possible to boot into single user mode. The root file system won't be mounted (read-only) at this stage, no /bin/sh shell to execute fsck or zfs commands.

With a Linux system on a thumb drive, every time that drive is plugged in or unplugged the FreeBSD device names will change [EDIT] which probably here won't be the case. USB devices are named /dev/daX [/EDIT]. Better is to label the partitions and modify the /etc/fstab accordingly.

b727plane, does the FreeBSD system boot normal when the thumb drive is unplugged?

[EDIT] if what covacat suggests doesn't work, enter ? and post the output. [/EDIT]
 
you still should be able to type ufs:/dev/ada0s4b at the mountroot> prompt
then you might need to add a line to loader.conf to set

vfs.root.mountfrom="ufs:/dev/ad0s4b"
a 'b' bsd partition is usually for swap but if you got creative it is what it is
 
Thanks all. I still cannot find what the drive designation would be. with the ? i get list of GEOM disk drives.
 
ufs: /dev/ada0s4a took me to "Enter full pathname of shell or RETURN for /bin/sh:"
root@:/ #
Your /etc/fstab is still referencing the 'old' drive's designation. Pro tip, use labels instead of drive/partition names.
 
I know you all probably have been doing this for years, but I'm trying to transition into FreeBSD. I'm not getting past this point to fix this situation. Is there a way to fix this from inside FreeBSD at the root@:/ or from the mountfrom prompt?
 
ufs: /dev/ada0s4a took me to "Enter full pathname of shell or RETURN for /bin/sh:"
root@:/ #
Enter there exit. This will boot the system into multi-user mode.

Log in as root or user, edit as root /etc/fstab, set /dev/ada0s4a to the root ( / ) file system line.
Code:
# Device        Mountpoint    FStype    Options        Dump    Pass#
/dev/ada0s4a    /             ufs       rw             1       1
Eventually also set for swap the correct partition.
 
okay further I was able to get into root single user mode the su to my user name
I did a cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ada0s1a / ufs rw 1 1
/dev/ada0s1b /home ufs rw 2 2
/dev/ada0s1d none swap sw 0 0
# KDE
proc /proc procfs rw 0 0
fdeesc /dev/fd fdescfs rw 0 0
# LINUX
linsysfs /compat/linux/sys linsysfs rw 0 0
# USB
# /dev/da0p2 /myusb msdosfs rw 0 0

prior to whatever cause me to loose my Freebsd, I was able to boot into all three.

I did a fsck -y
** /dev/ada0s4a (NO WRITE)
** SU+J Recovering /dev/ada0s4a

USE JOURNAL? no

** Skipping journal, falling through to full fsck

it went through Phases 1 - 5 then sai
Can't stat /dev/ada0s1b: No such file or directory

I then did mount -a and it said
mount: /dev/ada0s4a: Operation not permitted
mount: /dev/ada0s1b: Operation not permitted

How do I fix this? Normally, I would use sudo fsck but not sure in this case to get permission
 
SirDice, T Daemon, and all others, I thank you from the bottom of my Freebsd. I finally, with your help, fixed it. I am not using FreeBSD as my daily driver, due to a printer issue. My Printer is an older Brother MFC495CW with a driver issue. I finally remember how to work through what you all were guiding me to do. Thank you so much.
 
There are 2 ways to dual boot.
The first is to select the boot device in the bios.
Live FreeBSD usb (sorry for the ad)

The second is to have a bootloader with a boot menu. Grub2 is most common but ReFind and Syslinux also support boot menus.
The issue with the /etc/fstab entry is it is specific to the physical port you plug into and will change if you plug into a different port.
 
There are 2 ways to dual boot.
The first is to select the boot device in the bios.
The second is to have a bootloader with a boot menu. Grub2 is most common but ReFind and Syslinux also support boot menus.

Another way - when using MBR scheme rather than GPT - is good old-fashioned boot0cfg(8), which offers selection of up to 4 bootable slices, such as windows, linux or FreeBSD.

My refurb Thinkpad T430s came with win10pro, which I left for my kids' use when I'm gone, taking 2 MBR slices.

Shrinking that left room for 16GiB common fat32lba data and 64GiB for FreeBSD, so boot0cfg offers Win and FreeBSD, rock solid.

The issue with the /etc/fstab entry is it is specific to the physical port you plug into and will change if you plug into a different port.

For USB, yes, unless using labels.
 
Back
Top