LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   PXE booting Knoppix - NFS problem (https://www.linuxquestions.org/questions/linux-networking-3/pxe-booting-knoppix-nfs-problem-505082/)

royceH 11-26-2006 05:58 PM

PXE booting Knoppix - NFS problem
 
I am trying to set up a PXE server for Knoppix. The server already serves DSL(the variant that runs completly from RAM), and floppy images for DOS. This is the first time I've used NFS for booting, although the DSL has been using it for file sharing.

In DSL, and if I boot Knoppix off the CD, I can use the command:
Code:

sudo mount -t nfs 10.1.1.1:/mnt/f/Public/PXE/syslin/KNOPPIX /mnt/nfs
to mount the location of the Knoppix files as well as read and write them, so there isn't a problem with the NFS server.

however, if I add the following to the pxelinux configuration
Code:

LABEL knoppix
KERNEL KNOPPIX/boot/isolinux/linux
append nfsdir=10.1.1.1:/mnt/f/Public/PXE/syslin/KNOPPIX nodhcp lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 xmodule=fbdev initrd=KNOPPIX/boot/isolinux/minirt.gz BOOT_IMAGE=knoppix

(which is mainly copied from the Knoppix PXE server) Knoppix will start booting, but will search for the main image (stored on the NFS share) and not find it. If the CD is in the drive at startup the PXE booted machine will find the main image on the CD and continue booting from that.

If I use:
Code:

LABEL knoppix
KERNEL KNOPPIX/boot/isolinux/linux
rem append root=/dev/nfs nfsroot=10.1.1.1:/mnt/f/Public/PXE/syslin/KNOPPIX ip=auto

Which I am given to understand would mount / as the listed folder, produces a kernel panic error, saying the filesystem can't be synced, and that /dev/nfs dosen't exist.
My guess is that the kernel isn't comunicating with the NFS server corectly. Also, becuase my NFS server is Cygwin wich only serves version 2, not version 3 this might be cuasing the kernel greif.

Realy, I'm happy with the kernel mounting anything from the NFS server, and working around this. I get the feeling it's something stupidly simple

eendoe 12-01-2006 02:20 AM

suggestion
 
run the configurator that comes with knoppix

check what it put in /tftpboot/pxelinux.cfg/default

this may help


Good Luck

royceH 12-05-2006 09:23 PM

This I will do, but not untill tomorow. I'm still of the opinion that it has to do with the NFS server which means that it's almost definatly somthing else

royceH 12-06-2006 07:46 PM

After feriting about in the /tftpboot/ folder of the CD driven knoppix, I have discovered that I need a diferent initrd file. I happly splaped that onto the NFS server along with the code I found in the pxelinux.cfg/defualt file, which was slightly diferent from what I had so, now I'm using:
LABEL knoppix
KERNEL KNOPPIX/boot/isolinux/linux
APPEND secure nfsdir=10.1.1.1:/mnt/f/Public/PXE/syslin/KNOPPIX/ nodhcp lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 initrd=KNOPPIX/boot/isolinux/test.gz quiet BOOT_IMAGE=knoppix

And now I have an all new error message!

...
Found network device(s) handled by tulip.ko.
Can't NFSmount KNOPPIX filesystem, sorry.

I'm still running with the NFS server not interacting correctly with the Knoppix kernel

royceH 12-07-2006 06:39 PM

It ocured to me that I might get more helpfull errors if I tryed mounting the NFS share using the limited shel that Knoppix provides after a failue. using the command

mount -t nfs 10.1.1.1:/mnt/f/Public/ /mnt/

(creating folders isn't supported in the limited shell) produces an error similar to data missing or invalid input (sorry I don't have the exact error, I only have one machine now it's the one I using to post this and boot to PXE) I tryed adding the nfsvers=2 option, becuase that's all the server produces, but was given the unkown option error.

royceH 12-10-2006 01:47 PM

I have another idear.
Is it posible to boot using a boot flopy image (such as tomsrtbt or the boot flopie images avalible fron Knoppler.net) then NFS mount and run the knoppix system?
Thoughts anyone?

royceH 12-10-2006 02:37 PM

the error from trying to mount NFS shares in the limited shell is:
NFS_read_super: missing data argument
does anyone know what this actualy means, and where I should be looking for a solution?

royceH 12-10-2006 03:04 PM

after quite a bit of Googling about my NFS error, I have found a Korean forum which Google helpfully translates:
http://translate.google.com/translat...ial_s%26sa%3DN

From the quasi english that the traslator produces, I have gathered that this problem can be cuased by the /etc/exports file on the NFS host, but not what to do to it to fix the problem. I think that I will have to boot back to knoppix and have a look at the exports file that it produces.

royceH 12-11-2006 02:57 PM

I have replaced my cygwin /etc/exports file with /tftpboot/exports from Knoppix, then changed the folder that it pionts to (10.1.1.1:/Knoppix rather than 192.168.0.1:/cdrom).
This has made no diference what so ever

I have also found that the miniroot.gz that comes with knoppix (and my test.gz that I took from the CD run terminal server) are in fact tiny liniux enviroments that are booted from vurtual floppy disks and mount the knoppix files (on CD and NFS respectivly) then hand controll over to Knoppix, so my idear with vurtual Floppies served through Memdisk is already built into the Knoppix system.

This however, still leaves me with the problem that the miniroot.gz can't mount anything from my NFS server, even though the fully booted Knoppix can. What I think is happening is that the kernel is expecting NFS version 3, and has no backwards compatablity to mount version 2 untill the rest of system is booted. The SMB version (from http://knoppix.manty.net/) also encounters a similar problem, but it can't mount the SMB share becuse it requires authentication, even though I pass it a username and password as such:
Code:

//user:pass@10.1.1.1/KNOPPIX/
which, once again works once the main system has started.

royceH 12-11-2006 03:35 PM

On a side note I have never compiled my kernel nor kernel modules, however the file that apears to be causing the problem is NFS.ko (the NFS kernel module that comes with Knoppix).
I have no idear what so ever how to go about compiling a new NFS.ko with version 2 backwards compatablity. If anyone knows if there is a precompiled one for the knoppix 4.0 kernel (2.6.4 I think) avalible for download, that would help emensly

royceH 12-11-2006 05:34 PM

If I boot up with the samba minirt, and get dropped into the limited shell, I did wonder if attempting mount the share would give me the information that I need to work this out. So, entering the command:
Code:

mount -t cifs //user:Pass@10.1.1.1/knoppix /tmp
or
mount -t cifs //10.1.1.1/knoppix /tmp

gives the error "CIF VFS: cifs_mount failed with return code = -22"
also, changing this to
Code:

mount -t cifs //10.1.1.1/knoppix /tmp -o user=user,pass=pass
returns "mount: Unknown option 'user=user' ignored"

A quick google reveils that return code -22 indicates that the user authentication through the domain controller has failed, and the option user=<user> is widly accepted as being completly fail safe.

eendoe 12-13-2006 12:50 AM

Another suggestion
 
I remembered when I set this up that the nfs exports needs to be called /cdrom
(must be hardcoded into the boot images for later use).


Go back a few steps and change your export to /cdrom and see if this helps (I also did not use secure option for initrd)



Good Luck

royceH 12-13-2006 03:31 PM

A wondorusly simpile somution to a diobolicaly dificult problem!
Pity it dosnn't work. Changing the nfs share to 10.1.1.1:/cdrom made no diference:
Code:

mount -t nfs 10.1.1.1:/cdrom/ /mnt/
mount -t nfs 10.1.1.1:/cdrom /mnt/
and
mount -t nfs wibblewibbleIamatree /mnt/

all produce the error "NFS_read_super: missing data argument". After I discovered that last one, I tryed unpluging the network, and repetting which produced identical results. What ever the problem is, it's centered around the PXE or the kernel/intrid served by the PXE not driving the network correctly. I tryed again on another machine (admitedly they where both HPs) witch did exactly the same thing. Is there an issue here with knoppix 4.0 or with it's kernel? should I be using 5.0? or an earlyer version?
:cry:

royceH 12-13-2006 04:17 PM

I fnialy worked out what the korean site was saying to do to the /etc/exports file: add "/cdrom access = mount" to the bottom. After I tryed this without success, I turned my attention to the initrd file. If this was built at setup, and one of the options was to set what network cards to probe for, what if I set it up to probe for every single card it could, that would work wouldn't it? No. And neither would using the misteriously appearing kernel, referenced in the pxeconfig file, produced when the intrid file was generated.

royceH 12-13-2006 04:26 PM

I have just spotted somthing that cheared me up. Go to the korean link above (http://translate.google.com/translat...ial_s%26sa%3DN)
and click on "FAQ" in the menu up the top. There's only the one FAQ, check out question number one on it. Makes you wonder just what the koreans are using their embedded linux for exactly :D

royceH 12-13-2006 05:01 PM

So much for my theory that the smb/cifs version just wasn't authenticating properly. I set up a share on a machine outside the domain (in a workgroup) but the intrid system won't pick that up ether. Inside the limited shell I'm still getting the return code -22 error, and I can still mount it without dificulty if I boot from CD.
I have now decided to try downloading and burning Knoppix 3.9 and 5.0 to see if this problem is a bug in this particular version.

royceH 12-14-2006 04:58 PM

Right, downloaded knoppix 5 ISO. Built kernel, intrid, and PXE config files with all of the network probes. Copied them all to NFS server, along with all the files from new ISO which the NFS server shares as 10.1.1.1:/cdrom . Updated PXE server config to match the config from KNOPPIX server as closly as posible. Booted to PXE.


...


The machine still won't automaticaly mount the NFS share, nor the SMB/CIFS share using the smb intrid for knoppix 5.0 . I did try doing it manualy and I thought I had something, becuse there where no errors! But it haddn't actualy done anything, and "mount -t nfs wibble wibble" didn't throw any errors either.

Honestly, this should be a no brainer. Its starting to piss me off.

eendoe 12-15-2006 12:50 AM

More help
 
Your a persistent bugger aren't you.

Here is a little bit more info on my process.

1. Boot Knoppix CD
2. Run the PXE configurator
3. Make sure you select the correct nic drivers for etherboot.nbi boot image
4. mkdir /cdrom (on your permanent NFS server)
5. cp -rf /mnt/cdrom NFSSERVER:/cdrom (only really need KNOPPIX/KNOPPIX)
6. move /tftpboot files to alternate server (TFTP server) if neccissary
7. change any ip's in /tftpboot/pxelinux.cfg/default if neccissary


That's all I needed to get this baby running.

Reasons for Cant moun't NFS server error;

1. client did not recieve ip / has incorrect ip
2. nfs mount are not exported (exportfs -a)
3. paths are wrong
4. permissions are wrong (unlikely)
5. remote chance you NIC is buggy because that tulip module has been around for eternity.


Again,


Good Luck


You persistent sod you . . . . . . . .

royceH 12-17-2006 02:04 PM

1. Boot Knoppix CD
check
2. Run the PXE configurator
check, repeatedly
3. Make sure you select the correct nic drivers for etherboot.nbi boot image
check, cross out, check again, black out with vivid
4. mkdir /cdrom (on your permanent NFS server)
check (although I did this from the server)
5. cp -rf /mnt/cdrom NFSSERVER:/cdrom (only really need KNOPPIX/KNOPPIX)
check (as above)
6. move /tftpboot files to alternate server (TFTP server) if neccissary
Is it necasary that the TFTP server be a different machine? I have one server that does every thing. Oh, check
7. change any ip's in /tftpboot/pxelinux.cfg/default if neccissary
check, check again, and again ....

Reasons for Cant moun't NFS server error;

1. client did not recieve ip / has incorrect ip
This is a distinct possibility that I hadn't thought of.
2. nfs mount are not exported (exportfs -a)
check, repeatedly
3. paths are wrong
check, if they where wrong I wouldn't be able to mount after KDE starts either.
4. permissions are wrong (unlikely)
This is the last thing I want to check considering it's running on Cygwin.
5. remote chance you NIC is buggy because that tulip module has been around for eternity.
Check, runs super smooth once KDE is up, or through DSL server straight from PXE. Also the same problem happens with another laptop.

I will look into the possibility of no IP (dam windows DHCP server) but I seem to vaguely remember passing a static IP to it early in this drama. And also permisions, which is not something I relish: windows permisions, two sets of linux permisions, all saying different things, yay!

And yes, I am a persistent bugger. It's a suvival trait in heterogeneous networks, along with resistance to insanity, having a high mental pain theshhold, and speaking the same language as the rabid monkey gods that appear when you haven't had enough sleep.

eendoe 12-17-2006 03:28 PM

ip issues
 
Yes, if your pxe client has two nics I have seen them load PXE from nic 1 then when knoppix boots it runs off nic 2 etc.

This can be a bitch if client has two nics and want dhcp.


Props

royceH 12-18-2006 02:42 PM

I haven't had a chance to try this yet, but unless wireless, bluetooth or firewire count as "NICs" it's only got the one.

Also, NFS server is quite slow. Is it posible that this is timing out?

royceH 12-18-2006 04:52 PM

I have now tryed it with the "IPAPPEND 1" pxelinux option that is supposed to pass on the IP address to its booted linux. Nothing. The DHCP server is acnologing its request for an IP, and is giving it 10.1.1.35 if I ping this while knoppix is in its limited shell then it dosen't respond.

The samba variant, I discovered has the "ifconfig" command avalible (thanks to the cif pakage I think). It reports that the only IP address the the machine has is 127.0.0.1 on the loopback device, and there is no mention of eth0. It may be posible to bring up eth0 from the limited shell, but I'm having difcultys so far.

So, finaly the problem is identifyed: the PXE client has no IP. Now all I need is a solution.

eendoe 12-19-2006 04:33 AM

ip issues
 
allright your almost home and hosed.


don't think bluetooth will be treated as an interface but many distro's treat firewall as an interface.


anyways you are right to sniff around the append options for vmlinuz, try here;

http://www.linux.com/howtos/NFS-Root-4.shtml

something like this should let you manually latch onto device names and try some others (eth0, eth1 etc.)

royceH 12-19-2006 02:20 PM

I seem to remember doing somthing verry similar to this
Code:

ip=<client-IP-number>::<gateway-IP-number>:<netmask>:<client-hostname>:eth0:off
But without the hostname or network device

Also, inside the limited shell brining eth0 into existance is so dam dificult becuse modprobe is missing, so I can't just type "modprobe tulip"

Have added
Code:

ip=10.1.1.35::10.1.1.250:255.255.255.0:KNOP_35:eth0:off
to the append line and will post back with what it does.

royceH 12-19-2006 02:59 PM

this IP force does nothing.
I'm now running with the device driver not working as when I issue the command :
"ifconfig eth0 up"
I get the error:
"eth0: ERROR while getting Interface flags: no such device"
most of the stuff I've found on google suggests using "modprobe <driver>" to bring the eth0 device into existance, but I don't have the modprobe command. Is ther any other way of doing this?

royceH 12-21-2006 01:28 PM

I suppose I could remaster the intrid file so that it has the modprobe command. is it a straght binary or shell script? or would this be a bit more involved?


All times are GMT -5. The time now is 11:40 AM.