LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-01-2009, 11:49 PM   #1
bcromwell
LQ Newbie
 
Registered: Jun 2004
Posts: 10

Rep: Reputation: 0
Netboot/Pxeboot without pivot root


Ok maybe I am really missing the boat here but I am confused.. I am trying to Pxeboot a system using a nfs root (aka diskless boot), but I don't think I want/need to use pivot root as I am trying to boot only one system per nfs share, not multiable systems using a readonly base and snapshots

Done so far
Create Functional tftp/pxe server
Installed FC10 to a temporary HDD
rsync -a -e ssh --exclude='/proc/*' -exclude='/sys/*' 192.168.0.2:/ /diskless
nfs export /diskless

So I think I would next make copy initrd and vmlinuz from /boot to my pxe server and configure pxe something like:

LABEL testpxe
KERNEL vmlinuz
APPEND ro root=/dev/nfs nfsroot=192.168.0.1:/diskless ip=dhcp


Does this appear to be correct or am I still missing the general idea.
 
Old 04-02-2009, 08:28 AM   #2
bcromwell
LQ Newbie
 
Registered: Jun 2004
Posts: 10

Original Poster
Rep: Reputation: 0
btt
 
Old 04-06-2009, 05:30 AM   #3
lievendp
Member
 
Registered: Jan 2006
Location: Belgique
Distribution: Gentoo, Debian, Redhat, Centos, (x)Ubuntu
Posts: 111

Rep: Reputation: 27
Hi Bcromwell,

I'm kinda new to this kind of thing myself but I think it goes as follows:

1) your nfs client which is pxe-booted loads the kernel and an optional initrd.img which are generally in /var/lib/tftpboot on the server.
This kernel and image are the ones from the client system, I think it is the fedora you're talking about? You had to copy them from the client system to the /var/lib/tftpboot/ on the server.
=> The system now is booted and "/" (root) is some temporary filesystem that is needed to initialize some hardware like the networkcard and some libs to be able to mount other filesystems and some other basic stuff.


2) the kernel is loaded and according to the entries in /var/lib/tftpboot/pxelinux.cfg/<mac||default|...> it knows now where the final "/" should be mounted. This "/" is in fact the nfs share that holds the client system.
The initial rootsystem (from the kernel and initrd.img) can mount the final rootsystem (the nfs)
=> The root is switched "pivoted" from the initial one to the final one.


I found some info here:
https://help.ubuntu.com/community/DisklessUbuntuHowto
http://www.xs4all.nl/~rjb/fatclient.html
http://www.linuxquestions.org/questi...n-etch-468870/


I'm having trouble with this myself since I want all the client fat pc's to mount the same readonly nfsfilesystem and login with the same userid.
I'm trying to figure out what makes the nfs readonly or readwrite.
In the /etc/exports, I can give the "ro" option for the nfs share.
But in the /var/lib/tftpboot/pxelinux.cfg/default I can also apppend "ro" to the mount options of the kernel.

Something else related that I'm trying to figure out is if a /dev/ram0 mount of "/" where "/" is the nfs root can make the real nfs root immutable. I tested it and it works but only if the /etc/exports exports the share as "rw"

When I share the nfs in exports as "ro"
then even an append to /proc/cmdline "ro"
and an entry "/dev/ram0 / ext2 defaults 0 0" in etc/fstab of the client
make that the client cannot boot.

As soon as I put the exports to "rw" then the client can boot. So I think that the appende "ro" option doesn't make the root filesystem readonly and thus it is unusable for sharing.

cheers,
Lieven

Last edited by lievendp; 04-06-2009 at 05:52 AM.
 
  


Reply



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
debian netboot - cant find root spudtheimpaler Debian 16 11-30-2008 07:24 AM
PXEboot for slackware 11 - cannot mount NFS root +Yan Linux - Server 0 04-11-2007 09:05 AM
pivot root error while booting kernel 2.6.7 tuxrules Linux - Newbie 21 08-08-2004 12:25 PM
Problems with console login on newly created root filesystem (for PXEboot) holandes777 Linux - General 1 08-05-2004 05:11 PM
Kernel Panic with pivot root error ramu_ak Linux - General 0 02-07-2003 02:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:44 AM.

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