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

Re: GRUB 0.5.92 problem



On Sun, 8 Aug 1999, OKUJI Yoshinori wrote:

> From: Mark Lundeberg <aa026@pgfn.bc.ca>
> Subject: Re: GRUB 0.5.92 problem
> Date: Sat, 7 Aug 1999 18:34:52 -0700 (PDT)
> 
> > am having trouble with getting grub to use passwords. I type in the
> > correct password, but it gives me a "Failed!" message. I tried running the
> > simulator under gdb, and the password variable is correctly set to
> > "<my password> (hd0,1)/boot/grub/menup.lst"
> 
>   Thanks for your report. Can you try this patch?
> 
> --- grub-0.5.92.orig/stage2/stage2.c	Thu Jun 24 09:03:29 1999
> +++ grub-0.5.92/stage2/stage2.c	Sun Aug  8 12:37:09 1999
> @@ -377,6 +377,10 @@
>  
>  		  while (! isspace (*pptr))
>  		    pptr ++;
> +
> +		  /* terminate PASSWORD.  */
> +		  *pptr++ = 0;
> +		  
>  		  if (! strcmp (password, entered))
>  		    {
>  		      char *new_file = config_file;

That works for the first try at the password, but I'd hate to see what
happens if the user failed the password check and tried again. AFAIK,
isspace() doesn't return 1 for null chars, so change
	while (! isspace (*pptr))
to
	while (! isspace (*pptr) && *pptr)

> > Also, I am having trouble booting up other bootloaders off floppies from
> > grub (with chainloader command). I tried to boot up a grub boot disk from
> > the grub on my harddrive, and it gave me a Hard Disk Error when I typed in
> > boot. I tried to boot up my redhat install disk, and that didn't word
> > either. When I tried to boot up my master bootloader (lilo), from grub, it
> > worked fine, and lilo is able to boot these 2 floppies with no problems. 
> 
>   Your information is too ambiguous to understand what happened. We
> need to know what you did exactly.

Sorry, stupid me forgot to do root=(fd0)


Reply to: