Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 04-20-2008, 09:47 AM   #1
LQ Newbie
Registered: Apr 2008
Posts: 3

Rep: Reputation: 0
pxe nfsroot without initrd

Trying to install a pxe server using the slackware 12 PXE howto I found that the default initrd have to be modified.

I had the same problem as described in this thread :

Then I wondered if it was possible to have slackware booting without an initrd. I didn't found any informations about this except for particular kernel (ram check if I remember well).
As it is not urgent I told myself : Give it a try.

I found the parameters of pxelinux.cfg/defaults (in tftpboot/slackware) that allow to mount nfs as root.

Here is my defaults

default test
prompt 1
timeout 1200
display message.txt
F1 message.txt
F2 f2.txt
label test
  kernel kernels/pxe2.s/bzImage
  append init=/sbin/init root=/dev/nfs nfsroot= ip=dhcp SLACK_KERNEL=pxe2.s devfs=nomount
Here is my pxe server /etc/export where I have an export for the system which is read-only and an export for the /home that I mount in the client fstab.

/exports/client ,sync,no_root_squash)
/exports/home   ,sync,no_root_squash)
After a few problems with the /dev (was missing the necessary console and null devices) The workaround was to recompile a kernel (using 2.6.25) to have of fixed udev, the slackware 12 one failing to mount tmpfs on /dev.

For the /tmp and other compulsory temp directories I used the following fstab for clients.

Code: / nfs nfsvers=3,rsize=8192,wsize=8192,tcp
tmpfs  /dev        tmpfs    rw
proc   /proc       proc     defaults
tmpfs  /tmp        tmpfs    rw
tmpfs  /var/tmp    tmpfs                      0 0
ramfs  /var/run    ramfs                      0 0
ramfs  /var/log    ramfs                      0 0
ramfs  /var/lock   ramfs                      0 0
ramfs  /var/state  ramfs                      0 0
ramfs  /var/tmp    ramfs                      0 0
ramfs  /media      ramfs                      0 0 /home nfs nfsvers=3,rsize=8192,wsize=8192,tcp
And finaly it works after fixing the non-writable file in /etc like mtab etc...

Then trying to launch X with KDE on client, it dropped me some more errors about non-writable directories.

Here I am and my questions are :

Is what I am doing stupid?
Does using pxe without initrd is not recommended (security, fiability ...)?
Last but not least what are the ways to avoid all the problems due to the read-only nfsroot? Does I need to exports some nfs mountpoint writable ?

Old 04-21-2008, 03:01 AM   #2
Senior Member
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Running without initrd is always fine , if you know what you are doing in normal desktop setups... I can't see any reason for it to be otherwise in pxe setups.
Old 04-21-2008, 03:36 AM   #3
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 6,244

Rep: Reputation: Disabled
The README_PXE.TXT is to be used for installing Slackware.
The README does not describe how to run a Slackware diskless (aka 'thin') client using PXE boot and with the filesystem on a NFS mount. If you want that, you will have to write a custom init script for your initrd.

Doing PXE boot without initrd is impossible. If you want to run Slackware as a diskless client, the init script in the initrd needs to load a network driver, start the network, mount the NFS root, that kind of stuff. The script in the standard Slackware initrd does not do this.

Old 04-21-2008, 05:11 AM   #4
LQ Newbie
Registered: Apr 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your quick replies.

Originally Posted by Alien Bob View Post
Doing PXE boot without initrd is impossible.
Are you sure it is impossible ? It works for me.
I compiled a kernel with nfs and network card driver (in fact it is the vmware VM card) and passing the nfsroot to be mount with the pxelinux.cfg/default file as described previously.

The kernel boot then mount the nfsroot, and after udev create the /dev mount as tmpfs and create the necessarily device files in it.
It is only possible with 2.6.25 kernel because udev have some issues fixed since the last version.
After the fstab configuration is loaded to create all temporary folder needed for the system to work as well as the /home with nfs.

I wasn't asking if that could work but if that was reliable.

I will still have to see if the nfsroot have to be read-only or read-write because a lot of folders have to be writable for all the software to run.
As it is my first experience in creating a pxe boot (and nearly the first in managing a linux client/server environment), I am wondering what folders have to be ro or rw. If it is possible not to create an nfs export by client, I would rather.
Does UnionFS, AuFS or another unionfs-likes is a good solution to manage with rw files on shared ro folders ?

Hope my english is clear enough.

Old 04-21-2008, 05:30 AM   #5
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I assume Alien Bob meant with the default kernel.
Old 04-21-2008, 06:01 AM   #6
Senior Member
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
With the default kernel, running pretty much anything without initrd is impossible ...

I don't think he meant the default kernel .. we will have to wait for him though


initrd, nfs, pxe, slackware, udev

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to create PXE server and can't mount initrd image Nylex Slackware 6 07-08-2007 01:10 PM
Is it possible to update the pxe network install initrd.img and vmlinuz ? lets-eat-gary Fedora 1 08-22-2006 04:54 AM
How to update the pxe network install initrd.img and vmlinuz ? lets-eat-gary Linux - Networking 3 08-20-2006 03:45 PM
nfsroot question the_alexx Linux - Networking 0 05-13-2005 12:36 AM
nfsroot problem nilwer Linux - Networking 0 09-15-2003 10:17 AM

All times are GMT -5. The time now is 02:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration