Linux - beginner advice please

Thanks to an earlier post from Badcam I have been introduced to the world of plug-computing.I have managed to ???hack??a Dockstar (Sheevaplug based) and get it running PlugApps Linux (based on Arch-Linux).Intention for this little box is to run as a file server , by connect an external USB drive to be a common store for the various Windows PCs around the house.I need to make sure that when the??server?? is rebooted or other USB devices are plugged/unplugged, that the external HDD consistently ???appears?? in the same place.Can someone please confirm, or comment on, the following approach:
??? Create a UDEV rule so that when the external disk is plugged in it will always have the same devicename
??? Create an fstab entry to make sure the devicename mounts to a consistent mountpoint
??? Create a SAMBA share that points to this mountpoint (or one of its subdirectories)
Bear with me if I??m totally on the wrong track or got the terminology all wrong, up until last week I couldn??t even spell Linux, it??s a steep learning curve.

geek_floydbloke, Mar 10, 11:09 am

You shouldn't need to mess around with Udev rules (unless you are familiar with them and want to).
Just mount the drive using an fstab entry.To make it easier you can use UUID values or even the Label of the filesystem you want to mount.Then edit samba.conf to share the folder your drive has been mounted on.

geek_cybertao, Mar 10, 11:36 am

Thanks cyber.

Simple is good so if I can leave UDEV alone I will.Safe to assume it will be plugged in on boot but my concern was about devicenames if it found another drive plugged in as well.UUID would get around this I guess.If I've done my googling correctly I can substitute the devicename with UUID in fstab.Any idea what would happen if the external drive was absent, would the server still boot.(There is no monitor port on the plug-server, all access is through ssh at the moment. Although a little hardware and cable mod should give me serial port access if I do break it).

geek_floydbloke, Mar 10, 12:11 pm

If the drive is absent, it will still carry on booting.However, the directory you made to mount the drive on will still exist and be shared by SAMBA.That folder would be shared and files could be saved to it, only to disappear (virtually, they would still physically exist) when the drive is mounted over the top of that directory.To avoid that you might like to make a folder on the drive and share that folder(s), rather than the 'raw' filesystem.
It isn't all that elegant, but simple.

geek_cybertao, Mar 10, 12:31 pm

Hmmm.....I've had invalid fstab entries cause the boot sequence to abort and be unrecoverable. Had to use a recovery disk to boot and edit fstab before the S would boot again. Be careful using it to setup swappable drives unless they'll always be there.

geek_smac, Mar 10, 12:56 pm

Just found another thread on this on the PlugApps forum.UDEV will automatically mount plugged drives as /media/somename.It seems in SAMBA I can simply share /media so that any drive plugged in is automatically shared and can be seen.Security is not really a concern at the moment.Given my lack of experience this could well be the simplest and safest way to go at the moment.Thanks for all the help.Back to work now, I'll play with this tonight.

geek_floydbloke, Mar 10, 1:22 pm

That's likely to be the root partition (/) entry.

geek_cybertao, Mar 10, 2:17 pm

Nope, mounting other partitions etc. If the line is invalid (ie define the file system incorrectly) then it hangs the boot, whereas you'd think it would just pass over that line.
If the source of an fstab mount point is missing, it just passes over it?

geek_smac, Mar 10, 2:20 pm

What distro?It must have had some fugly bootscripts.

geek_cybertao, Mar 10, 3:40 pm

Had abit of a play with fstab and the UUID without much luck after powercycling the box.After all that though, seems that UDEV does a pretty good job at mounting it to a point that has the name of the disk's volumelabel, including after a reboot.Sharing that in samba works well.It will be staying on 24x7 anyway so I'll just leave it as is, good enough for what I need it to do.

geek_floydbloke, Mar 10, 8:09 pm

Mint.

geek_smac, Mar 10, 9:54 pm

What Cyber suggested should be sufficient. Make a folder in /media Mount it.Make an entry in fstab and it should work (I used UUID, not label). I know nothing about UDEV and I'm not familiar with Arch either (to my regret). For my sheeva's it's always been the printenv variables I've dealt with, never UDEV. I found Samba a bit of a hassle, as I'd never tried it before, but once I got it working, it was rock solid.

What format type is the drive?

geek_badcam, Mar 10, 10:40 pm

Thanks Badcam, I had though that the drive spin-up time could be a factor.Where should I put the wait period (rc.conf?), I would expect that the fstab gets read pretty early in the boot-up sequence.

The drive is NTFS, which is probably not ideal.I'm a bit reluctant to go EXT2 (or higher) because I'd like to be able to plug it in to a Windows box if I complete eff things up and access the data.I guess FAT is an option, can I create FAT partitions from within Linux, with the little experimentation that I did (I've got an old external 60GB HDD I'm thrashing about with in my 'sandpit'), XP didn't give me the option. The disk 'for keeps' already has some data on it as well which I'd prefer to keep intact, although I could migrate off and restore after a re-format if needed.

geek_floydbloke, Mar 11, 9:00 am

Joining here is a must:

http://www.plugcomputer.org/plugforum/ Just search the forum and you'll find mention of the spin up issue. The only problem with this site, is that there's too much info. It's really hard to narrow down a perfect solution sometime. The HD spin up is a well known issue though. Also, try this:

http://www.plugcomputer.org/plugwiki/index.php/Main_Page

Especially the How Too's section:

http://www.plugcomputer.org/plugwiki/index.php/Category:HowTo and this:
http://computingplugs.com/index.php/Main_Page
This guy is also a great source for plug info:

http://www.cyrius.com/debian/kirkwood/sheevaplug/ I think this thread will have your answer:
http://plugcomputer.org/plugforum/index.php?topic=485.0

Take your time to read through this stuff. I's well worth it.

geek_badcam, Mar 11, 9:20 am

NTFS will be perfectly fine. I did that, when I first got my Sheeva, as I was also running Windows at the time. I found NFS hard to set up and Samba just worked. So, Samba it was. NFS is faster though for transfer rates, but I can stream720p movies to my media player using a Samba share and there's never an issue with lag.

geek_badcam, Mar 11, 9:25 am


Thanks for the links.I did actually sign up to that MB but never got Admin approval from them, maybe they don't like my hotmail address.Then drifted off to PlugApps.com for most of my info.

I'll go back and check out the forum you suggest

The Dockstar was made by Seagate.It has a Sheeva processorand is very closely linked to the Pogoplug.Downside is, it's only got 128MB RAM but on the plus side it has 3 (4 if you count the dock) USB ports.I'll only be running file and print (CUPS, my next challenge) and transmission so the RAM shouldn't be an issue hopefully, I've got a wee swapfile as well.I managed to find one locally for $70 incl. freight, probably wouldn't have got change from $170 odd if I'd ordered a Sheeva or Tonido from the US.

geek_floydbloke, Mar 11, 10:07 am

Thanks to an earlier post from Badcam I have been introduced to the world of plug-computing.I have managed to ???hack??a Dockstar (Sheevaplug based) and get it running PlugApps Linux (based on Arch-Linux).Intention for this little box is to run as a file server , by connect an external USB drive to be a common store for the various Windows PCs around the house.I need to make sure that when the??server?? is rebooted or other USB devices are plugged/unplugged, that the external HDD consistently ???appears?? in the same place.Can someone please confirm, or comment on, the following approach:
??? Create a UDEV rule so that when the external disk is plugged in, or the server reboots, it will always have the same devicename
??? Create an fstab entry to make sure the devicename mounts to a consistent mountpoint
??? Create a SAMBA share that points to this mountpoint (or one of its subdirectories)
Bear with me if I??m totally on the wrong track or got the terminology all wrong, up until last week I couldn??t even spell Linux, it??s a steep learning curve.

geek_floydbloke, Mar 11, 11:09 am

You shouldn't need to mess around with Udev rules (unless you are familiar with them and want to).However Udev might be best if you want to hot-plug the drive instead of assuming it is plugged in on bootup.
Just mount the drive using an fstab entry.To make it easier you can use UUID values or even the Label of the filesystem you want to mount.Then edit samba.conf to share the folder your drive has been mounted on.

geek_cybertao, Mar 11, 11:36 am

It's been so long since I joined, I can't remember how they handled new registrations. Are you sure they don't just send you an email, that you have to click on a link for activation? Maybe it went into your Junk/Spam Folder?

geek_badcam, Mar 11, 11:49 am

Thanks cyber.

Simple is good so if I can leave UDEV alone I will.Safe to assume it will be plugged in on boot but my concern was about devicenames if it found another drive plugged in as well.UUID would get around this I guess.If I've done my googling correctly I can substitute the devicename with UUID in fstab.Any idea what would happen if the external drive was absent, would the server still boot.(There is no monitor port on the plug-server, all access is through ssh at the moment. Although a little hardware and cable mod should give me serial port access if I do break it).

geek_floydbloke, Mar 11, 12:11 pm

If the drive is absent, it will still carry on booting.However, the directory you made to mount the drive on will still exist and be shared by SAMBA.That folder would be shared and files could be saved to it, only to disappear (virtually, they would still physically exist) when the drive is mounted over the top of that directory.To avoid that you might like to make a folder on the drive and share that folder(s), rather than the 'raw' filesystem.
It isn't all that elegant, but simple.

geek_cybertao, Mar 11, 12:31 pm

Hmmm.I've had invalid fstab entries cause the boot sequence to abort and be unrecoverable. Had to use a recovery disk to boot and edit fstab before the S would boot again. Be careful using it to setup swappable drives unless they'll always be there.

geek_smac, Mar 11, 12:56 pm


Nope, I got the confirmation email that they'd received my registration but nothing since.Provided full credentials during registration and when I try to use them to log in I get a message 'account is still awaiting admin approval'

No big deal though, don't need to be registered to browse and search so I'll follow up on your advice above.

geek_floydbloke, Mar 11, 1:04 pm

It's good when you do become registered. You can get rid of that gawd darned awful theme. Try registering again.

geek_badcam, Mar 11, 1:08 pm

Just found another thread on this on the PlugApps forum.UDEV will automatically mount plugged drives as /media/somename.It seems in SAMBA I can simply share /media so that any drive plugged in is automatically shared and can be seen.Security is not really a concern at the moment.Given my lack of experience this could well be the simplest and safest way to go at the moment.Thanks for all the help.Back to work now, I'll play with this tonight.

geek_floydbloke, Mar 11, 1:22 pm

That's likely to be the root partition (/) entry.

geek_cybertao, Mar 11, 2:17 pm

Nope, mounting other partitions etc. If the line is invalid (ie define the file system incorrectly) then it hangs the boot, whereas you'd think it would just pass over that line.
If the source of an fstab mount point is missing, it just passes over it!

geek_smac, Mar 11, 2:20 pm

What distro!It must have had some fugly bootscripts.

geek_cybertao, Mar 11, 3:40 pm

Had abit of a play with fstab and the UUID without much luck after powercycling the box.After all that though, seems that UDEV does a pretty good job at mounting it to a point that has the name of the disk's volumelabel, including after a reboot.Sharing that in samba works well.It will be staying on 24x7 anyway so I'll just leave it as is, good enough for what I need it to do.

geek_floydbloke, Mar 11, 8:09 pm

What Cyber suggested should be sufficient. Make a folder in /media Mount it.Make an entry in fstab and it should work (I used UUID, not label). I know nothing about UDEV and I'm not familiar with Arch either (to my regret). For my sheeva's it's always been the printenv variables I've dealt with, never UDEV. I found Samba a bit of a hassle, as I'd never tried it before, but once I got it working, it was rock solid.

What format type is the drive!

[EDIT]Oh yeah. I recall that some people had issue with the hard drive not being picked up on boot up, and the solution, I recall, was to add in some sort of wait period, which gave the drives time to spin up, so then the plug computer would recognise the HD.

geek_badcam, Mar 11, 10:40 pm

Thanks Badcam, I had though that the drive spin-up time could be a factor.Where should I put the wait period (rc.conf!), I would expect that the fstab gets read pretty early in the boot-up sequence.

The drive is NTFS, which is probably not ideal.I'm a bit reluctant to go EXT2 (or higher) because I'd like to be able to plug it in to a Windows box if I complete eff things up and access the data.I guess FAT is an option, can I create FAT partitions from within Linux, with the little experimentation that I did (I've got an old external 60GB HDD I'm thrashing about with in my 'sandpit'), XP didn't give me the option. The disk 'for keeps' already has some data on it as well which I'd prefer to keep intact, although I could migrate off and restore after a re-format if needed.

geek_floydbloke, Mar 12, 9:00 am

Joining here is a must:

http://www.plugcomputer.org/plugforum/ Just search the forum and you'll find mention of the spin up issue. The only problem with this site, is that there's too much info. It's really hard to narrow down a perfect solution sometime. The HD spin up is a well known issue though. Also, try this:

http://www.plugcomputer.org/plugwiki/index.php/Main_Page

Especially the How Too's section:

http://www.plugcomputer.org/plugwiki/index.php/Category:HowTo and this:
http://computingplugs.com/index.php/Main_Page
This guy is also a great source for plug info:

http://www.cyrius.com/debian/kirkwood/sheevaplug/ I think this thread will have your answer:
http://plugcomputer.org/plugforum/index.php!topic=485.0

Take your time to read through this stuff. I's well worth it.

geek_badcam, Mar 12, 9:20 am

NTFS will be perfectly fine. I did that, when I first got my Sheeva, as I was also running Windows at the time. I found NFS hard to set up and Samba just worked. So, Samba it was. NFS is faster though for transfer rates, but I can stream720p movies to my media player using a Samba share and there's never an issue with lag.

I better get the Google on and check out your Dockstar. I've never heard of it.

geek_badcam, Mar 12, 9:25 am


Thanks for the links.I did actually sign up to that MB but never got Admin approval from them, maybe they don't like my hotmail address.Then drifted off to PlugApps.com for most of my info.

I'll go back and check out the forum you suggest

The Dockstar was made by Seagate.It has a Sheeva processorand is very closely linked to the Pogoplug.Downside is, it's only got 128MB RAM but on the plus side it has 3 (4 if you count the dock) USB ports.I'll only be running file and print (CUPS, my next challenge) and transmission so the RAM shouldn't be an issue hopefully, I've got a wee swapfile as well.I managed to find one locally for $70 incl. freight, probably wouldn't have got change from $170 odd if I'd ordered a Sheeva or Tonido from the US.

geek_floydbloke, Mar 12, 10:07 am

It's been so long since I joined, I can't remember how they handled new registrations. Are you sure they don't just send you an email, that you have to click on a link for activation! Maybe it went into your Junk/Spam Folder!

geek_badcam, Mar 12, 11:49 am


Nope, I got the confirmation email that they'd received my registration but nothing since.Provided full credentials during registration and when I try to use them to log in I get a message 'account is still awaiting admin approval'

No big deal though, don't need to be registered to browse and search so I'll follow up on your advice above.

geek_floydbloke, Mar 12, 1:04 pm

It's good when you do become registered. You can get rid of that gawd darned awful theme. Try registering again.

geek_badcam, Mar 12, 1:08 pm

Pleased to announce she's up and running.Have decided not to change fstab as UDEV does a fine job mounting the external drive on a soft reboot, and SAMBA just does its thing.It's staying on 24 x 7 anyway so shouldn't be an issue.CUPS was a bit of a pig to get going, despite its web interface, and webmin I still needed to manually edit printers.conf to get it pointed to a USB printer correctly.Set up of Transmission was a walk in the park.

I've quite enjoyed my little foray into the world of Linux but also understand why it has never displaced Windows as a mainstream desktop OS.It's taken a fair bit of googling and some intuitive experimentation to get this going. (Although I'm sure there are distros with pretty GUIs out there that make it a lot more streamlined than my experience.)

geek_floydbloke, Mar 14, 1:56 pm

Win7 FTW

geek_jcmp21, Mar 14, 2:01 pm

naaa

geek_jcmp21, Mar 14, 2:02 pm

Seriously? This is your first time doing anything Linux? And you went full on Plug Computing???

Heck. You were born for Linux. You're a natural at this.

Mint is good.

geek_badcam, Mar 14, 2:08 pm

You should set up OpenSSH on it, so that you can access your PC (VNC into it) when you're away from home and also use the device as a proxy server (with Firefox and Foxy Proxy) for when you're in a Wifi hotspot or a location you don't trust.

geek_badcam, Mar 14, 2:28 pm


I'll probably pass on that for now.Security on my plug is very lax to say the least.I figured the easiest way without having to learn about user permissions etc. was to pretty much allow anyone access to anything at the moment.Not exactly good practice but it works.

geek_floydbloke, Mar 14, 2:37 pm

I had a need, and google (and the plugapps community) was my friend.
Getting a bit of a taste for it though, might see if I can get hold of another plug or dockstar at some stage so I can carry on playing.

My current dockstar is now 'in production' and I'd rather leave it alone.
(Let me know if you're thinking about getting another Sheeva, maybe we can share shipping costs.Marvell don't sell direct anymore and any other crowd wants bloody US$40 to freight something the size of a fag packet)

geek_floydbloke, Mar 14, 2:41 pm


I rather think your experience is typical of the type of eager newbie person who tries to do all the extreme things at once, without first just getting an appreciation of how things work differently on a POSIX box.Not that I'm knocking your sense of adventure but you're not a regular person looking for a desktop, exactly!You set out as a desktop user looking for a challenge - and you made sure you got one.
Today I can set up a Mint or Puppy desktop for a computer newbie using a default install. I don't let anything install that the user doesn't want right away but *what* is installed totally depends on what that user is going to be using the computer for intially.If the user wants something s/he doesn't have, s/he barely has to do more than click one icon, pick the software off a list and run off for a cup of coffee. I rarely have to go searching in dangerous places for drivers for older hardware (unlike the gruesome experiences with Vista and Win7 boxes I've set up recently).
Until KDE 4 I'd always use the KDE UI for consistency and clarity.I wish I could say the same for KDE 4 but IMHO it's a horrible mess, actually makes Gnome look good!
And, yeah, I'm the first to agree with anyone who says a non-Win interface is "difficult" for ppl who have only known Windows, because it IS different, and different is hard for some folks. Mac users often find Windows difficult and non-intuitive, too! (But then, you get ppl like my sister, a lawyer, who wouldn't use anything but a Mac - but runs all Windows applications on it!)
However, although my entire life revolves around the centre of an open source project, I am NOT one to try to evangelise Linux just for the sake of it.A computer is a tool box, not a religious icon.Everyone needs one for something, these days, and Windows is "good enough" for many purposes.When we want something better, we look at Linux, Mac or something else.

geek_wombatunder, Mar 14, 3:24 pm

Yeah postage is a rort. Especially from the US. These people have never heard of going down to their local post office and actually paying cheap overseas rates. They don't actually realise that this can be done in the US and just how cheap it really is. I'll bear it in mind about going shares in postage. Amazon UK have free postage to NZ at the moment. Maybe, just maybe you'll find something there.

geek_badcam, Mar 14, 6:19 pm

Are you joking?

Install Windows on your plug computer. Let us know how that works out.

geek_little_egypt, Mar 14, 7:23 pm


No, and I probably should have worded it better.I bought the plug with the full intention of running Linux and the services/apps that it's running.And I doubt very much that I can convince MS to recompile any of their WIndows code for this particular CPU/architecture, so no it will never run WIndows ( you can still buy me a beer if you want though).
I was just stating that there is no simple 'run setup' or step-by-step guide to be found for what I needed.It was a matter of finding the right info,and at times adapting it or experimenting to get it working.Although sometimes frustrating, it was a lot of fun and very satisfying.
If setting up Linux desktops is anything like this (and it may well be a lot less cumbersome) it explains to me why it hasn't replaced windows.

But like Wombat mentioned above, it's about the right tool for the right job.This plug, together withe PlugApp Linux, is doing what it needs for me and I'm pretty damn pleased with it. (Although Badcam keeps trying to convince me to do more stuff with it)

geek_floydbloke, Mar 14, 8:03 pm

No, nothing like that. Installing ubuntu or mint (the most popular desktop distros) is as straight forward as Windows.

geek_lostdude, Mar 14, 8:10 pm

Installing mint is (IMHO) much easier and faster than windows. Faster because with Windows you answer all the questions and then it installs. With Mint you answer how you want to allocate the drive and then it goes ahead and starts installing while it asks the few remaining questions. If you have reasonably fast hardware and average typing speed the install will be almost finished by the time you've got through the username, password, timezone and keyboard questions.

geek_little_egypt, Mar 14, 8:47 pm