Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 469454

Summary: ./bin/fuser: Can't create 'bin/fuser'
Product: Gentoo/Alt Reporter: prokennexusa <prokennexusa>
Component: FreeBSDAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: aballier, chithanh, nigoro.dev, prokennexusa
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: sample patch for freebsd-ubin-9.2_rc3.ebuild

Description prokennexusa 2013-05-11 14:47:27 UTC
When I download the FreeBSD Gentoo AMD64 Stage 3 Version 9.1:

fetch http://dev.gentoo.org/~aballier/fbsd9.1/amd64/stage3-amd64-freebsd-9.1.tar.bz2

Then I do the following either through SSH or locally:

tar xjpf stage3-*.tar.bz2 -C /mnt

I end up with the following error:

./bin/fuser: Can't create 'bin/fuser'
tar: Error exit delayed from previous errors.

This error can be reproduced in the ZFS or the UFS2 file systems. Lately I have been deploying FreeBSD Gentoo on the ZFS File system.
Comment 1 prokennexusa 2013-05-12 01:51:37 UTC
I am looking deeper, this appers to be related to the ZFS File system ONLY. I was able to clear the error on a second FreeBSD Gentoo workstation by running a fsck on the UFS2 file system prior to deploying Stage 3.

I will update the Bug report as I determin the actual cause.
Comment 2 Alexis Ballier gentoo-dev 2013-08-27 19:59:24 UTC
(In reply to prokennexusa from comment #1)
> I am looking deeper, this appers to be related to the ZFS File system ONLY.
> I was able to clear the error on a second FreeBSD Gentoo workstation by
> running a fsck on the UFS2 file system prior to deploying Stage 3.
> 
> I will update the Bug report as I determin the actual cause.

no more info -> closing as needinfo
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-08-27 21:02:04 UTC
What more info do you need?
Comment 4 Alexis Ballier gentoo-dev 2013-08-27 21:07:09 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #3)
> What more info do you need?

sounds like a fs error, maybe a disk problem, rather than anything we can do something about
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-08-27 21:36:37 UTC
The problem is reproducible in QEMU too. No errors are written to dmesg.
Comment 6 Alexis Ballier gentoo-dev 2013-08-27 21:56:50 UTC
what kernel / boot cd ? what fs ? what fs options ? are soft updates enabled ?
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-08-27 22:00:28 UTC
This happens when following https://wiki.gentoo.org/wiki/Gentoo_FreeBSD instructions with ZFS in the step "tar xjpf stage3-*.tar.bz2 -C /mnt"

Boot CD used is FreeBSD-9.1-RELEASE-amd64-bootonly.iso
Comment 8 Alexis Ballier gentoo-dev 2013-08-27 22:08:55 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #7)
> This happens when following https://wiki.gentoo.org/wiki/Gentoo_FreeBSD
> instructions with ZFS in the step "tar xjpf stage3-*.tar.bz2 -C /mnt"
> 
> Boot CD used is FreeBSD-9.1-RELEASE-amd64-bootonly.iso

probably something for Yuta to have a look at then
Comment 9 Yuta SATOH 2013-08-28 11:21:52 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #7)
> This happens when following https://wiki.gentoo.org/wiki/Gentoo_FreeBSD
> instructions with ZFS in the step "tar xjpf stage3-*.tar.bz2 -C /mnt"
> 
> Boot CD used is FreeBSD-9.1-RELEASE-amd64-bootonly.iso

Thanks for info.
The slightly old ZFS part, so I wrote when Gentoo/FreeBSD 8.2.

Currently, bin/fuser is hard link.
So, you can not create it on different partition...

root@:/mnt # tar tjpvf stage3-amd64-freebsd-9.1.tar.bz2 bin/fuser
hr-xr-xr-x  0 root   wheel       0 May 27 04:04 ./bin/fuser link to ./usr/bin/fstat

root@:/mnt # ln usr/bin/fstat bin/fuser
ln: bin/fuser: Cross-device link


Create symlink /usr/bin/fstat to /bin/fuser, you will be able to continue installing.
root@:/mnt # ln -s /usr/bin/fstat /mnt/bin/fuser
Comment 10 Yuta SATOH 2013-08-28 11:23:10 UTC
Created attachment 357234 [details, diff]
sample patch for freebsd-ubin-9.2_rc3.ebuild

split partition support, like /, /usr, /var, /tmp, /home.

sys-freebsd/freebsd-ubin-9.2_rc3 still have this problem.
This patch create a symbolic link instead.

Before applying the patch)
# ls -li /bin/fuser /usr/bin/fuser /usr/bin/fstat
 2458372 -r-xr-xr-x  2 root  wheel  18480 Aug 27 22:49 /bin/fuser
 2458372 -r-xr-xr-x  2 root  wheel  18480 Aug 27 22:49 /usr/bin/fstat
10891785 lrwxrwxrwx  1 root  wheel     10 Aug 27 22:49 /usr/bin/fuser -> /bin/fuser

After applying the patch)
# ls -li /bin/fuser /usr/bin/fuser /usr/bin/fstat
 2458372 lrwxrwxrwx  1 root  wheel     14 Aug 28 20:15 /bin/fuser -> /usr/bin/fuser
10891783 -r-xr-xr-x  2 root  wheel  18480 Aug 28 20:15 /usr/bin/fstat
10891783 -r-xr-xr-x  2 root  wheel  18480 Aug 28 20:15 /usr/bin/fuser

A better way, a better patch, very welcome.
Comment 11 Alexis Ballier gentoo-dev 2013-08-28 15:22:13 UTC
we might very well leave fuser in /usr/bin then; iirc openrc needed it but I'm not sure if it hardcodes the path
Comment 12 Alexis Ballier gentoo-dev 2013-08-28 15:33:31 UTC
fixed in 9.2_rc3; fbsd-9.2 stages will be fixed, meanwhle I think it could be documented on the wiki