Boot to mountroot, anyway to rescue it ?

I installed the FreeBSD with partition option by "Auto (ZFS ) Guided Root-on-ZFS"
works well for several days on my T420s.
but after add a line "kern.vty=vt" to /boot/loader.conf bad things happen, it always boot to mountroot.
is my root on ada0p4 ? should I type: "zfs:zroot/ROOT/ada0p4"? I end up in "mountroot" with the unknown file system error.

ad0 on second picture is a bootable 16G USB flash disk, I use it boot into bsdinstall to check my ada0 status.
 

Attachments

  • mountroot.JPG
    mountroot.JPG
    273.3 KB · Views: 484
  • IMG_0075 (Medium).JPG
    IMG_0075 (Medium).JPG
    174.3 KB · Views: 485
"Auto (ZFS ) Guided Root-on-ZFS" is a experimental function in earlier version.

How to manually create ZFS partitions to install FreeBSD?
 
Boot using your "Live CD" then import the zpool(8) and fix your loader.conf

example:
1. Boot under LiveCD from bootable usb drive or CD
2. Login using root without password
3. Create an altroot mount point under /tmp/root
mkdir /tmp/root
4. Import the zroot pool under the /tmp/root
zpool import -fR /tmp/root zroot
(notice there's no trailing forward slash after /tmp/root)
5. Mount the zroot/ROOT/default which contain the /boot
zfs mount zroot/ROOT/default
6. Edit your loader.conf which now is mounted under /tmp/root/boot
ee /tmp/root/boot/loader.conf
remove the last modification from it
if you have
"kern.vty=yes" #this is wrong
it should be removed or modified to
kern.vty="yes" # it's not necessary to be in loader.conf as it's default. value
then press "ESC" -> leave editor -> save changes
7. Export the zpool
cd /
zpool export zroot
8. Shutdown and remove the usb bootable drive or cd then boot normally
shutdown -p now

loader.conf (FreeBSD 12.1 zfs)
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
opensolaris_load="YES"
zfs_load="YES"
 
Last edited:
but after add a line "kern.vty=vt" to /boot/loader.conf bad things happen, it always boot to mountroot.
The vt(4) console is the default, there's no need to set it explicitly. But even if you did it would have zero effect on boot settings. So I suspect you've made a typo and that's causing the boot failure.
 
Boot using your "Live CD" then import the zpool(8) and fix your loader.conf

example:
1. Boot under LiveCD from bootable usb drive or CD
2. Login using root without password
3. Create an altroot mount point under /tmp/root
mkdir /tmp/root
4. Import the zroot pool under the /tmp/root
zpool import -fR /tmp/root zroot
(notice there's no trailing forward slash after /tmp/root)
5. Mount the zroot/ROOT/default which contain the /boot
zfs mount zroot/ROOT/default
6. Edit your loader.conf which now is mounted under /tmp/root/tmp/mnt/boot
ee /tmp/root/tmp/mnt/boot/loader.conf
remove the last modification from it
if you have
"kern.vty=yes" #this is wrong
it should be removed or modified to
kern.vty="yes" # it's not necessary to be in loader.conf as it's default. value
then press "ESC" -> leave editor -> save changes
7. Export the zpool
cd /
zpool export zroot
8. Shutdown and remove the usb bootable drive or cd then boot normally
shutdown -p now

loader.conf (FreeBSD 12.1 zfs)
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
opensolaris_load="YES"
zfs_load="YES"
These directions gave me hope when I had another problem with boot loader.conf. Thanks again, many times.
 
Hello,

I wonder if you ever solved this problem. I just got it this morning. I did a rollback from 12.2 to 12.1 and Bam, cannot boot. I have a the mountroot prompt. I have tried to follow vladiBG but my [FONT=courier new]loader.conf[/FONT] is much simple and there are no such options :

Code:
cat loader.conf                 
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
vfs.zfs.min_auto_ashift=12
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
vfs.zfs.min_auto_ashift=12
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
vfs.zfs.min_auto_ashift=12
zfs_load="YES"

Event the instruction to mount the [FONT=courier new]zroot/ROOT/default[/FONT] volume were not completely effective, I had to change the mountpoint of that volume for it to mount and be able to see the volume's content.

Any way, I am stuck, any help would be appreciated.


IMG_6238.jpg
 
Open another thread for your problem. Your issue is not with vt like in this topic.

According your screenshot your are missing or fail to load opensolaris.ko and/or zfs.ko

You can try to load them manually from the loader prompt
Code:
load /boot/kernel/kernel
load /boot/kernel/opensolaris.ko
load /boot/kernel/zfs.ko
boot
 
Back
Top