[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:network_services:nfs_root [2018/05/28 21:33 (UTC)] – [Configuring LILO] bifferos | howtos:network_services:nfs_root [2018/05/28 22:21 (UTC)] (current) – [First Boot] bifferos | ||
---|---|---|---|
Line 50: | Line 50: | ||
==== Creating the kernel ==== | ==== Creating the kernel ==== | ||
- | The full huge kernel that comes with Slackware is close to providing everything we need, but we still need to recompile it. I'd recommend doing the compilation on a 32-bit virtual machine if you are targeting a 32-bit thin client, or 64-bit if your thin client is 64-bit. | + | The full huge kernel that comes with Slackware |
< | < | ||
Line 71: | Line 71: | ||
< | < | ||
- | [OPTIONAL] It's pretty useful to append a local version to this kernel release. | + | [OPTIONAL] It's pretty useful to append a local version to this kernel release. |
< | < | ||
Line 90: | Line 90: | ||
read-only | read-only | ||
append= " | append= " | ||
+ | |||
+ | If you didn't want to use dhcp you'll now need to have a read of | ||
+ | Documentation/ | ||
+ | include for ip= other than ' | ||
Obviously keep your default linux kernel in another image= section so you can switch between booting the nfsroot and the normal kernel to play around with this stuff. | Obviously keep your default linux kernel in another image= section so you can switch between booting the nfsroot and the normal kernel to play around with this stuff. | ||
- | You cannot specify a normal root= entry in this section because | + | You cannot specify a normal root= entry in this section because |
The v3 seems to be really important in making anything at all happen on boot. If that isn't set, no communication seems to occur. | The v3 seems to be really important in making anything at all happen on boot. If that isn't set, no communication seems to occur. | ||
- | The ' | + | The ' |
With the kernel compilation finished, copy the kernel into the /boot directory and rename it: | With the kernel compilation finished, copy the kernel into the /boot directory and rename it: | ||
Line 103: | Line 107: | ||
< | < | ||
- | It may be elsewhere depending on your architecture. | + | It may be created |
Don't forget to run LILO: | Don't forget to run LILO: | ||
< | < | ||
+ | |||
+ | ==== First Boot ==== | ||
+ | |||
+ | The above is enough to get you a booting Slackware system, or should be. There are some additional steps that you may wish to now do. | ||
+ | |||
+ | === Modules === | ||
+ | |||
+ | None of the modules have been installed, let's add them. Shutting down the nfsroot system and booting back into the Slackware kernel compilation virtual machine we can now compile the missing modules. | ||
+ | |||
+ | < | ||
+ | |||
+ | Then we can compile and install the modules: | ||
+ | |||
+ | < | ||
+ | # make modules | ||
+ | # make modules_install INSTALL_MOD_PATH=/ | ||
+ | |||
+ | For the last command, avoid adding a trailing slash to /mnt/tmp, and try not to forget the INSTALL_MOD_PATH, | ||
+ | |||
+ | === Swap on NFS === | ||
+ | |||
+ | You can create a swap file on your NFS share somewhere like this: | ||
+ | |||
+ | < | ||
+ | |||
+ | Then format it for swap: | ||
+ | |||
+ | < | ||
+ | |||
+ | Then on the client you associate a loopback device with the file: | ||
+ | |||
+ | < | ||
+ | |||
+ | Then start using the loopback device for swap: | ||
+ | |||
+ | < | ||
+ | |||
+ | Obviously you need to add the last two commands to / | ||
+ | |||
+ | === Locking down / | ||
+ | |||
+ | Assuming your thin client connects from a predictable address, now that we've installed the modules we can finally lock down access to only the thin client (/ | ||
+ | |||
+ | < | ||
+ | |||
+ | And we presumably don't want all-and-sundry using our newly prepared rootfs directory, so drop it down a level and qualify it by IP address (on the server): | ||
+ | |||
+ | < | ||
+ | # mv nfs_share 172.17.0.81 | ||
+ | # mkdir nfs_share | ||
+ | # mv 172.17.0.81 nfs_share</ | ||
+ | |||
+ | Now over on the client machine, configure LILO so nfsroot | ||
+ | requests the nfs share based on the client' | ||
+ | |||
+ | < | ||
+ | label = nfs | ||
+ | read-only | ||
+ | append= " | ||
+ | |||
+ | NFS Root is never going to be considered secure, but at least this makes cross-contamination of nfsroots less likely. | ||
+ | |||
+ | Note that I am using dhcp in the above example, but I've added an entry to / | ||
+ | |||
====== Sources ====== | ====== Sources ====== |