Re: Grub Reinstall Problem!!!

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It would appear that on Jun 1, Phil Schaffner did say:

> On Tue, 2004-06-01 at 01:41 -0400, Joe(theWordy)Philbrook wrote:
> ... snip ...
> > 
> > With grub, if I make a working boot floppy with "grub-install  /dev/fd0"
> > then the one I had in /dev/hda is broken (infinte loop of the word grub
> > being printed to the screen)  If I boot from the floppy and do a 
> > "grub-install  /dev/hda" The mbr can boot again, but now the grub floppy
> > boot is broke...
> > 
> > 1) is it possible to install the same grub to start from the mbr OR from
> > a floppy depending on which bios finds first?
> 
> That's the way is should work.
> 
> Seems grub-install does cause such problems.  Doing it interactively MAY
> help.  IIRC goes something like this if /boot is on /dev/hda3.
> 
> # grub
> grub> root (hd0,2)
> grub> setup (hd0)
> 
> The attached script will create DOS format GRUB floppy with a copy of
> your current menu that can then be mounted and edited to customize.

The script don't work for me... but:
# grub
grub> root (hd1,3)
grub> setup (hd0)
grub> setup (fd0)

did!

About the script, I scanned it with f-prot, looked it over and while some
of it is beyond my scripting skills, I could see that the only dangerous
commands (rm -rf) were pointed at /tmp/something...

So I saved it, moved it to /root/bin [chown & chmod] and attempted to
get it to work...

[root@localhost bin]# ls -l mkgrubmenu
- -rwx------  1 root jtwdyp 2442 Jun  1 13:17 mkgrubmenu
[root@localhost bin]# ./mkgrubmenu -v --device /dev/fd0
: bad interpreter: No such file or directory
[root@localhost bin]# . mkgrubmenu -v --device /dev/fd0
: command not found
': not a valid identifier
: command not found
': not a valid identifier
: command not found
: command not found
'bash: mkgrubmenu: line 19: syntax error near unexpected token `{
'bash: mkgrubmenu: line 19: `usage () {
[root@localhost bin]#

But that's ok, the interactive grub commands worked... grub runs with or
without that floppy.

> > [root@localhost jtwdyp]# fdisk -l /dev/hda /dev/hdc
> > 
> > Disk /dev/hda: 40.0 GB, 40020664320 bytes
> > 255 heads, 63 sectors/track, 4865 cylinders
> > Units = cylinders of 16065 * 512 = 8225280 bytes
> > 
> >    Device Boot      Start         End      Blocks   Id  System
> > /dev/hda1   *           1         638     5124703+   c  W95 FAT32 (LBA)
> > /dev/hda2             639        1217     4650817+   f  W95 Ext'd (LBA)
> > /dev/hda3            1218        3162    15623212+  83  Linux
> > /dev/hda4            3163        4865    13679347+  83  Linux
> > /dev/hda5             639        1021     3076416    b  W95 FAT32
> > /dev/hda6            1022        1148     1020096   83  Linux
> > /dev/hda7            1149        1217      554211   82  Linux swap
> > 
> 
> The above looks very strange.  The # of blocks in the extended partition
> should be the sum of all those below it.

Yup there were once a few funky things tried...

Command (m for help): v
248 unallocated sectors

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): p

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders, total 78165360 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *          63    10249469     5124703+   c  W95 FAT32 (LBA)
/dev/hda2        10249470    19551104     4650817+   f  W95 Ext'd (LBA)
/dev/hda3        19551105    50797529    15623212+  83  Linux
/dev/hda4        50797530    78156224    13679347+  83  Linux
/dev/hda5        10249533    16402364     3076416    b  W95 FAT32
/dev/hda6        16402428    18442619     1020096   83  Linux
/dev/hda7        18442683    19551104      554211   82  Linux swap

Command (m for help):

But since the only thing grub isn't getting it on the other harddrive, I
don't see it as a problem.

> 
> 
> Getting BIOS and GRUB to agree is a bit tricky.
> 
> Phil
> 
> P.S.  Have you tried the GRUB "map" command on your DR-DOS problem to
> fool it into thinking it's on the first disk?  Perhaps:
> 
> title DR-DOS on hdc
>         map (hd0) (hd1)
>         map (hd1) (hd0)
>         rootnoverify (hd1,0)
>         chainloader +1
> 
> Might also need "makeactive" after "rootnoverify".
> 
> 
this grub.conf entry

title DrDos
        map (hd0) (hd1)
        map (hd1) (hd0)
        rootnoverify (hd1,0)
        makeactive
        chainloader +1

doesn't work... Yet this lilo.conf entry

other=/dev/hdc1
        label="DrDos"
        table=/dev/hdc
        map-drive=0x80
           to=0x81
        map-drive=0x81
           to=0x80

does work???

# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda
(hd1)     /dev/hdc

To be fair, grub does try to boot DrDos... Which gets far enough to say
it's starting before it locks up...

When I use the lilo boot, DrDos loads completely and runs under the
belief that /dev/hdc1 is C:

Hmmnnn I wonder, since lilo CAN boot DrDos, I wonder if I installed a
normally useless copy of lilo to hdc (lilo -b /dev/hdc) Would I be able
to add that lilo to the menu of the grub setup in (hd0)???

If so, is there a good how-to you could point me at?

- -- 
|      ?           ?		
|			
|        -=-   -=-	 I'm NOT clueless...    	
|        <?>   <?>    	But I just don't know.  	
|            ^          Joe (theWordy) Philbrook           
|           ---  	     J(tWdy)P
|			  <jtwdyp@xxxxxxxx> 
|      ?           ?		


   ##############################################################
   # You can find my public gpg key at http://pgpkeys.mit.edu/  #
   ##############################################################

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAvMrtRZ/61mwhY94RAt3dAJ9a1pp1IsEFRYeLFrNHskt7meH6YACghm2+
/U+zbq4JrLxO5kdbqwWyMbQ=
=Gent
-----END PGP SIGNATURE-----



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux