LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 14.1 (Kernel panic) PXE + DHCP + NFS (http://www.linuxquestions.org/questions/slackware-14/slackware-14-1-kernel-panic-pxe-dhcp-nfs-4175498995/)

xbrasilx 03-21-2014 12:10 PM

Slackware 14.1 (Kernel panic) PXE + DHCP + NFS
 
Hi guys,
i am a brazilian user of slackware since longe time ago.
This days i try to figure out a way to start a diskless Slackware 14.1 client from a PXE + DHCP + NFS, without success. I can do this using a specific old 2.6 kernel, but in Slackware 14.1, i can’t figure out a way.

My PXE config sounds like:
DEFAULT pxelinux.cfg/vmlinuz-2.6 ip=dhcp root=/dev/nfs nfsroot=192.168.0.80:/tftpboot/specific-distro vga=791 init=/etc/rc.d/rc.S quiet rw

So if i change the old specific kernel (vmlinuz-2.6) to the new one Slackware 14.1 kernel (vmlinuz-huge-3.10.17) on PXE server, clients cant start due to a kernel panic error.

In Slackware 14.1 i will need a initrd/ramdisk?

Using the old “vmlinuz-2.6″ i dont need any extra initrd/ramdisk, just the kernel.

Any possible solutions to this?

Thanks to you attention and sorry to my bad english.

Richard Cranium 03-21-2014 09:28 PM

Hard for me to help without more information about the kernel panic. The one time that I had set this up was to do the install over the network to a machine that didn't have a working CD-ROM drive.

xbrasilx 03-22-2014 01:45 AM

Quote:

Originally Posted by Richard Cranium (Post 5139066)
Hard for me to help without more information about the kernel panic. The one time that I had set this up was to do the install over the network to a machine that didn't have a working CD-ROM drive.

If you need more details i can provide them to you. Just talk me what you need and i will do. Need to solve this, i am trying since 4 days ago. :(

Please help me with this.

Nh3xus 03-22-2014 10:06 AM

Hi,

You might need both NFS and TFTP services enabled and configured in order to achieve this project.

The last time that I tried booting a LiveCD over the network, I forgot the NFS part for example.

xbrasilx 03-22-2014 04:07 PM

Quote:

Originally Posted by Nh3xus (Post 5139282)
Hi,

You might need both NFS and TFTP services enabled and configured in order to achieve this project.

The last time that I tried booting a LiveCD over the network, I forgot the NFS part for example.

All configuration part are correct. PXE, DHCP and NFS are correct. If i use the old kernel (like i said before), clients can boot normal from network. When i try to the new one Slackware 14.1 kernel (3.10.17), clients have a error.

So, if i use "vmlinuz-2.6" all is ok, if i change to the "bzImage-3.10-17", have a error. And yes, i put the correct name in the config file.

Someone can help me with this?

Richard Cranium 03-22-2014 06:45 PM

Please provide the error that you see.

xbrasilx 03-22-2014 07:57 PM

2 Attachment(s)
Quote:

Originally Posted by Richard Cranium (Post 5139528)
Please provide the error that you see.

1) - Using PXE config (default) with the "vmlinuz-2.6" kernel, the client can successful boot from network (image1.png)

/tftpboot/pxelinux.cfg# ls -la
total 12276
drwxrwxrwx 2 1000 users 4096 Mar 22 21:36 ./
drwxrwxrwx 11 root root 4096 Apr 21 2010 ../
-rwxrwxrwx 1 root root 135 Sep 3 2008 default*
-rwxrwxrwx 1 root root 3278832 Jan 3 2008 vmlinuz-2.6*
-rwxrwxrwx 1 root root 3278832 Oct 12 2007 vmlinuz-2.6.21*
-rwxrwxrwx 1 root root 5995104 Oct 23 20:47 vmlinuz-huge-3.10.17*

/tftpboot/pxelinux.cfg# cat default
DEFAULT pxelinux.cfg/vmlinuz-2.6 ip=dhcp root=/dev/nfs nfsroot=192.168.0.80:/tftpboot/linux-distro vga=791 init=/etc/rc.d/rc.S quiet rw

---

2) - Using PXE config (default) with the "vmlinuz-huge-3.10.17" kernel, the client can't successful boot from network (image2.png)
/tftpboot/pxelinux.cfg# ls -la
total 12276
drwxrwxrwx 2 1000 users 4096 Mar 22 21:36 ./
drwxrwxrwx 11 root root 4096 Apr 21 2010 ../
-rwxrwxrwx 1 root root 135 Sep 3 2008 default*
-rwxrwxrwx 1 root root 3278832 Jan 3 2008 vmlinuz-2.6*
-rwxrwxrwx 1 root root 3278832 Oct 12 2007 vmlinuz-2.6.21*
-rwxrwxrwx 1 root root 5995104 Oct 23 20:47 vmlinuz-huge-3.10.17*

/tftpboot/pxelinux.cfg# cat default
DEFAULT pxelinux.cfg/vmlinuz-huge-3.10.17 ip=dhcp root=/dev/nfs nfsroot=192.168.0.80:/tftpboot/linux-distro vga=791 init=/etc/rc.d/rc.S quiet rw

---

I read some documents and some of this make reference to a special initrd when using new kernels. This is true?
Why i can boot without any initrd using the old "vmlinuz-2.6"?
How can i use the new one kernel "vmlinuz-huge-3.10.17" in this PXE setup without erros?

Richard Cranium 03-23-2014 08:04 AM

CONFIG_NFS_ROOT does not appear to be compiled into the Slackware64 14.1 huge kernels. (It wasn't built into the 13.37's huge-2.6.37.6 kernel, either.)

You'll have to compile your own or create an initrd that does the NFS mount for you.

xbrasilx 03-23-2014 11:32 AM

Quote:

Originally Posted by Richard Cranium (Post 5139746)
CONFIG_NFS_ROOT does not appear to be compiled into the Slackware64 14.1 huge kernels. (It wasn't built into the 13.37's huge-2.6.37.6 kernel, either.)

You'll have to compile your own or create an initrd that does the NFS mount for you.

Richard, i think this is not a x64 version of kernel, this is a x32 version. But anyway, this was the best information so far. I will try to compile the vmlinuz-huge-3.10.17 with CONFIG_NFS_ROOT enabled and configured. I will do this now!
I'll be back shortly with news.

xbrasilx 03-23-2014 05:43 PM

1 Attachment(s)
Quote:

Originally Posted by xbrasilx (Post 5139839)
Richard, i think this is not a x64 version of kernel, this is a x32 version. But anyway, this was the best information so far. I will try to compile the vmlinuz-huge-3.10.17 with CONFIG_NFS_ROOT enabled and configured. I will do this now!
I'll be back shortly with news.

Richard, after long time compiling the vmlinuz-huge-3.10.17, with CONFIG_NFS_ROOT=y actived, i have same error. See the image (image003.png).

below is the part of .config file used to compile the vmlinuz-huge-3.10.17 kernel:
---
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
CONFIG_NFS_ROOT=y
CONFIG_NFS_SWAP=y
# CONFIG_NFS_V4_1 is not set
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
---

Any trick to solve the problem?

xbrasilx 03-23-2014 06:35 PM

Reading some texts i discover that in the new kernels, the "CONFIG_NFS_ROOT" has changed to "CONFIG_ROOT_NFS". I will try it now. :)

Richard Cranium 03-23-2014 10:02 PM

Oops. My bad.

Sorry about that.

xbrasilx 03-24-2014 01:22 AM

Quote:

Originally Posted by Richard Cranium (Post 5140109)
Oops. My bad.

Sorry about that.

The problem was SOLVED, need to recompile the kernel with things like:

CONFIG_BLK_DEV_LOOP
Build in support for the cient 's network card (Network device support ---> Select your card driver).
Build in support for the BOOTP protocol (Networking options ---> IP: kernel level autoconfiguration ---> IP: BOOTP support).
Build in support for NFS and root over NFS (File systems ---> Network File Systems ---> NFS file system support and File systems ---> Network File Systems ---> NFS file system support ---> Root over NFS).
Build in support for loopback devices (Block devices ---> Loopback device support).
IP Kernel level Autoconfiguration

Thanks to all replys, i hope this can help other peoples with same problem.

linq 05-19-2014 07:37 AM

Exactly the same problem, but CONFIG_BLK_DEV_LOOP=y didn't help me. Here is the portion of my config:

CONFIG_BLK_DEV_LOOP=y
CONFIG_VIA_RHINE=y
CONFIG_IP_PNP_DHCP=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
# CONFIG_NFS_V4_1 is not set
CONFIG_ROOT_NFS=y

Could you post the complete config ?

linq 05-19-2014 10:47 AM

Wow ! It should be "root=/dev/nfs", not "root=/dev/nfsd" in kernel boot options (PXE). But it worked before !?
Anyway, no CONFIG_BLK_DEV_LOOP=y is required. The only 5 changes to config-huge-3.10.17 are:

Network Support - Network Options (* IP: kernel level autoconfiguration ; * IP: DHCP support)
Device Drivers - Network Device Support - Ethernet Driver support (* Via Rhine support) - my Ethernet adapter
File Systems - Network File Systems (* Root file system on NFS)


All times are GMT -5. The time now is 02:14 PM.