help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PXE failure, alway enter rescue mode


From: Cheng
Subject: Re: PXE failure, alway enter rescue mode
Date: Fri, 11 Feb 2011 20:15:47 -0500

Sorry, there is a typo. The directory should be /tftpboot.



On Feb 11, 2011, at 18:32, "Rob Shelley" <address@hidden> wrote:

> Alright, so I'm confused.  You say your directory structure is /tftpd, but 
> the tftp server is pointed to /tftpboot.  I'm going to assume that you meant 
> /tftpboot instead of /tftpd.  I don't see any issues with the xinetd config 
> for tftp.  It says that the tftp server is running as root, which tells me 
> that the problem is more likely a file system issue, and not a permission 
> issue.  But, to be thorough, do an 'ls -l /tftpboot'.
> 
> The log file does indeed show that there doesn't seem to be any issues 
> accessing normal.mod.  But, you've truncated the messages; is there an error 
> accessing another file immediately following what you've posted?  If nothing 
> is showing up in the log files you may need to increase the verboseness of 
> tftpd, or use a packet sniffer to find out what's really going on.
> 
> I used pretty much the same command line you did.  I don't believe there's an 
> issue there though.  Obviously the client is able to get the grub pxe boot 
> file (xinu105.boot) and load it, or you wouldn't be getting the grub rescue 
> prompt.  It seems more like the files aren't complete in the 
> /tftpboot/boot/grub/ directory.  It would be helpful to have a more complete 
> listing from the log file to diagnose the problem.
> 
> Rob
> 
> 
> -----Original Message-----
> From: Cheng Cheng [mailto:address@hidden 
> Sent: Friday, February 11, 2011 1:48 PM
> To: #IS Department
> Cc: address@hidden
> Subject: Re: PXE failure, alway enter rescue mode
> 
> Hi Rob,
> 
> I run tftpd-hpa as daemon, the configuration file in /etc/xinetd.d/tftp is 
> like that:
> **************************************
> # TFTP configuration
> service tftp
> {
>        socket_type = dgram
>        protocol = udp
>        port = 69
>        wait = yes
>        user = root
>        server = /usr/sbin/in.tftpd
>        server_args = -s /tftpboot
>        disable = no
> }
> **************************************
> 
> My directory structure is like that:
> **************************
> /tftpd
> ----/boot
> --------/grub
> ------------*.mod
> ------------*.lst
> ----xinu105.boot
> ***************************
> 
> When I try to use PXE to boot a machine, the machine enters rescue mode. 
> *****************************************
> Welcome to GRUB!
> 
> error: file not found.
> Entering rescue mode...
> grub rescue>
> ******************************************
> 
> But the log in /var/log/daemon.log shows that:
> ************************************************************************
> Feb 11 10:34:27 server tftpd[4924]: tftpd: trying to get file: xinu105.boot
> Feb 11 10:34:27 server tftpd[4924]: tftpd: serving file from /tftpboot
> Feb 11 10:34:27 server tftpd[4926]: tftpd: trying to get file: xinu105.boot
> Feb 11 10:34:27 server tftpd[4926]: tftpd: serving file from /tftpboot
> Feb 11 10:34:27 server tftpd[4928]: tftpd: trying to get file: 
> /boot/grub/normal.mod
> Feb 11 10:34:27 server tftpd[4928]: tftpd: serving file from /tftpboot
> *************************************************************************
> 
> However, when I test the TFTP Server, I type (on the same machine that use 
> PXE boot): 
> ******************************************************************
> $: tftp -v 192.168.2.50 -c get /boot/grub/normal.mod
> Connected to 192.168.2.50 (192.168.2.50), port 69
> getting from 192.168.2.50:/boot/grub/normal.mod to normal.mod[netascii]
> Received 42263 bytes in 0.2 seconds [1545265 bit/s]
> ******************************************************************
> And the log shows that:
> **************************************************************************
> Feb 11 10:40:24 server tftpd[4980]: tftpd: trying to get file: 
> /boot/grub/normal.mod
> Feb 11 10:40:24 server tftpd[4980]: tftpd: serving file from /tftpboot
> **************************************************************************
> 
> 
> It seems grub can send the correct request to the server and the server 
> responses correctly. But I do not know why grub still say "file not found".
> 
> Can you send me your command to generate your pxe-image and a sample of your 
> pxe-image?
> 
> Thanks a lot!
> 
> Cheng
> 
> 
> ----- Original Message -----
> From: "#IS Department" <address@hidden>
> To: address@hidden
> Sent: Friday, February 11, 2011 12:29:29 PM
> Subject: RE: PXE failure, alway enter rescue mode
> 
> Can you post the log and a list of your directory structure?  If the
> prefix really is (pxe)/boot/grub then grub will look for
> (pxe)/boot/grub/normal.mod and there should be a request in the tftp log
> for /boot/grub/normal.mod which corresponds to
> <wherever_your_tftpboot_is>/boot/grub/normal.mod on the local
> filesystem.  For Ubuntu 10.10 the default folder for tftp-hpa is
> /var/lib/tftpboot, so all your grub files should be under
> /var/lib/tftpboot/boot/grub/.  Based on what you said, it's looking for
> /normal.mod which would correspond to /var/lib/tftpboot/normal.mod,
> which I'm guessing isn't there, hence the error message.  I don't
> believe that it would have gone into rescue mode if it had actually been
> able to access normal.mod.
> 
> The default configuration for tftp-hpa under Ubuntu 10.10 should be
> sufficient to get pxe booting set up and running.  Depending on what
> your end goal is you may have to tweak the settings from there.  The
> permissions need to be at least read (and execute for directories) for
> whatever user tftp is running as.  For Ubuntu 10.10 the default is to
> run as tftp, so make sure the tftp user has sufficient permissions.
> 
> I'm not using grub 1.99rc1.  My distro was using grub legacy, so I tried
> compiling grub 1.98 from source first.  It worked, so there was no
> reason for me to run the release candidate.
> 
> Rob
> 
> 
> -----Original Message-----
> From: Cheng Cheng [mailto:address@hidden 
> Sent: Thursday, February 10, 2011 10:00 PM
> To: #IS Department
> Subject: Re: PXE failure, alway enter rescue mode
> 
> Hi Rob,
> 
> I really really appreciate your reply. -:)
> 
> I use ubuntu 10.10 and tftpd-hpa as my TFTP server, and I turned on the
> logging.  And the log show that grub has already download the module it
> needs(normal). But I found the file name grub used is strange. There is
> a "/" before the actual file name. For example, if I want to load
> normal.mod, the log will shows: trying to get /normal.mod, which will
> lead to fail. I do not know how to configure the TFTP to make both
> /normal.mod and normal.mod work.
> 
> Can you send me your configuration file for TFTP, along with the
> commands that you set up the privilege of "tftpboot" folder? And, do you
> currently use 1.99rc1?
> 
> Thanks a lot!
> 
> Looking forward your rely. 
> 
> Regards,
> Cheng
> 
> 
> 
> ----- Original Message -----
> From: "#IS Department" <address@hidden>
> To: address@hidden
> Sent: Thursday, February 10, 2011 7:03:25 PM
> Subject: RE: PXE failure, alway enter rescue mode
> 
> The prefix looks fine to me (I used an identical command line for my
> working setup).  My guess is the tftp server directory isn't set up
> correctly.  I suggest you turn on logging (if your tftp server supports
> it) to find out exactly what file is being looked for, and compare that
> to the actual directory structure.  If your tftp server doesn't support
> logging, then use a packet sniffer to see why the specified file is not
> found.
> 
> Rob
> 
> 
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of Cheng
> Cheng
> Sent: Friday, February 04, 2011 8:43 PM
> To: address@hidden
> Subject: PXE failure, alway enter rescue mode
> 
> Hi all, 
> 
> I want to use PXE to boot GRUB. And I already have grub1.99rc1 on my
> computer.
> 
> The command I used to produce the pxe image is:
>   grub-mkimage --fromat=i386-pc-pxe --prefix='(pxe)/boot/grub'
> --output=pxe.boot pxe pxecmd
> 
> But every time, I can only enter rescue mode. The error shows "file not
> found"
> 
> I think this is because the prefix has some problem, and grub cannot
> resolve the path on tftp.
> 
> Can anyone tell me how to correctly set the prefix? I would really
> appreciate it.
> 
> Cheng
> 
> _______________________________________________
> Help-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-grub
> 
> 
> _______________________________________________
> Help-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-grub
> 
> 
> _______________________________________________
> Help-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-grub
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]