Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PXE Booting with root on NFS4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42838
Location: 56N 3W

PostPosted: Tue Feb 28, 2012 5:29 pm    Post subject: PXE Booting with root on NFS4 Reply with quote

Team,

I've had my diskless media player working well, pxe booting over NFS3 ... so far so good.

In the interests of being first into the future rather than last out of the past, I've been trying to move to NFS4.
Everything works except mounting root. If I revert root to nfs3 and leave everythig else (portage and the media exports) as ntf4 all is well.

So, what do I need in /boot/pxelinux.cfg/default to mount root using nfs4 and why?

Google has let me down - lots of hits for root over nfs but it all looks like nfs3.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Tue Feb 28, 2012 10:58 pm    Post subject: Re: PXE Booting with root on NFS4 Reply with quote

Not much detail ...

A quick Google for
Code:
pxelinux nfs4
finds this, which specifically mentions NFS4:

http://doc.gabosh.net/howto_Thinclient_Basesystem.html
http://doc.gabosh.net/howto_Server_for_thinclients.html

I haven't read it in detail though.

and this:

https://wiki.archlinux.org/index.php/Diskless_network_boot_NFS_root

and this:

http://ubuntuforums.org/showthread.php?t=1019932

Cheers
Jon
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42838
Location: 56N 3W

PostPosted: Tue Feb 28, 2012 11:34 pm    Post subject: Reply with quote

gerdesj,

Thanks for your help.

The first link shows pxe booting with nfs version 4 using an initrd, so you can call userspace mount to mount root as nfs4.
The others use nfs3.

I really wanted to avoid an initrd if I could. I should have said that in my first post.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 37

PostPosted: Tue Mar 06, 2012 4:05 pm    Post subject: Reply with quote

After some exhausting searching on the internet, here's what I found:

Several websites mentioned that the kernel does not support nfsv4 as a nfs root filesystem. It would be nice to know why this support doesn't exist since it seems several people have asked this question. I can confirm that it works fine when booting as nfsv2 or nfsv3, although I would make sure to specify nfsv3 (nfsvers=3 in the pxe boot config) because nfsv2 does not support large file sizes (several gigabytes).

Many people have claimed that they can get nfsv4 to mount as a root file system but it seems every claim has mentioned the use of initrd in the pxe config. It would be nice to have some explanation on how to set up an initrd to mount nfsv4 as a root filesystem though. Can anyone post here what steps involved are for that?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42838
Location: 56N 3W

PostPosted: Tue Mar 06, 2012 6:42 pm    Post subject: Reply with quote

logistiker,

When time permits I shall try the initrd route. I suspect its much like mounting root on LVM over raid.
The big questing going the initrd is does busybox support NFS4 mounts or will I need a static mount.

I'm not in any hurry. It appears the the 3.3-rcX kernel no longer read my my wireless Logitech unity keyboard, so I can have a mediaplayer that does sound over HDMI with the radeon driver but no keyboard, or I can have the keyboard but must use the binary blob to get sound over HDMI. I'm short of time to play too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Fri Mar 16, 2012 8:41 am    Post subject: Reply with quote

Hi NeddySeagoon,

You've helped me lots in the past so I thought I'd jump in.
If you use Genkernel to help make your initrd and PXE Boot then don't use a version greater than v3.4.18 as it won't mount the squashfs image via NFS when you PXE boot.

See here for others having the same problem: https://forums.gentoo.org/viewtopic-t-912898-highlight-.html

You need to cache the CD image in RAM on the client incase you loose all network connectivity to the NFS server... this way your node doesn't just die.

Rich
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42838
Location: 56N 3W

PostPosted: Fri Mar 16, 2012 10:14 pm    Post subject: Reply with quote

richard.scott,

Thank you. Right now I have a bigger problem with my media server and need to fix that before I play with NFS4 and PXE boot
Everything in the system in LVM over raid5. I have two drives with in the raid with bad blocks on bit in different places. The means the raid is servicable and all the information is there but I can't drop a drive out to replace it without losing data, since I won't have a complete degraded raid set to work with.

I need to fix that first. The data thats affected is my DVD collection, so its expendable. Its just the time to stuff the DVDs back in.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
VoVaN
l33t
l33t


Joined: 02 Jul 2003
Posts: 671
Location: The Netherlands

PostPosted: Mon Mar 26, 2012 9:13 am    Post subject: initrd/initramfs Reply with quote

I'm using PXE boot for quite a while. Currently I'm using NFS3, but, as I can remember, I've been able to mount NFS4 using standard busybox mount. Please post about the progress with this NFS4 issue.

BTW, I'm using aufs with NFS rw root (on per node basis) over shared NFS ro root, so I can provide up-to-date/working busybox config and simple init script. The total uncompressed size of initramfs is ~1,5Mb and compressed with LZMA ~0,5Mb. Success!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42838
Location: 56N 3W

PostPosted: Mon Mar 26, 2012 8:07 pm    Post subject: Reply with quote

VoVaN,

I've swapped out one dead drive in the process of avoiding reripping 1200 DVDs. The second is RMAed and I'm waiting for the replacement to arrive.
It will be at least two more weekends before I can play with root on NFS4 again.

I've not given up but I don't want to do anything I don't have to on a raid set with no redundent data.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dacid
n00b
n00b


Joined: 29 May 2004
Posts: 49
Location: Charlotte, NC, USA

PostPosted: Fri Apr 04, 2014 1:51 am    Post subject: Reply with quote

Just curious if anyone got pxe boot working without initrd?
Back to top
View user's profile Send private message
iomarian
n00b
n00b


Joined: 09 Apr 2014
Posts: 3

PostPosted: Thu Apr 10, 2014 9:19 am    Post subject: pxe issues Reply with quote

am trying to pxe boot a gentoo live cd ; i am having some trouble in succiding; so far i found 2 methods to boot but none does the job;


first option
KERNEL gentoox86/x86_gentoo_install.kernel
append root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=gentoox86/gentooo.igz vga=791 doload=nls_cp437,nls_iso8859-1

Afer loading the gentoo kernel and gentoo initrd, system boots and afer asking for keyboard map it display Media not found; not bootable medium found, waiting for new device.


second option
KERNEL gentoox86/x86_gentoo_install.kernel
APPEND ip=dhcp root=/dev/nfs rootfstype=nfs nfsroot=IP:/path-to-shared rootpath=/path-to-shared

in the second option i get kernel panic


Can someone help me ?
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1727

PostPosted: Thu Apr 10, 2014 12:23 pm    Post subject: Reply with quote

LINUX gentoo/kernel-genkernel-x86-3.7.10-gentoo
APPEND ip=dhcp root=/dev/ram0 cdroot=1 real_root=/dev/nfs nfsroot=<IP>:<path to directory containing squashfs> initrd=<initrd filename> loop=<squashfs filename> looptype=squashfs

AFAIR path following 'initrd=' is in relation to pxelinux.0
Back to top
View user's profile Send private message
iomarian
n00b
n00b


Joined: 09 Apr 2014
Posts: 3

PostPosted: Thu Apr 10, 2014 3:11 pm    Post subject: issue pxe boot Reply with quote

now i get :

mount : mounting IP:/path to gentoo on /mn/cdrom failed: Input/output error
!! NFS Mounting failed. Is the path correct ?
>> Determining looptype ...
!! Invalid loop location : gentoo/image.squashfs


MENU LABEL ^Gentoo x86
KERNEL gentoox86/x86_gentoo_install.kernel
APPEND ip=dhcp root=/dev/ram0 cdroot=1 real_root=/dev/nfs nfsroot=IP:/pxe/share/gentoox86 initrd=/gentoox86/x86_gentoo_install.initrd loop=gentoox86/image.squashfs looptype=squashfs


i don't understant the AFFAIR entry
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7001

PostPosted: Fri Apr 11, 2014 12:34 am    Post subject: Reply with quote

NeddySeagoon wrote:

I've swapped out one dead drive in the process of avoiding reripping 1200 DVDs. The second is RMAed and I'm waiting for the replacement to arrive.
It will be at least two more weekends before I can play with root on NFS4 again.

From experience, RMA drives are refurbish ones, and expect it to die in few months. (yeah, even if they change it again, they keep eating your warranty months on each try, upto the point your drive is again dead but no more under warranty).
Alas, you better buy a new drive and reuse the RMAed one as a spare.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42838
Location: 56N 3W

PostPosted: Sat Apr 12, 2014 9:48 am    Post subject: Reply with quote

iomarian,

Please share your tftp server file layout.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
iomarian
n00b
n00b


Joined: 09 Apr 2014
Posts: 3

PostPosted: Mon Apr 14, 2014 5:55 am    Post subject: Reply with quote

cat /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/pxe/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42838
Location: 56N 3W

PostPosted: Mon Apr 14, 2014 6:42 pm    Post subject: Reply with quote

iomarian,

Join #gentoo-releng on irc.freenode.net

The gentoo guys that make the liveCDs can be found there. They can help if anyone can.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum