Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jan 2011 20:58:21 GMT
From:      alexander naumochkin <alexander.naumochkin@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/153996: zfs root mount error while kernel is not located in /boot/kernel
Message-ID:  <201101142058.p0EKwLkh097053@red.freebsd.org>
Resent-Message-ID: <201101142100.p0EL0KnB047980@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         153996
>Category:       kern
>Synopsis:       zfs root mount error while kernel is not located in /boot/kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 14 21:00:20 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     alexander naumochkin
>Release:        8.2-PRERELEASE (SNAP-20110110) i386
>Organization:
>Environment:
FreeBSD zombie.prio.ru 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Tue Jan 11 01:17:21 MSK 2011     root@zombie.prio.ru:/usr/obj/usr/src/sys/GCAM  i386
>Description:
If the kernel is not located in default directory (/boot/kernel), it fails to mount zfs root during startup regardless of using vfs.root.mountfrom="zfs:zroot" or /etc/fstab record.

I use FreeBSD on GPT ZFS Root.


[ash@zombie ~]$ gpart show
=>       34  156301421  ada0  GPT  (75G)
         34        128     1  freebsd-boot  (64K)
        162    3145728     2  freebsd-swap  (1.5G)
    3145890  153155565     3  freebsd-zfs  (73G)

=>       34  156301421  ada1  GPT  (75G)
         34        128     1  freebsd-boot  (64K)
        162    3145728     2  freebsd-swap  (1.5G)
    3145890  153155565     3  freebsd-zfs  (73G)

[ash@zombie ~]$ gpart show -l
=>       34  156301421  ada0  GPT  (75G)
         34        128     1  (null)  (64K)
        162    3145728     2  swap0  (1.5G)
    3145890  153155565     3  disk0  (73G)

=>       34  156301421  ada1  GPT  (75G)
         34        128     1  (null)  (64K)
        162    3145728     2  swap1  (1.5G)
    3145890  153155565     3  disk1  (73G)

[ash@zombie ~]$ zpool status
  pool: zroot
 state: ONLINE
 scrub: none requested
config:

        NAME           STATE     READ WRITE CKSUM
        zroot          ONLINE       0     0     0
          mirror       ONLINE       0     0     0
            gpt/disk1  ONLINE       0     0     0
            gpt/disk0  ONLINE       0     0     0

>How-To-Repeat:
#cd /usr/src
#make installkernel KODIR=/boot/GCAM
#shutdown -r now

Select 6 (loader prompt) from boot menu and enter:

OK unload kernel
OK load /boot/GCAM/kernel
OK set module_path=/boot/GCAM
OK load opensolaris
OK load zfs
OK boot

kernel starts, detects hardware, but at "Trying to mount root from zfs:zroot" stops with "MOUNT ROOT ERROR:"  Entering zfs:zroot at mountroot> prompt not helps.
>Fix:
Boot from LiveCD, mount zroot, rename /boot/GCAM to /boot/kernel, reboot :)

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101142058.p0EKwLkh097053>