Tiny Core Linux
Tiny Core Extensions => TCE Talk => Extension requests => Topic started by: MSumulong on February 25, 2014, 02:00:03 PM
-
I was wondering if someone can update module-init-tools from the 4.x archive so that it can override the default busybox link in /sbin/modprobe.
I wind up having to do the following:
sudo rm /sbin/modprobe
sudo ln -s /usr/local/sbin/modprobe /sbin/modprobe
The VirtualBox Guest Additions looks for modprobe in /sbin and it uses the -c parameter which doesn't exist in the busybox version.
-
Try adding an alias for use by your VirtualBox Guest Additions.
alias /sbin/modprobe='/usr/local/bin/modprobe'
-
I think it should be (bin -> sbin):
alias /sbin/modprobe='/usr/local/sbin/modprobe'
But when I run VBoxLinuxAdditions.run, it is still running the busybox version... I guess alias doesn't work within shell scripts?
-
That alias works only for ash, but bash does not allow a path in the alias name.
If you are using ash only, you could put the alias in ~/.ashrc.
[ -f /usr/local/sbin/modprobe ] && alias /sbin/modprobe='/usr/local/sbin/modprobe'
-
Sounds very similar with a most recently reported and fixed bug:
https://www.virtualbox.org/ticket/12713
Consider submitting a respective bug report.
-
That alias works only for ash, but bash does not allow a path in the alias name.
If you are using ash only, you could put the alias in ~/.ashrc.
[ -f /usr/local/sbin/modprobe ] && alias /sbin/modprobe='/usr/local/sbin/modprobe'
I've added this line to my ~/.ashrc but its still complaining:
/sbin/modprobe: invalid option -- 'c'
-
Are you sure it is not just a $PATH issue?
Are you using virtualbox-ose-additions.tcz ?
-
I'm not sure if its a $PATH issue. I'll have to look into that.
No, I'm not using the virtualbox-ose-additions.tcz. I'm using the virtual CD that is supplied by VirtualBox and running /mnt/sr0/VBoxLinuxAdditions.run to rebuild the guest additions myself.
-
Please post output of:
type modprobe
-
Please post output of:
type modprobe
At what point? After installing module-init-tools from 4.x and before adding [ -f /usr/local/sbin/modprobe ] && alias /sbin/modprobe='/usr/local/sbin/modprobe'? or after?
-
Both ;)
-
Both ;)
Before installing module-init-tools.tcz:
modprobe is /sbin/modprobe
After installing module-init-tools.tcz:
modprobe is a tracked alias for /sbin/modprobe
After editing the .ashrc:
modprobe is a tracked alias for /sbin/modprobe
After typing "alias /sbin/modprobe='/usr/local/sbin/modprobe'":
modprobe is /usr/local/sbin/modprobe
-
After installing module-init-tools.tcz:
modprobe is a tracked alias for /sbin/modprobe
Try:
hash -r
type modprobe
instead.
After editing the .ashrc:
modprobe is a tracked alias for /sbin/modprobe
Editing .ashrc will only affect shells started after that.
-
After installing module-init-tools.tcz:
modprobe is a tracked alias for /sbin/modprobe
Try:
hash -r
type modprobe
instead.
After editing the .ashrc:
modprobe is a tracked alias for /sbin/modprobe
Editing .ashrc will only affect shells started after that.
Before installing module-init-tools.tcz:
hash -r; type modprobe
modprobe is /sbin/modprobe
After installing module-init-tools.tcz:
hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe
After adding alias:
hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe
-
Before installing module-init-tools.tcz:
hash -r; type modprobe
modprobe is /sbin/modprobe
After installing module-init-tools.tcz:
hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe
In given context this implies that your PATH and extension both seem to work fine as expected, but that there is a hardcoding bug in the software you try to run as already hinted in Reply #4.
After adding alias:
hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe
Ah, yes, this is expected, what would be relevant instead would be:
type /sbin/modprobe
-
Before installing module-init-tools.tcz:
hash -r; type modprobe
modprobe is /sbin/modprobe
After installing module-init-tools.tcz:
hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe
In given context this implies that your PATH and extension both seem to work fine as expected, but that there is a hardcoding bug in the software you try to run as already hinted in Reply #4.
After adding alias:
hash -r; type modprobe
modprobe is /usr/local/sbin/modprobe
Ah, yes, this is expected, what would be relevant instead would be:
type /sbin/modprobe
type /sbin/modprobe gives me /sbin/modprobe is /sbin/modprobe
I'll go ahead and submit a request to not have modprobe hard-coded.
-
tc@box:~$ type /sbin/modprobe
/sbin/modprobe is /sbin/modprobe
tc@box:~$ alias '/sbin/modprobe'='/usr/local/sbin/modprobe'
tc@box:~$ type /sbin/modprobe
/sbin/modprobe is an alias for /usr/local/sbin/modprobe
tc@box:~$
But then, according to:
http://www.computerworld.com/s/article/9233435/How_to_use_aliases_in_Linux_shell_commands
Aliases are disabled for noninteractive shells (that is, shell scripts).
So I guess in case in question alias might be sort of a moot point.
-
tc@box:~$ type /sbin/modprobe
/sbin/modprobe is /sbin/modprobe
tc@box:~$ alias '/sbin/modprobe'='/usr/local/sbin/modprobe'
tc@box:~$ type /sbin/modprobe
/sbin/modprobe is an alias for /usr/local/sbin/modprobe
tc@box:~$
But then, according to:
http://www.computerworld.com/s/article/9233435/How_to_use_aliases_in_Linux_shell_commands
Aliases are disabled for noninteractive shells (that is, shell scripts).
So I guess in case in question alias might be sort of a moot point.
Yea, I never had any success using the alias commands... VBoxLinuxGuestAdditions.run always tried to run the busybox version of modprobe.