Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel panic on geek-sources with ZFS rootfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Mon Dec 03, 2012 11:10 am    Post subject: Kernel panic on geek-sources with ZFS rootfs Reply with quote

I use geek-sources-3.6.8 with zfs use-flag:

Code:

emerge -pv geek-sources

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-kernel/geek-sources-3.6.8:3.6.8::init6  USE="branding genpatches symlink uksm zfs -aufs -bfq -build -ck -debian -deblob -fedora -grsecurity -ice -mageia -reiser4 -rt -suse -vserver" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB


Code:

emerge -pv zfs

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-fs/zfs-0.6.0_rc12-r1  USE="kernel-builtin rootfs -custom-cflags -static-libs -test-suite" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB



Partitions:

Code:
ms-dos

/dev/sda1      /boot (ext2)
/dev/sda2      /       (zfs)


grub.cfg:

Code:

menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9b953dffbc180c38' {
   load_video
   insmod gzio
   insmod part_msdos
   insmod ext2
   insmod zfs
   setroot='hd0,msdos1'
   echo   'Loading Linux 3.6.8-geek ...'
   linux   /vmlinuz-3.6.8-geek root=ZFS=dom/parent


fstab:

Code:

dom/parent      /         zfs      noatime               0 0


kernel config:

Code:

grep ZFS .config
CONFIG_ZFS=y

grep CONFIG_SPL .config
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SPL=y




But the system don't load because of kernel panic: "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"

Why?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Mon Dec 03, 2012 11:31 am    Post subject: Reply with quote

Welcome!

Your kernel has no support for partition table or hard drive controller.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Mon Dec 03, 2012 11:56 am    Post subject: Reply with quote

Jaglover wrote:
Welcome!

Your kernel has no support for partition table or hard drive controller.


Config of this kernel is copied from my current work kernel.
Back to top
View user's profile Send private message
MassimoM
n00b
n00b


Joined: 03 May 2008
Posts: 14
Location: Italy

PostPosted: Mon Dec 03, 2012 12:08 pm    Post subject: Reply with quote

Actually ZFS, even when built INSIDE the kernel, needs an initramfs.
That initramfs can be used even for different kernels, as it does not need to contain modules (if ZFS is builtin), but it needs to contain ZFS utilities and some scripts.
I usually build my initramfs with dracut, but I'm sure that there are other ways more Gentoo-specific.
Back to top
View user's profile Send private message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Mon Dec 03, 2012 12:11 pm    Post subject: Reply with quote

MassimoM wrote:
Actually ZFS, even when built INSIDE the kernel, needs an initramfs.


Damn, that's what I was afraid of.
Back to top
View user's profile Send private message
ryao
Retired Dev
Retired Dev


Joined: 27 Feb 2012
Posts: 132

PostPosted: Mon Dec 03, 2012 2:10 pm    Post subject: Reply with quote

MassimoM wrote:
Actually ZFS, even when built INSIDE the kernel, needs an initramfs.
That initramfs can be used even for different kernels, as it does not need to contain modules (if ZFS is builtin), but it needs to contain ZFS utilities and some scripts.
I usually build my initramfs with dracut, but I'm sure that there are other ways more Gentoo-specific.


That is the following upstream issue:

https://github.com/zfsonlinux/zfs/issues/872

I plan to fix it when I find time, but there other issues that also need my attention.
Back to top
View user's profile Send private message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Mon Dec 03, 2012 2:38 pm    Post subject: Reply with quote

I built initramfs, and now boot stopped by dracut with message "dracut: FATAL: Don't know how to handle 'root=ZFS=dom/parent'"
Back to top
View user's profile Send private message
ryao
Retired Dev
Retired Dev


Joined: 27 Feb 2012
Posts: 132

PostPosted: Mon Dec 03, 2012 3:42 pm    Post subject: Reply with quote

droid-ororoid wrote:
I built initramfs, and now boot stopped by dracut with message "dracut: FATAL: Don't know how to handle 'root=ZFS=dom/parent'"


Upstream dracut lacks ZFS support. There is a dracut fork with ZFS support, but I am afraid that it is not in the best shape. You would be better off with genkernel. You can run genkernel all --no-clean --makeopts=-j7 --zfs --callback="emerge @module-rebuild" --bootloader=grub2 on most installations and it would just work.
Back to top
View user's profile Send private message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Mon Dec 03, 2012 4:13 pm    Post subject: Reply with quote

ryao wrote:
droid-ororoid wrote:
I built initramfs, and now boot stopped by dracut with message "dracut: FATAL: Don't know how to handle 'root=ZFS=dom/parent'"


Upstream dracut lacks ZFS support. There is a dracut fork with ZFS support, but I am afraid that it is not in the best shape. You would be better off with genkernel. You can run genkernel all --no-clean --makeopts=-j7 --zfs --callback="emerge @module-rebuild" --bootloader=grub2 on most installations and it would just work.


But standard genkernel from official tree haven't "zfs" use flag. Will it work with ZFS?
Back to top
View user's profile Send private message
Gentoo64
n00b
n00b


Joined: 21 Oct 2011
Posts: 52
Location: ::

PostPosted: Mon Dec 03, 2012 4:41 pm    Post subject: Reply with quote

I got mine working by compiing the kernel normally, add ZFS=YES to /etc/genkernel.conf then run genkernel initramfs., and made a custom grub entry.
Back to top
View user's profile Send private message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Mon Dec 03, 2012 4:48 pm    Post subject: Reply with quote

ryao, thank you, it's working with standard genkernel from portage tree. But I have a new problem: initramfs cannot import "dom" pool ("cannot import '': no such pool available"). Why?
Back to top
View user's profile Send private message
188562
Apprentice
Apprentice


Joined: 22 Jun 2008
Posts: 186

PostPosted: Tue Dec 04, 2012 10:44 am    Post subject: Reply with quote

ryao wrote:
That is the following upstream issue:

https://github.com/zfsonlinux/zfs/issues/872

I plan to fix it when I find time, but there other issues that also need my attention.


Hell, I more and more like zfs.
Back to top
View user's profile Send private message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Tue Dec 04, 2012 12:19 pm    Post subject: Reply with quote

init_6, do you use zfs?
Back to top
View user's profile Send private message
188562
Apprentice
Apprentice


Joined: 22 Jun 2008
Posts: 186

PostPosted: Tue Dec 04, 2012 1:26 pm    Post subject: Reply with quote

droid-ororoid wrote:
init_6, do you use zfs?


Now i test it only as module and not on root fs.
Back to top
View user's profile Send private message
droid-ororoid
n00b
n00b


Joined: 03 Dec 2012
Posts: 8

PostPosted: Tue Dec 04, 2012 3:05 pm    Post subject: Reply with quote

Ok, I import my "dom" pool in busybox manually, and now system try to boot, but cgroup doesn't mount. Hereupon, can't be started sysfs, NetworkManager and other daemons.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum