Jump to content
funtoo forums
  • 0
Sign in to follow this  
NikosAlexandris

zfs pool not imported at boot, /home inaccessible

Question

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?

Share this post


Link to post
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? :-)

Share this post


Link to post
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 = [
	#"lvm",
	#"luks",
	#"mdadm",
	#"mdraid09",
	#"mdraid1x",
]


#---------- 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!

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
  • 0

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

sample:

 

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

Share this post


Link to post
Share on other sites
  • 0

Hi Peje,

 

if you have a look in the posts of mine (above), I do use as well bliss-initramfs (i.e. bliss-initramfs 1 3.12.22-KS.01). My boot.conf file is posted as well. If you spot anything wrong into it, could you please highlight it for me?  Thank you.

Share this post


Link to post
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

p.s:

this enty forces the import of the pool

params += dozfs=force

Share this post


Link to post
Share on other sites
  • 0

bliss-boot didn't work again for me. boot-update works fine. Though, the initrd and vmlinuz files have to be under /boot to be detected. Took me a while to figure out as I was moving the initrd related file inside /boot/kernels/Some-Linux-Kernel-Version, as required by bliss-boot.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...