LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pxe boot linux (terminal) (https://www.linuxquestions.org/questions/linux-newbie-8/pxe-boot-linux-terminal-930697/)

ac_kumar 02-22-2012 09:43 AM

pxe boot linux (terminal)
 
I want to pxe boot clients into linux terminal so pxe clients boot into minimum linux.

I am having a pxe tftp dhcp server running.

Do i have to compile kernel and make root file system for it. If yes any simple tutorial on it.

theNbomr 02-22-2012 10:28 AM

You can use almost any existing kernel that runs on the target host. The root filesystem can be either an initrd, or an NFS share. To use an NFS share, the kernel must be built with NFS root capability. If you use an initrd, then the host can run entirely from the RAM filesytem, or can later mount some other filesystem and use that, or can pivot_root to the other filesystem.
I have used TinyCore Linux as the basis for an initrd filesystem. I mounted the ISO on a loop device, and the used the following command from the root of the mounted ISO:
Code:

# Must use root privileges to preserve file permisisons
su -c "find . | cpio -H newc -o | gzip -9 -n > ../myInitrd.gz"

I found that customizing the TinyCore initrd was fairly straighforward, and am presently using it to this day in just the manner that you requested. My original root filesystem was actually based on the now defunct MicroCore Linux, which it appears is now called simply 'Core'.

--- rod.

ac_kumar 02-22-2012 10:49 AM

i tried booting fedora 15 kernel and initrd it shows errors after loading
pxelinux.cfg/default
label linux
kernel vmlinuz
initrd initramfs.img

theNbomr 02-22-2012 11:58 AM

Are those errors a secret? We cannot help you without knowing what errors, and from where the errors were emitted. Please post your transcribed error messages in [CODE] [/CODE] tags.

It would be unsurprising for an initrd from an installed Fedora distro to work without errors. It is going to try to mount a disk filesystem, which I presume would not be present on your target host.

--- rod.

jefro 02-22-2012 04:20 PM

If all you need is a pxe client with command line then use memdisk and some floppy image.

How bad are these thin clients anyway?

Might look at the latest Thin station 5.0. I haven't had time to play with it. Generally I use knoppix on the host and start knoppix terminal server. About the most easy way to get a pxe system up. Most knoppix 3.x to 5.x works. I can't get 6.x to work for some reason but there are a few versions that just fail as known.

theNbomr 02-22-2012 06:13 PM

jefro, I don't think you should assume that the motivation for using a minimal Linux is simply that the hosts are too under powered to support a full-on desktop distro. There are lots of good reasons for not wanting anything other than the minimum amount of code to support an application. Not all Linux hosts even have 'users'. Or floppies, or any other media from which to boot.
--- rod.

ac_kumar 02-29-2012 11:04 AM

I have successfully booted diskless in virtual box as :
kernel bzImage
append init=/sbin/init root=/dev/nfs nfsroot=ip:/share/nfsroot ip=dhcp

it is working fine in virtual machine but when i tried it on actual system it is showing kernel sync error unable to mount VFS on unknown block.

Any one knows why is this happening ?

rokytnji 02-29-2012 12:09 PM

Don't know anything about pxe booting myself.

Check out http://vanilla.slitaz.org/index.php?...#Comment_11991

Since I am not skilled or knowledgeable myself with this, and if I am off base maybe. Just ignore if this does not help.

theNbomr 02-29-2012 12:53 PM

Does the kernel have a built-in driver for the NIC? Do you see DHCP requests arriving at the DHCP server (usually shows up in system log; /var/log/messages)? There should be two consecutive DHCP requests: one from the bootloader, and the second one from the kernel. Does the NFS server export the share to the particular IP that the PXE-boot client is assigned?
Is it the same kernel in each case? NFS-Root enabled in the kernel?

--- rod.

ac_kumar 03-01-2012 11:47 AM

I didn't see dhcp request on client so i added nic driver support in kernel, it worked fine.
Thanks all of you for help.


All times are GMT -5. The time now is 03:06 AM.