How to Use Samba-TNG Server in Puppy

How to do things, solutions, recipes, tutorials
Message
Author
SBP
Posts: 43
Joined: Wed 06 Apr 2011, 15:45

#61 Post by SBP »

No, I can't see any boot dir.

I see the following dir:
archive
automake
bin
dev
etc
home
initrd
lib
lost+found
mnt
opt
proc
root
sbin
selinux
sys
tmp
usr
var

and these files
boot.msg
extlinux.conf
fskme.flg
help2.msg
help.msg
initrd.gz
Idlinux.sys
logo.16
lupu_525.sfs
vmlinux

Thats all, and show hidden files are marked

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#62 Post by rcrsn51 »

Are you booting off your hard drive or a flash drive? It appears that your bootloader is extlinux, not GRUB. How did you install Puppy on this machine?

In any case, you need to add the "pfix=nox,fsck" in your extlinux.conf file. Please post its contents.

SBP
Posts: 43
Joined: Wed 06 Apr 2011, 15:45

#63 Post by SBP »

Thank you for your continued help.

I boot from a 500 mb Flash HDD (the computer is a thin client Siemens Futro S400).
As far as I remember I installed from a CD to the HDD.

This is the content of the file:

default puppy
display boot.msg
prompt 1
timeout 50

F1 boot.msg
F2 help.msg
F3 help2.msg

label puppy
kernel vmlinuz
append initrd=initrd.gz libata.dma=3 pmedia=ataflash pfix=copy

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#64 Post by rcrsn51 »

SBP wrote: append initrd=initrd.gz libata.dma=3 pmedia=ataflash pfix=copy
Change it to

Code: Select all

append initrd=initrd.gz libata.dma=3 pmedia=ataflash pfix=copy,nox,fsck

SBP
Posts: 43
Joined: Wed 06 Apr 2011, 15:45

#65 Post by SBP »

YES it is working

Thank you so much, it is starting fine without monitor, keyboard and mouse, and the drive is mounted and shared by your samba-tng.pet using the start script you provided (and I modified a bit).

Thank you, it was only yesterday I started using Puppy, and I must say that you have a very nice community, and very helpful.

Steen

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#66 Post by rcrsn51 »

Excellent. However, at some point, you will need to get back into Puppy to make changes. Just boot off your Live CD.

SBP
Posts: 43
Joined: Wed 06 Apr 2011, 15:45

#67 Post by SBP »

Actually I planned to use WinSCP from my windows computer to log into the Puppy, then remove pfix=nox,fsck once again, and reboot.

Do you think that this would be possible?

One last question - I have not been able to figure out how to power off my puppy using SSH commands.

I have tried:
wmpoweroff
poweroff
shutdown
halt ---- resulted in a freeze

so the only way is to pull the power, and I don't like to do it in this way. Do you have a solution, as my only way into puppy is through SSH client?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#68 Post by rcrsn51 »

SBP wrote:I have tried:
wmpoweroff
poweroff
shutdown
halt ---- resulted in a freeze
Here is what I think is happening.

1. You boot the server using pfix=nox.
2. To shut the server down at its own keyboard, you would use "poweroff".
3. This script runs two commands

Code: Select all

/etc/rc.d/rc.shutdown
busybox poweroff
4. Instead, you run "poweroff" from the client.
5. The first command drops the network connection, so the second command never executes.
6. The server is left running.

If you just type "busybox poweroff" at the client, the server shuts down, but somewhat ungracefully. However, the pfix=fsck on the next reboot seems to fix everything.

However, if you boot the server all the way to X, then run "wmpoweroff" from the client, everything shuts down gracefully. I don't know why.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#69 Post by 01micko »

However, if you boot the server all the way to X, then run "wmpoweroff" from the client, everything shuts down gracefully. I don't know why.
Yep, seems weird to me too :? . The "reboot" command would probably fail too.. I wonder?

As a rough work-around maybe you could install acpid? This should allow you to just press the power button and cleanly shut down.

http://distro.ibiblio.org/pub/linux/dis ... 100603.pet

That is the version I have in spup and it works well. Also works in lupu, I just tested from within X and had a clean shutdown, also tested outside of X by exiting to the prompt, hit the power button, if you have sound configured you hear 1 bark, then shutdown is clean.

HTH
Puppy Linux Blog - contact me for access

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#70 Post by rcrsn51 »

01micko wrote:As a rough work-around maybe you could install acpid? This should allow you to just press the power button and cleanly shut down
That works.

1. Boot the server using pfix=nox.

2. Login using ssh.

3. Type "acpid". Normally, this gets loaded from /root/Startup.
Or maybe "/root/Startup/acpi" would be better.

4. Hit the power button.

5. Server shuts down gracefully.

Thanks.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#71 Post by rcrsn51 »

Or better yet, open /etc/rc.d/rc.sshd, go to Line 70 and change

Code: Select all

stop
;;
to

Code: Select all

#stop
;;
Now the poweroff and reboot commands work correctly from the ssh client.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#72 Post by 01micko »

Yes but doesn't that cause ssh to turn off uncleanly? I can see that acpid is not the correct solution.

On some thought maybe some hacking is involved.

Say, in the 'poweroff' script send a flag to /tmp before rc.shutdown runs, (of course this is very situation specific, so "if ssh is running then send flag to /tmp") then in the stop) case in /etc/rc.d/rc,sshd have a test for the flag and then stop, then run busybox poweroff? Or are we chasing our tails.. as I guess once the "stop" sig is sent then that's it!

Perplexing.

Ok, that silly idea probably wont work but pizzasgood has some ideas here
Puppy Linux Blog - contact me for access

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#73 Post by rcrsn51 »

Code: Select all

nohup poweroff &
That works! The server shuts down cleanly. No other changes are required.

This works too.

Code: Select all

nohup reboot &

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#74 Post by 8-bit »

I downloaded and installed the pet and as per instructions, opened a terminal and typed "samba-start"
I got a command not found.
I thought this thing was supposed to work.
I also have tried it with a fresh install of lupu 520.
So I guess you just can call me Stupid from now on.

I say this because I had also tried Gmartin's instructions on a Samba package and failed there too.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#75 Post by rcrsn51 »

8-bit wrote:I thought this thing was supposed to work.
WFM. I just did a fresh frugal install of Lupu, downloaded and installed the samba-tng-rcrsn-0.5-rc1.pet and typed "samba-start". It started.

Did you download the right package?

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#76 Post by 8-bit »

It is just Stupid me returning your query.
I went with the wrong approach and seeing two -tng files and assuming wrongly that the one with a six in it was the latest version, I did not have five downloaded.
It did work.
I could see the specified directory on a WinXP networked PC.
I guess I can blame it on all the pain pills I am taking for my progressively worse degenerative authritus.

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#77 Post by p310don »

Hi,

I have been using Samba-TNG for a while now just typing samba-start in terminal when I want to share stuff, but have only recently installed the autostart pet.

Strangely, samba seems to start, and if I search the network, I can see this machine, but there are no shares. I can only see them after a restart, ie samba-stop then samba-start.

Not a biggy, but any solutions would be appreciated

Thanks
Last edited by p310don on Thu 16 Jun 2011, 15:08, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#78 Post by rcrsn51 »

On what device are the shares? An internal hard drive? A USB drive?

It sounds like the target partition has not been mounted yet when Samba auto-starts.

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#79 Post by p310don »

The shares are a bunch of internal hard drives that automount with start mount.

Included in the shares is the drive with Puppy's save file and puppy on it, which is of course mounted upon boot, but it doesn't share either.

Can the autostart be set to include a time delay after finding a live network, say ten seconds? How would I do that if I could to test if that's it?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#80 Post by rcrsn51 »

p310don wrote:The shares are a bunch of internal hard drives that automount with start mount.

Included in the shares is the drive with Puppy's save file and puppy on it, which is of course mounted upon boot, but it doesn't share either.

Can the autostart be set to include a time delay after finding a live network, say ten seconds? How would I do that if I could to test if that's it?
Samba auto-start puts a script in your /root/Startup folder. You could add a sleep command at the top of the script.

Code: Select all

#!/bin/sh
sleep 10
while [ 1 ]; do
...

Post Reply