LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 03-16-2008, 08:28 PM   #1
gfem
Member
 
Registered: Apr 2003
Distribution: Fedora
Posts: 126

Rep: Reputation: 15
pxe boot problem no root-path


I have creted a pxe boot image and it starts to boot, then gives the error no root-path defined. I have dnsmasq.conf setup on an openwrt router and I have figured out I have to use dhcp-option=17, Bu ti do not know the syntax. Can someone help me, or point me to an article. Below is my dnsmasq.conf

#pxeboot add in
dhcp-option=17,192.168.0.55:/linux-install/pxelinux.0 # root-path
# mtftp address to 0.0.0.0 for PXEClients
dhcp-option=vendor:PXEClient,1,0.0.0.0

# Set the boot filename and tftpd server name and address
# for BOOTP. You will only need this is you want to
# boot machines over the network.
dhcp-boot=/linux-install/pxelinux.0,boothost,192.168.0.55

thanks.

-Gregg
 
Old 03-17-2008, 02:38 PM   #2
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
For the dhcp options, you need to enclose the argument in quotes, i.e.
Code:
dhcp-option=17,"192.168.0.55:/linux-install/pxelinux.0"
However, the line above is wrong anyway. You should be pointing it at the root filesystem you're going to use. At the moment, it's pointing at the pxelinux.0 executable, which is wrong. What are you trying to set up? If it's an install server, then you won't need a root specification. If you're setting up a server for diskless clients, then you need to export the filesystem(s) via NFS, and that is what you would have as option 17.

Have a read through the pxelinux documentation, but the only option you'll need in dnsmasq.conf is the BOOTP specification of the file (pxelinux.0 in this case) to initially get via tftp. The rest of the config can be done in the pxelinux.cfg directory, which must (I think, you can probably set an option to change it) be in the toplevel directory accessible from tftp.

Here's my dnsmasq.conf which boots two different devices. The first is a dreambox, with NFS root filesystem (hence the dhcp option 17). The second is for a standard pxelinux style boot. The real config is in the /tftpboot/pxelinux.cfg/default config file. (asus is the nfs and tftp server)

Code:
dhcp-host=00:09:34:25:01:41,net:dreambox,192.168.1.105
dhcp-boot=net:dreambox,os,asus,192.168.1.137
dhcp-option=dreambox,17,"192.168.1.137:/usb/dreambox/rootfs,nolock"

dhcp-host=00:0c:29:14:b3:f8,net:testvm,192.168.1.110
dhcp-boot=net:testvm,pxelinux.0,asus,192.168.1.137
Good luck.
 
Old 03-18-2008, 02:18 PM   #3
gfem
Member
 
Registered: Apr 2003
Distribution: Fedora
Posts: 126

Original Poster
Rep: Reputation: 15
Thanks for the reply. I will try it tonight. I am trying to make a client boot as a mythfrontend. I think I will have to use the model you described below.

Code:
dhcp-host=00:09:34:25:01:41,net:dreambox,192.168.1.105
dhcp-boot=net:dreambox,os,asus,192.168.1.137
dhcp-option=dreambox,17,"192.168.1.137:/usb/dreambox/rootfs,nolock"
-Gregg
 
Old 03-18-2008, 03:11 PM   #4
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
Quote:
I am trying to make a client boot as a mythfrontend. I think I will have to use the model you described below.
The method for the dreambox works since 'os' is the kernel. It doesn;t require an initrd for the boot (everything is compiled into the kernel). This is unlikely to be the case for your mythtv machine's kernel. If I were you, I'd use pxelinux.

This is off the top of my head, but what you'll need to do is:
- Set up the tftp server (which you seem to have done already)
- Put the pxelinux.0, vmlinuz (mythtv kernel you want to boot), and initrd.img (the initrd image for the myth kernel) into the top level of the tftp directory (maybe rename vmlinuz and initrd.img to something useful, like myth-kernel and myth-initrd).
- Create a pxelinux.cfg directory in the top tftp directory (alongside pxelinux.0, vmlinuz, etc).
- Create a file called 'default' in the pxelinux.cfg directory. Put the following into this default file:
Code:
default mythtv
prompt 1
timeout 500
label mythtv
  kernel vmlinuz
  append initrd=initrd.img root=/dev/nfs nfsroot=<nfs_server_ip>:<nfs_rootfs_path>,nolock
- Set up the dnsmasq.conf file to:
Code:
dhcp-host=<mythclient-MAC>,net:mythbox,<myth-ip-address>
dhcp-boot=net:mythbox,pxelinux.0,<tftp-server-name>,<tftp-server-ip>
I reckon that should work.

Good luck
 
Old 03-20-2008, 12:33 PM   #5
gfem
Member
 
Registered: Apr 2003
Distribution: Fedora
Posts: 126

Original Poster
Rep: Reputation: 15
Thank you. I made some minor tweaks and it works. Had to tweak the initrd image as well. I changed root=/dev/ram0.
 
Old 03-20-2008, 12:51 PM   #6
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
Glad you got it working. Of course the root needs to be /dev/ram0, you're using an initrd for the first stage. My fault, I wasn't paying attention. Out of interest, what else needed changing for you. Maybe it'll help others in the future.
 
Old 03-22-2008, 01:43 PM   #7
gfem
Member
 
Registered: Apr 2003
Distribution: Fedora
Posts: 126

Original Poster
Rep: Reputation: 15
I spoke to soon. I had a usb drive pluged in and reset they system and walked away to let it do its thing. It did not boot from pxe. The error I get now is....
Mount.nfs:mount point /mnt/.snapshot does not exist
/init:line 392:/mnt/proc/sys/kernel-real-root-dev:No such file or directory
switch_root: can't open 'dev/console': No such file or directory
Kernel Panic!

I found a wiki and am following these directions..
http://www.mythtv.org/wiki/index.php..._2.6.22.2B_FC6
 
  


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 04:21 PM
nfs root path variable (pxe/nfs boot) freeindy Linux - Networking 3 03-11-2008 10:19 AM
Problem of root path while booting RH9 Linux Nishant Desai General 4 11-10-2006 11:18 AM
PXE boot problem asadarfeen Linux - Enterprise 2 08-30-2005 12:55 AM
How to modify the root path at boot time jayhel Slackware 3 08-27-2005 12:40 AM


All times are GMT -5. The time now is 06:15 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration