Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Booting fail from a ZFS pool on external USB drive.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
uittie
n00b
n00b


Joined: 19 Feb 2017
Posts: 4

PostPosted: Sun Feb 19, 2017 5:33 am    Post subject: [SOLVED]Booting fail from a ZFS pool on external USB drive. Reply with quote

Hi. I am installing gentoo on an external USB drive with root on ZFS. Zpool import fail because USB drive loading is slow when booting. What should I do?

The following images are errors during startup
http://uittie.com/img/fail1.jpg
http://uittie.com/img/fail2.jpg


Last edited by uittie on Mon Feb 20, 2017 3:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sun Feb 19, 2017 1:41 pm    Post subject: Reply with quote

there is a kernel parameter, to delay booting and give the drive time to spin up. maybe it was called rootdelay...
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Feb 19, 2017 3:38 pm    Post subject: Reply with quote

uittie ...

you can pass 'rootwait', or 'rootdelay=<N>' (where '<N>' is a number in seconds).

HTH & best ... khay
Back to top
View user's profile Send private message
uittie
n00b
n00b


Joined: 19 Feb 2017
Posts: 4

PostPosted: Sun Feb 19, 2017 4:21 pm    Post subject: Reply with quote

Thank you :D
The setting of my grub.cfg is as follows. Also, I tried rootwait, but I will not solve it.

Code:
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8fd96561dce8aff0' {
   load_video
   insmod gzio
   insmod part_gpt
   insmod ext2
   set root='hd0,gpt2'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  ab737af2-9437-40a2-93e9-cd03a0a92287
   else
     search --no-floppy --fs-uuid --set=root ab737af2-9437-40a2-93e9-cd03a0a92287
   fi
   echo   'Loading Linux x86_64-4.9.6-gentoo-r1170219-015841 ...'
   linux   /kernel-genkernel-x86_64-4.9.6-gentoo-r1170219-015841 root=ZFS=rpool/ROOT/default ro rootdelay=90
   echo   'Loading initial ramdisk ...'
   initrd   /initramfs-genkernel-x86_64-4.9.6-gentoo-r1170219-015841
}


I want to lengthen the waiting time until "zpool import", but I do not know where that setting is.
The problem at the link below is similar to my problem. But it was not applicable to my environment. :cry:
https://github.com/zfsonlinux/pkg-zfs/issues/108
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Feb 19, 2017 5:16 pm    Post subject: Reply with quote

uittie wrote:
[...] I want to lengthen the waiting time until "zpool import"

uittie ... if 'rootwait' doesn't succeed then the issue isn't due to the disk not being available, 'rootwait' will wait indefinitely. I'm not sure genkernel supports ZFS, or what an initramfs needs to do in order to bring the zpool online, but I suspect the issue is there rather than the wait period.

best ... khay
Back to top
View user's profile Send private message
uittie
n00b
n00b


Joined: 19 Feb 2017
Posts: 4

PostPosted: Mon Feb 20, 2017 8:11 am    Post subject: Reply with quote

khayymm

I think so, too. The problem is the wait time of zpool import, I think that it is not a matter of the wait time of root mount.

Thanks
Back to top
View user's profile Send private message
uittie
n00b
n00b


Joined: 19 Feb 2017
Posts: 4

PostPosted: Mon Feb 20, 2017 2:59 pm    Post subject: Reply with quote

I solved this problem!
When I expanded initramfs and looked at init, I noticed that the sdelay command was executed before "zfs_start_volumes".
In other words, it solved by setting kernel parameter "scandelay".
I am grateful Roman_Gruber and khayyam for helping us solve this problem.

Code:

menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8fd96561dce8aff0' {
   load_video
   insmod gzio
   insmod part_gpt
   insmod ext2
   set root='hd0,gpt2'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  ab737af2-9437-40a2-93e9-cd03a0a92287
   else
     search --no-floppy --fs-uuid --set=root ab737af2-9437-40a2-93e9-cd03a0a92287
   fi
   echo   'Loading Linux x86_64-4.9.6-gentoo-r1170219-015841 ...'
   linux   /kernel-genkernel-x86_64-4.9.6-gentoo-r1170219-015841 root=ZFS=rpool/ROOT/default ro scandelay=5
   echo   'Loading initial ramdisk ..
   initrd   /initramfs-genkernel-x86_64-4.9.6-gentoo-r1170219-015841
}
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5839

PostPosted: Mon Feb 20, 2017 10:47 pm    Post subject: Reply with quote

khayyam wrote:
I'm not sure genkernel supports ZFS


Yes it does. I forget if you need one of the 3.5.x.x versions though. I use the 9999 personally.
Back to top
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 535

PostPosted: Tue Feb 21, 2017 1:30 pm    Post subject: Reply with quote

bunder wrote:
khayyam wrote:
I'm not sure genkernel supports ZFS


Yes it does. I forget if you need one of the 3.5.x.x versions though. I use the 9999 personally.


Stable genkernel supports it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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