Tiny Core Linux
General TC => General TC Talk => Topic started by: skeletonpass on June 06, 2011, 09:05:31 PM
-
I love tinycore, it is exactly what I needed, I wanted a lightweight linux to run my bittorrent app - Transmission (thank you guys)
however...
I am still a newb when it comes to linux and therefore I need help.
I am trying to mount my NAS to TC so that when I download with Transmission it goes to my NAS.
I have mounted using the following command.
sudo mount -t cifs //192.168.0.10/media/BitTorrent /mnt/BitTorrent -o user=admin,pass=*****
this mount command works (after I installed samba3)
however...
I am unable to write to this directory, I can create files/folders using the following commands "sudo touch /mnt/BitTorrent/test.log & sudo mkdir /mnt/BitTorrent/test"
but Transmission does not use the sudo command to create files/folders. remember I am a newb and need to take baby steps, please if you can help me, give me a very detailed instructions.
Thank You
-
Hi skeletonpass
If all you want to do is access the NAS, and not share files from your lightweight TC setup, you don't
need to install a heavyweight application like Samba3. Instead of Samba3 I would recommend using
filesystems-2.6.33.3-tinycore.tcz
and
cifs-utils.tcz
It looks like it may be a permissions problem. You are mounting as user admin but in the TC environment
you are running as user tc. In other words, without the sudo, it is user tc trying to write to the NAS. I run
my server with minimal security, simple file sharing and guest access. I allow access by local machines
and block access by the router. This way I don't have to deal with users and permissions.
Anyway, just a shot in the dark, you could try one of the following
sudo mount -t cifs //192.168.0.10/media/BitTorrent /mnt/BitTorrent -o user=admin,pass=***** noperm
or
sudo mount -t cifs //192.168.0.10/media/BitTorrent /mnt/BitTorrent -o guest
and see if it helps.
-
Hey Rich
Awesome, I will try the cifs-utils.tcz
I will try the mount commands when I get home and let you know how I go.
This makes sense.
Thank You
-
Hi skeletonpass
Just as a follow up, all you need to install is cifs-utils.tcz. It will pull in filesystems-2.6.33.3-tinycore.tcz
automatically since it's a dependency.
EDIT: For comparison, Samba3 is about 29MB while cifs-utils is about 2.3MB.
-
Whilst I fully agree with the advice provided by Rich I'd like to point out that in my experience it is even enough to just install the 'filesystems-2.6.33.3-tinycore.tcz' extension. I've just done a short re-test with a Win2k host (using both FAT32 and NTFS shares) to confirm what I believed to be correct.
Furthermore for me the '-o noperm,user=WIN_USER,pass=WIN_PW' CIFS parameter were required whilst '-o guest' turned out to be not sufficient (from a permissions point of view). But your NAS might be more tolerant in this regard.
To get a better understanding of the available parameter I'd suggest to query the man-page (http://www.samba.org/samba/docs/man/manpages-3/mount.cifs.8.html) (the one over at linux.die.net is too outdated, even though it's likely to show up tops when searching with google).
-
Hi maro
You are correct, the filesystems extension is sufficient. However, the syntax is now mount -t auto or
possibly just mount, although I have not tried the latter. If you use mount -t cifs it will look for the
mount.cifs helper and fail if cifs-utils.tcz is not installed. Either way will work, you just have to be aware
of the slight syntax differences.
The reason I can get away with guest is because I set guest ok=yes, security=share, and
guest account=nobody.
-
tried - filesystems-2.6.33.3-tinycore.tcz (didnt work, kept saying 'no such device or address')
tried - cifs-utils.tcz (worked)
mounted as Rich posted
sudo mount -t cifs //192.168.0.10/media/BitTorrent /mnt/BitTorrent -o noperm,user=admin,pass=*****
worked!
Thank You.
-
everything is working, however when I reboot, I can no longer access transmission from Terminal
I have followed the guide to installing TC to HDD http://distro.ibiblio.org/tinycorelinux/install.html
and I have installed Transmission
I usually just type in "transmission-daemon -f" and it works until I reboot, this file does not appear in my directory once I reboot.
Can someone help me? I have tried re-installing everything and doing a backup/restore, this didn't work.
-
I have figured it out, I just ran 'tce-load -i transmission.tcz' and it installed everything (without overwriting the settings.json)
great! ;D
now when I reboot, how do I get it to automatically do this for me? or is there a better way? (not sure running this command on boot is the proper solution)
-
If you read the wiki all will be explained..
-
the wiki is huge, I wouldn't know where to begin. remember I'm a newb and it would take me a whole year to understand a fraction of that, I only need a very simple setup, please help.
-
Have a look at the onboot part in http://wiki.tinycorelinux.net/wiki:install_apps.
Since you have transmission already downloaded to your /tce folder, you can use Apps Audit to set it "onboot"
-
aweomse, thank heaps, now when I reboot my computer the apps load on boot 'file-utils.tcz, transmission.tcz, openssh'
but
how do I get the applications to auto-start when I get into tinycore.
for 'file-util.tcz' i need to run the command - "sudo mount -t cifs //192.168.0.10/media/BitTorrent /mnt/BitTorrent -o noperm,user=admin,pass=*****"
for 'transmission.tcz' i need to run the command - "sudo transmission-daemon -f"
for 'openssh.tcz' i need to run the commands:
"sudo cp /usr/local/etc/ssh/ssh_config.example ssh_config"
"sudo cp /usr/local/etc/ssh/sshd_config.example sshd_config"
"sudo /usr/local/etc/init.d/openssh start"
-
Hi skeletonpass
Open the file /opt/bootlocal.sh and enter your startup commands there.
-
the wiki is huge, I wouldn't know where to begin. remember I'm a newb and it would take me a whole year to understand a fraction of that, I only need a very simple setup, please help.
There is a search function...
-
Thank you once again Rich, this is now working perfectly.
it's loading all my scripts.
when I reboot it doesn't remember the root password I set. is there something im missing?
when I boot into tinycore I use the command "sudo passwd root" - is there a way for tinycore to remember the password I set?
-
http://forum.tinycorelinux.net/index.php?topic=7503.0
found it ;)
-
oh oh, I got a problem.
looks like my auto login scripts arent working.
I noticed for a brief moment before tinycore loaded there was a CIFS error.
when the system loaded I noticed my script
"sudo mount -t cifs //192.168.0.10/media/BitTorrent /mnt/BitTorrent -o noperm,user=admin,pass=*****" didnt activate because it's not visible when I type mount"
however it works if I type it manually after the system has booted. something about the /opt/bootlocal.sh isnt doing this properly.
&
"sudo transmission-daemon -f" activated because when I type 'ps -a' I can see it there, but I cannot access the web ui. however if I kill that process and type "sudo transmission-daemon -f" after the system has booted it works.
it's as if both these commands wont work in the bootlocal.sh, but will work when the system has already booted - Rich got any ideas?
-
/opt/bootlocal.sh is running as root (so avoid sudo).
-
removed everything from /opt/bootlocal.sh so that I can work out what is going on.
I have removed sudo and used the following commands
"/bin/mkdir /mnt/BitTorrent"
"/bin/mount -t cifs //192.168.0.10/media/BitTorrent /mnt/BitTorrent -o noperm,user=admin,pass=*****"
I read somewhere on the forum to try /bin/command, and for someone it worked, unfortunately if I can't get a simple mount to work in bootlocal.sh then I need to find another way.
both lines work when I type it in manually
mkdir works on boot
mount does not work on boot
-
Likely your network is not yet up at that point. Add a sleep before those commands, or perhaps a ping loop.
-
I have also tried adding the commands to /opt/bootsync.sh (no difference)
-
aha. you are correct.
I took a screenshot of the messages before it loaded tc and this is what I get.
mount error(101): Network is unreachable
I will try a sleep command.
-
excellent, I added a sleep 10 at the start of /opt/bootlocal.sh
-
ok, now that the mkdir and mount commands are working on /opt/bootlocal.sh
I need to get transmission-daemon working the same way.
when I put the command "transmission-daemon" into the /opt/bootlocal.sh it loads it because I can see it when I use the command ps -a
however this is the message I get when I try to access it via web
403: Forbidden
Unauthorized IP Address.
Either disable the IP address whitelist or add your address to it.
If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.
If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.
to fix this, I manually type "sudo kill ####" and then "transmission-daemon" this obviously defeats the purpose, however I do this so I know that the command is 100% working. what am I missing here?
-
and yes, whitelist is false - it's a simple restarting of the daemon that fixes it, maybe if there was a way to start and stop and start again in the /opt/bootlocal.sh
-
bump.
-
What does "transmission-daemon --help" show?
The reason I ask is that some daemons can be stopped by a command line switch - i.e. "-k" for kill. If this were the case then you could start, stop and re-start the daemon from bootlocal.sh
Another option would be to delete /var/run/transmission-daemon/*pid, if such a file exists, which would have the effect of killing the daemon.
-
Thanks Juanito
I will try this when I get home. I would like to think that I'm not the only one trying to start transmission from bootlocal.sh and having these issues.
-
No luck, there is no option to kill transmission-daemon other than finding out what the process number is... hmm.. maybe if we made a script to find the number and kill it so it can reload. (this is all presuming that the daemon can run before the os completely boots.
I'm experienced in writing batch scripts in windows but I do not know how to convert this to linux.
on a windows box I can do this.
for /f "skip=3 tokens=1,2" %a in ('tasklist /FI "IMAGENAME eq transmission.exe"') do (tskill %a && start transmission.exe)
so far on a linux box I can do this.
ps -a | grep transmission-daemon
-
Does "sudo killall transmission-daemon" kill the process, if so you could use that.
Ref: -p --pidfile pid-file
Save the daemon's process ID in pid-file
If you start the daemon using -p, you could perhaps stop it by deleting the pid.
Otherwise you could look if other distros made an init.d file to control transmission daemon that you could use/copy/modify