Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

zfs pool not imported at boot, /home inaccessible



I let the system (laptop) emerge world updates overnight. In the morning I found it hang. No reaction on any kind of keystrokes.  It has happened again, yesterday, after replacing udev with eudev and upower with upower-pm-utils.  And, my guess, is that it has to do with it. I.e., when the battery erached a full charge state, it hang.


After booting, the system can't mount /home, thus, I can't access my data. However, I can login as root in /.

Any hints on how to proceed with this?

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Booting a System Rescue CD (via a USB-Flash stick actually) with ZFS support built-in, I am able to import the pool and see all of its contents via:

zpool import -R -f /mnt/z PoolName

I exported the pool and tried to reboot the system.  Now, fianlly, it complains that "Failed to import your zfs root dataset!" and boots into rescue shell. It should be fairly easy to understand what is wrong currently in my Funtoo box and fix it, right? :-)

Link to comment
Share on other sites

  • 0

The steps to approach this were as suggested by Tassie_Tux (and, first, by renihs in #zfsonlinux): booting a live System Rescue ISO (with ZFS 0.6.3 support), importing the zpool (using -R and setting /mnt/funtoo as the mountpoint for the pool), chrooting into the existing Funtoo system, re-emerging all zfs related stuff and let world updates finish completely and successfully.


All seems to be fine, except for boot-update and/or bliss-boot.  I am trying to follow the wiki-instructions (on ZFS install). What is the difference between conf.py and config.py in /etc/bliss-boot/?  The wiki <http://www.funtoo.org/ZFS_Install_Guide#bliss-boot> refers to conf.py.  But, bliss-boot is looking for a config.py. I used

bliss-initramfs 1 3.12.22-KS.01

and moved the initrd product to /boot/kernels via

mv /boot/kernels/3.12.22-KS.01/initrd-3.12.22-KS.01 /boot/kernels/3.12.22-KS.01/initrd

I had to edit the boot command (at launch) by hand to enter the 3.12.22-KS.01 kernel to boot successfully into Funtoo. I have the following config.py:

# Copyright 2014 Jonathan Vasquez <jvasquez1011@gmail.com>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#---------- General Configuration ----------

# Kernel Path and Bootloader Type
bootdir = "/boot/kernels"

# Supported bootloaders: grub2, extlinux
bootloader = "grub2"

# Is an initrd being used?
initrd = 1

# 'timeout' is automatically multiplied by 10 for extlinux
timeout = 3

# Default kernel to boot into
default = "3.12.22-KS.01"

# What do you want your kernel/initrd to be called in the config file?
kernel_prefix = "vmlinuz"
initrd_prefix = "initrd"

# If using 'whole disk zfs', dataset where your /boot directory is in
zfs_boot = "cognizance/os/funtoo/root"

#---------- GRUB 2 settings ----------

# If you are using an UEFI system and booting into an UEFI-enabled
# Linux install, enable this
efi = 0

# Only activate this if you are using 'whole disk zfs'
# aka no /boot, and your /boot directory is inside the zfs pool
zfs = 0

# Adds all the modules specified on the list to the grub config
# Feel free to specify or remove anything you use/don't use
goody_bag = [

#---------- extlinux settings ----------
el_ui = "menu.c32"
el_m_title = "Boot Menu"
el_c_title = "1;37;40"
el_c_border = "30;40"
el_c_unsel = "37;40"

# If you enable this, it will disable the menu and automatically
# boot your chosen default kernel. Leaving this at 0 will still boot
# automatically but it will first show the menu, wait the timeout value
# that you set above, and then boot the default kernel
el_auto_boot = 0

# ---------- Kernels & Options ----------
kernels = {
	'3.12.22-KS.01' : 'root=cognizance/os/funtoo/root quiet',

# ---------- Other ----------

# Entries below will be appended (as is) to the end of the final file
# Use this if you have custom stuff not detected by the bootloader
# (like Windows installations...)

append = 0

append_stuff = \
"""menuentry "Windows 7" {
	insmod chain

	set root='(hd0,msdos2)'
	chainloader +1

Unfortunately, bliss-boot does not seem to pick it up.  Maybe useful to know as well, the boot.conf file is structured as follows:

cat /etc/boot.conf
boot {
        generate grub
        default "Funtoo Linux" 
        timeout 3 

"Funtoo Linux" {
        kernel bzImage[-v]

"Funtoo ZFS"    {
        kernel vmlinuz[-v]
        initrd initrd[-v]
        params root=cognizace/os/funtoo/root quiet

Stuck again!

Link to comment
Share on other sites

  • 0

Using the config.py listed in the previous post, and the content of /boot/kernels:

ls /boot/kernels/3.12.22-KS.01/

System.map config initrd vmlinuz

That's what bliss-boot returns:

Bliss Boot - v1.1.0
Jonathan Vasquez <jvasquez1011@gmail.com>
Distributed under the MPL 2.0

Scanning /boot/kernels ...
Scanning /etc/bliss-boot/config.py ...
Please add your desired kernels and their options to the 'kernels' list in /etc/bliss-boot/config.py.
These entries should match the kernels you have in /boot/kernels.

What is missing?

Link to comment
Share on other sites

  • 0

Hi I just use bliss-initramfs, edit /etc/boot.conf and run boot-update



boot {

        generate grub
        default "Funtoo ZFS new" 
        timeout 3
"Funtoo ZFS new" {
        kernel gentoo-3.14.6
        initrd initrd-3.14.6-gentoo
        params root=rpool/ROOT/funtoo
        params += dozfs=force
        # Also add 'params += crypt_root=/dev/sda2' if you used encryption
        # Adjust the above setting to your system if needed

kernel and intird are stored in /boot

Its simpler like this... cu peje

Link to comment
Share on other sites

  • 0

Hi Nikos, yes I've read your above post -> my message is don't use bliss-boot, just create your initrd with bliss-initramfs edit /etc/boot.conf. Use Daniels boot-update and be happy;-)

I've tried several times to get a clean boot with bliss-boot - never had succes so my advice is to do it "simpler"

cu Peje


this enty forces the import of the pool

params += dozfs=force

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...