LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2012, 09:43 AM   #1
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Rep: Reputation: 9
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.
 
Old 02-22-2012, 10:28 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 02-22-2012, 10:49 AM   #3
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Original Poster
Rep: Reputation: 9
i tried booting fedora 15 kernel and initrd it shows errors after loading
pxelinux.cfg/default
label linux
kernel vmlinuz
initrd initramfs.img
 
Old 02-22-2012, 11:58 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

Last edited by theNbomr; 02-22-2012 at 12:01 PM.
 
1 members found this post helpful.
Old 02-22-2012, 04:20 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,873

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
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.
 
1 members found this post helpful.
Old 02-22-2012, 06:13 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 02-29-2012, 11:04 AM   #7
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Original Poster
Rep: Reputation: 9
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 ?
 
Old 02-29-2012, 12:09 PM   #8
rokytnji
LQ 5k Club
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 17 , ChromeOS
Posts: 5,114
Blog Entries: 20

Rep: Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381
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.
 
Old 02-29-2012, 12:53 PM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
1 members found this post helpful.
Old 03-01-2012, 11:47 AM   #10
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Original Poster
Rep: Reputation: 9
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pxe boot "PXE-T01 file not found" ssharma_02 Linux - Networking 16 05-18-2011 03:21 PM
[SOLVED] linux pxe boot installation divyashree Linux - Newbie 2 11-15-2010 02:26 AM
Linux PXE Boot Server neo571 Linux - Networking 1 01-24-2009 08:44 AM
NFS/PXE Boot on Linux Kernel kushalkoolwal Linux - Kernel 3 02-05-2008 05:46 PM
Linux PXE boot from windows Stanley_Gibson Linux - Networking 0 09-14-2004 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration