pxe boot "ubuntu precise" from nfs root - / not found.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
pxe boot "ubuntu precise" from nfs root - / not found.
Recently, I got myself a small QNAP nas to support my small fanless htpc with network booting.
As usual, I created an NFS directory where I debootstrapped the precise version from ubuntu, chrooted into it and then did the config for network and locales + tzdata, installed the latest generic kernel, busybox, initramfs-tools etc.
When I boot the system from network, tftp and dhcp work fine because it gets the pxelinux.0 and the new kernel + initramfs from another share on the nas. (in the tftp root directory) the kernel and initrd from the chroot install are then copied to this tftp root ofcourse.
But: the boot process halts with the error that it cannot find the root directory and drops me into busybox. (root=/dev/nfs nfsroot=<serverip><nfsroot>)
So I thought that the problem was with initramfs not supporting network boot.
I chrooted again into the debootstrapped system and went into /etc/initramfs-tools directory, there I changed the boot to NFS in the initramfs.conf file and did update-initramfs -u.
Problem 1: My main system is gentoo and even in chroot, the update-initramfs complained about not finding /lib/modules/3.4.?-gentoo/modules.dep which seemed normal to me because the chroot actually uses the running gentoo kernel. (uname -a confirmed it)
so I found no options in update-initramfs to work around it and created a softlink "ln -s /lib/modules/3.2.?-??-ubuntu-generic /lib/modules/3.4.?-gentoo"
Problem 2: in the chroot, it complains about mtab missing. logically, I have no mtab there, so I created one from fstab and the error also went away.
result: the update-initramfs complains no more but the problem remains and when I pxe-boot, I still get dropped to busybox with the complaint that /dev/nfs cannot be found.
There is no /dev/nfs when I do an ls /dev.
what worked from the busybox (initramfs):
ifconfig <ip>/<mask> eth0
mount -t nfs <nfsip>:<nfsdir> / -o nolock (I need nolock for the qnap nfs implementation)
=> while I'm writing here, it occurs to me that I did not give this nolock option anywhere in the kernel options for the pxe boot (pxelinux.cfg/default) or the initramfs.conf file.
1) when I drop into the initramfs system, is it normal to have no network configured, having to manually do ifconfig? I suppose it is, the pxe-boot works and thus I do have network but the system config is probably later in the boot?
Am I missing a module for my nic? A cd-install of ubuntu precise to the harddisk (to be removed) of the htpc did not have problems with my nic.
2) Is it even possible to do the update-initramfs from the chroot in gentoo for this ubuntu system? Or do I have to install ubuntu somewhere and do the update-initramfs there so that the chroot is using the same kernel as the host system? Seems rather ridiculous to me :-)
I may have forgotten to copy the newly created initramfs to the tftp root directory to use for pxe boot..
Will try that this evening and post result here. (pfhew, I must have been on drugs or something)
Meanwhile, I've spent many an hour to get this pxe boot working.
the guest os is ubuntu 12.04 chroot-installation as mentioned before.
the problem is that whatever I try, I get stuck after init-bottom has finished. Some debugging messages in the init script (/usr/share/initramfs-tools/init) show me that it gets stuck here:
I tried several things, no / mountpoint, normal nfs, whatever I try here seems to be ignored.
After a testrun, I can see that the nfs root has been mounted because the logs in the chroot have been updated with new entries.
and the mtab from chroot is created, it always shows like this:
In fact, this is on a second nfs server as my first one is a qnap I thought changing nfs server would help. but no.
when I use the qnap nfs, it correctly shows the ip and chroot mountpoint on that qnap.
for sake of completeness, this is default for the pxeboot: