Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: cuppie on May 24, 2014, 04:47:21 AM

Title: Mounting rootfs on nfs possible ?
Post by: cuppie 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
 

Title: Re: Mounting rootfs on nfs possible ?
Post by: curaga 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.
Title: Re: Mounting rootfs on nfs possible ?
Post by: netnomad 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.
Title: Re: Mounting rootfs on nfs possible ?
Post by: gerald_clark on May 24, 2014, 11:23:16 AM
You can put home and opt on nfs.  That will free up some RAM.
Title: Re: Mounting rootfs on nfs possible ?
Post by: cuppie 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
Title: Re: Mounting rootfs on nfs possible ?
Post by: gerald_clark 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.
Title: Re: Mounting rootfs on nfs possible ?
Post by: tinypoodle on May 28, 2014, 08:05:13 PM
You seem to confuse root= and rootfs, please see:
http://landley.net/writing/rootfs-intro.html