WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Mounting rootfs on nfs possible ?  (Read 2618 times)

Offline cuppie

  • Newbie
  • *
  • Posts: 7
Mounting rootfs on nfs possible ?
« on: May 24, 2014, 04:47:21 AM »
Hi,

Currently im running some thin clients in our house as a squeezebox for playing music.
The setup is very simple.
All clients boot with pxe , and mount an nfs share where the tce dir exists.

It's running almost fine.
The only point is that the original thin clients have not enough ram (64 MB)
When I put 128 mb in it , it's running fine.
Also customizing (strip down) some extensions , also works instead of upgrading the memory.

But currently i'm thinking about to mount the rootfs on NFS.
The goal should be , freeing up memory.
NFS rootfs is also mounted as Read Only , isn't it ?
Not sure if it is possible with TC.
I've already read info about the requirements of the kernel. It seems that rootfs on nfs needs some options in the kernel build.
I've not yet checked if the current kernel has these options.

I would really appreciate any advise
 


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: Mounting rootfs on nfs possible ?
« Reply #1 on: May 24, 2014, 05:59:49 AM »
No, it is not possible without some big hacks, comparable to a scatter installation.

If customizing extensions works, why not use that solution? You can also remove some unneeded drivers from the base initrd, saving 1-2mb.
The only barriers that can stop you are the ones you create yourself.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Mounting rootfs on nfs possible ?
« Reply #2 on: May 24, 2014, 11:04:59 AM »
hi cuppie,

perhaps consider to use "sshfs".

i guess that with sshfs you could "mount" the root-filesystem.
don't miss the security-aspects, if you don't mind the performance issues :)
for some years i substituted all my nfs- and smb-shares
with sshfs-mounts (linux) or ssh-tunneled-smb-mounts (win).

keep on hacking.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Mounting rootfs on nfs possible ?
« Reply #3 on: May 24, 2014, 11:23:16 AM »
You can put home and opt on nfs.  That will free up some RAM.

Offline cuppie

  • Newbie
  • *
  • Posts: 7
Re: Mounting rootfs on nfs possible ?
« Reply #4 on: May 28, 2014, 04:55:02 PM »
First many thanks for all suggestions,

Currently i've done some testing with a "scatter" install.
I've already read some posts that Tinycore is not setup for a scatter install , and it should not be the way to go.
But as crazy as i am , i just set it up.
In short what i did.

- extracted the root file system (core.gz) to the root of the (formatted) disk.
- modified the grub boot , to only use vmlinuz , with parameters : ro root=/dev/sda1
- copied the needed extensions , form their tcloop dir , to the disk.

Some nice thing is that some boot script in Tinycore detects the scatter install at bootup.

Again , I know about the tinycore design , an this type of install isn't supported.
But my Squeezelite machine is playing music within 30 seconds after pushing the power button.
And it's fits perfect.
I'm very very happy.

The only thing left is , mounting the rootfs (/dev/sda1) as readonly
I've just played with fstab , but can't get it to work right now.

I did not make any changes to original scripts. But i think some scripts need to modified.

Is there anyone who can point me in the right direction ?

Kind regards

Cuppie

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Mounting rootfs on nfs possible ?
« Reply #5 on: May 28, 2014, 04:58:15 PM »
Scatter mode is specifically not supported.  It is against the design goals of Core.  You should probably be using some other distro.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Mounting rootfs on nfs possible ?
« Reply #6 on: May 28, 2014, 08:05:13 PM »
You seem to confuse root= and rootfs, please see:
http://landley.net/writing/rootfs-intro.html
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)