• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: /usr on sd card and fstab  (Read 3558 times)
ubertekton
Newbie
*

Karma: 0
Posts: 10


View Profile
« on: June 28, 2010, 06:29:20 AM »

Home server update

I got a new 8g sd card, formatted to ext2, copied /usr, and configured fstab to mount.  Upon reboot an ssh to the plug failed.  A quick check using jtag revealed the problem.  It just so happens that fstab mounts are performed in the last script called so all other scripts fail because /usr is not online.  I thought that fstab would have been processed earlier.  Did I just learn something about Linux in general or the late fstab processing peculiar to the plugs?  In any event, any suggestions as to where to move it to?  System has been running with no issues (other than those created by mydelf) for over a month.  In retrospect perhaps I should have configured the system to boot from the sd card.  Thanks.
Logged

velo_love
Newbie
*

Karma: 0
Posts: 15


View Profile
« Reply #1 on: June 28, 2010, 08:06:07 AM »

Hi,

I also have a Guruplug server + and I follow this topic to boot from my 8Gb sd card and more particularly this message. It greatly works.
Logged

sfzhi
Jr. Member
**

Karma: 1
Posts: 83


View Profile
« Reply #2 on: June 28, 2010, 08:17:12 AM »

This is not something about Linux in general. This is something about the Linux distribution you are using and the way they have setup their start-up scripts.

In general it may not be safe to "move" mounting to some time earlier in the boot sequence. There may be some other mounts that would fail, because some other system component is not running yet (a typical example would be NFS). If you don't feel comfortable playing with those things I would advice to leave them as they are.

One thing you could do is add a new start-up script that would mount /usr when you think necessary. In theory you can do that as soon as the drivers have been loaded and /dev is populated accordingly, but beware that the sd-card driver waits for a couple of seconds before it tries to read the partition information from the card, so if you try to mount the sd-card right after udev is started (and /dev has supposedly been populated) you will most likely not have the necessary device nodes yet.

Another solution would be to trigger the mount by a udev rule, so that the card is mounted as soon as it is available and no second later. But then there is still a chance that other start-up scripts that need /usr will try to run too early.

It is hard to tell what exactly is the best solution without knowing the details of your system configuration.
« Last Edit: June 29, 2010, 10:59:08 AM by sfzhi » Logged

Lack of knowledge is not such a big problem, unwillingness to learn is.

sfzhi
Jr. Member
**

Karma: 1
Posts: 83


View Profile
« Reply #3 on: June 28, 2010, 08:22:05 AM »

I also have a Guruplug server + and I follow this topic to boot from my 8Gb sd card and more particularly this message. It greatly works.

The OP is not trying to boot from SD-card, he is trying to mount /usr from it. This is a totally different issue.
Logged

Lack of knowledge is not such a big problem, unwillingness to learn is.

velo_love
Newbie
*

Karma: 0
Posts: 15


View Profile
« Reply #4 on: June 28, 2010, 08:51:02 AM »

The OP is not trying to boot from SD-card, he is trying to mount /usr from it. This is a totally different issue.
Oups, indeed I misread the message: he only wants to mount /usr and not the whole /. So, sorry !

However, I think it should be simpler to move the whole / onto the sd card  Grin
Logged

ubertekton
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #5 on: June 28, 2010, 11:09:15 AM »

Thanks for the responses so far.  Yes, seems booting from the sd card may provide a cleaner implementation and allow for easier recovery because I can make a copy of the sd card.

I figure /usr would have to be mounted before any script runs that invokes a program in /usr.  I believe the order init scripts are run is tied to the SXX value, which should make it easy to check what is being run and when.
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #6 on: June 28, 2010, 04:40:04 PM »

I got a new 8g sd card, formatted to ext2, copied /usr, and configured fstab to mount.  Upon reboot an ssh to the plug failed.  A quick check using jtag revealed the problem.  It just so happens that fstab mounts are performed in the last script called so all other scripts fail because /usr is not online.
Which OS is that?  Systems I've seen mount all *local* file-systems once /etc is set up.
Logged

ubertekton
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #7 on: June 29, 2010, 05:55:59 AM »

Debian lenny as is from manufacturer.  mount -a command shows up in rc.local script, last to run.
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #8 on: June 29, 2010, 05:34:05 PM »

Debian lenny as is from manufacturer.  mount -a command shows up in rc.local script, last to run.
That's just to get everything which isn't already mounted.
rcS.d contains a symlink to S35mountall.sh which should mount all local file-systems from /etc/fstab very early on.
Logged

Alucard
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #9 on: July 08, 2010, 03:05:42 PM »

I solved this by removing the "usbmount" package.
Logged

Pages: [1]
Print
Jump to: