Created attachment 455190 [details, diff] Add md5sum to the list of common scripts Currently md5sum is installed to /usr/bin. This causes the following problem with split /usr partitions: /lib/rc/sh/init.sh from sys-apps/openrc uses the following block to confirm that /proc is already mounted: -------- 22 mountproc=true 23 f=/proc/self/environ 24 if [ -e $f ]; then 25 if [ "$(VAR=a md5sum $f)" = "$(VAR=b md5sum $f)" ]; then 26 eerror "You have cruft in /proc that should be deleted" 27 else 28 einfo "/proc is already mounted" 29 mountproc=false 30 fi 31 fi 32 unset f -------- At that time, a split /usr is not yet mounted and the check fails and states that the user has cruft in /proc that should be deleted. This is a false positive. Line 25 simply compares the "command not found" error with itself. $mountproc is then left at being 'true' and the attempt to mount /proc generates a second error message. Please add md5sum to the list of common scripts like shown in the patch attached. This fixes the false positive and $mountproc is set to false like it should.
Does this happen if /usr is mounted using an initramfs?
(In reply to nvinson234 from comment #1) > Does this happen if /usr is mounted using an initramfs? Odds are likely an initramfs would resolve this (I believe I saw it specifically mentioned in an error message when my dev box crashed and rebooted). That said, an initramfs shouldn't be needed in certain, simple bootup situations that use a split /usr setup. The proposed change doesn't look like it will be of any significant impact. All of its needed libraries are already in /lib{32,64}, so the only change is just the location of the binary itself.
(In reply to Joshua Kinard from comment #2) we already decided that if you want to do a split-/usr, you have to take care of mounting it ahead of time. if that means you use an initramfs, then that's up to you.
(In reply to SpanKY from comment #3) > (In reply to Joshua Kinard from comment #2) > > we already decided that if you want to do a split-/usr, you have to take > care of mounting it ahead of time. if that means you use an initramfs, then > that's up to you. It appears we're already hacking around the split-/usr issue by moving several "critical binaries" into /bin in the coreutils ebuild. Adding one more script to that specific list doesn't seem like a major issue to me. Unless we want to just drop this mechanism entirely and force the issue.
(In reply to Joshua Kinard from comment #4) yes, we have a number of packages that have historically done this. but we also have a number of bugs open to request more. we've put a halt on this for now and haven't changed the status quo. i should just refresh & push my USE=sep-usr patchset.
(In reply to SpanKY from comment #5) > (In reply to Joshua Kinard from comment #4) > > yes, we have a number of packages that have historically done this. but we > also have a number of bugs open to request more. we've put a halt on this > for now and haven't changed the status quo. > > i should just refresh & push my USE=sep-usr patchset. Oddly enough, my sep-/usr setups all work fine without /ginit or other sep-usr bits in busybox. This one binary is the only non-fatal message I see on any of the systems I have at home.
(In reply to nvinson234 from comment #1) > Does this happen if /usr is mounted using an initramfs? Sorry for the late reply. Although an initramfs might resolve the issue, there is a specific use case, and I do not think that I am alone with it: zfs However, there might be more an initramfs can not resolve, like a ro nfs share used for /usr.
(In reply to Joshua Kinard from comment #6) then you got lucky. that isn't a guarantee. (In reply to Sven Eden from comment #7) initramfs can do zfs
(In reply to SpanKY from comment #8) > > initramfs can do zfs Yes. My system is almost fully on zfs. But initramfs can not pre-mount /usr from another zfs drive. Root / is gpool/ROOT/system User /usr is gpool/ROOT/usr Grub starts the kernel with "root=ZFS=gpool/ROOT/system ro dozfs" and uses an initramfs created using "genkernel --zfs --no-udev initramfs" If there is an option to pre-mount other zfs drives,too, I'd appreciate a hint, but I daresay this is something to discuss in the forums. ;-)
(In reply to Sven Eden from comment #9) > (In reply to SpanKY from comment #8) > > > > initramfs can do zfs > > Yes. My system is almost fully on zfs. But initramfs can not pre-mount /usr > from another zfs drive. I have my doubts about that. If anything, I'd be more inclined to believe an initramfs *can* mount /usr from another zfs drive. > > Root / is gpool/ROOT/system > User /usr is gpool/ROOT/usr > > Grub starts the kernel with > "root=ZFS=gpool/ROOT/system ro dozfs" > and uses an initramfs created using > "genkernel --zfs --no-udev initramfs" > > If there is an option to pre-mount other zfs drives,too, I'd appreciate a > hint, but I daresay this is something to discuss in the forums. ;-) That doesn't prove you can't do it with initramfs. It does, however, suggest you cannot do it with genkernel. It's quite possible you'd have to roll your own initramfs instead of using a tool like genkernel or dracut to generate it for you.
(In reply to nvinson234 from comment #10) > (In reply to Sven Eden from comment #9) > > (In reply to SpanKY from comment #8) > > > > > > initramfs can do zfs > > > > Yes. My system is almost fully on zfs. But initramfs can not pre-mount /usr > > from another zfs drive. > > I have my doubts about that. If anything, I'd be more inclined to believe > an initramfs *can* mount /usr from another zfs drive. I am so sorry, I thought I had closed this already! Of course you can do it with genkernel. Just add /usr to /etc/initramfs.mounts and be happy.