Re: Grub did not install on dual boot machine.

From: P Gentry (rdgentry1_at_cablelynx.com)
Date: 01/25/04


Date: 25 Jan 2004 12:27:49 -0800

linuxquestion@yahoo.com wrote in message news:<672ceaed.0401241906.5486eeb0@posting.google.com>...
> Well, after MUCH struggle, and MANY hours, I have
> finally discovered the secret, and got grub to work.
>
> When I first installed Suse, I used lilo, and it
> worked fine. So, today I thought that I would try
> installing Suse once again. Only this time, I used grub.
> Suse installed fine, and gave me a nice dual boot.
>
> But before installing Suse, I did notice with fdisk
> that the /boot and / partitions were FAT16!
>
> Device Boot Start End Blocks Id System
> /dev/hdb1 1 1959 15735636 c Win95 FAT32 (LBA)
> /dev/hdb2 * 1960 14593 101482605 f Win95 Ext'd (LBA)
> /dev/hdb5 1960 1972 104391 6 FAT16
> /dev/hdb6 1973 2625 5245191 6 FAT16
>
> Why? This made no sense. When I installed, I
> instructed Redhat to format the partitions as ext3.
> But they always showed up again as an unknown file type.
>
> Call me demanding, but I do expect that when I give the
> format command, and when it does proceed to format, that
> the partitions would in fact get formatted as ext3. But it
> must be too much to ask of the Redhat installer. I guess
> it's just there for a warm fuzzy feeling inside, so
> you can watch the taskbars slowly move across the screen
> as you waste your time.
>
> Originally, I had created the partitions with Windows
> Diskpart. It was very easy to use, and I knew that I
> wouldn't be destroying my Windows partitions with it.
> During the Redhat install, I would then assign the
> filesystem (/boot, etc.) Why the first two stayed as
> FAT16, and failed to format, but not the others, is
> beyond me.
>
> After Suse's installation worked, I then tried installing
> Redhat. This time I noticed that the partitions were
> actually linux partitions. The installation worked, grub
> got installed, and it worked. Ta Da!
>
> So, I would say that there is a problem with the
> Redhad Advanced Server installer. It doesn't format
> the partitions the way it says it does. Suse's
> installer worked fine, but Redhat's did not. Go figure.
>
> I must say, that Suse's Yast2 install is so much
> better than Redhat's. It formatted the partitions
> right. It had a nice GUI for configuring the partitions
> too. It gave a really good tool for configuring
> the boot loader, even allowing me to see the grub.conf
> file before proceeding. And it had all three grub
> commands required for grub to boot Windows on Dell.
> It took me a day to figure how to boot Windows with
> Redhat grub, which only inserted two lines in grub.conf.
>
> Suse probed my machine and found so much more that
> Redhat did. It configured the sound, ethernet, DHCP,
> printer, and the video card automatically. I could
> even test the graphic configuration before proceeding.
> When I rebooted, X windows came up cleanly.
>
> With Redhat, it took another number of days to figure
> out that the video, and ethernet were not even installed,
> and more hours to fix it.
>
> Too bad that Suse can't set some other fundamental
> things: the modem, memory and shmmax. It might make
> a good server.
>
> I started this fiasco on Jan. 16th, and it is now
> Jan. 24th. About 40 hours or more of my time wasted.
> Thanks for nothing Redhat.
>
You may have a point about RH installer. Not sure how well they flag
you with info about using pre-existing partitions.

Tried to get this to you earlier, but ...

Sorry for the late post -- now, I have the family cold!

I've snipped all the data from your last post (in response to mine).
If anyone is interested it can be found here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=facb01db.0401201342.3b67cbcb%40posting.google.com&rnum=6&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3Dauthor:rdgentry1%2540cablelynx.com%2B

Here is what I think has happened.

- you had some FAT16 partitions already on disk when you installed
Linux. The installer will happily re-use pre-existing partitions.
Otherwise, I'm not sure how you got partitions typed as FAT16.

- the type field in the partition table is not used by Linux at all.
It uses only the Sector Start and # of Sectors fields, ie., what disk
sectors are used by this partition.

- installation proceeded by making an ext3 _filesystem_ on these FAT16
typed partitions, ie., all the data structures, etc., that format an
ext3 _filesystem_.

- this left you with ext3 _filesystems_ in partitons _typed_ as FAT16.
 No matter, Linux does not use the partition table's type field.

- this is why you can mount/access these partitions _after_ you've
loaded the Linux kernel from the cd. /etc/fstab has the correct info
on how they are to be mounted by the kernel. You can confirm that
they are indeed mounted as ext3 by typing "mount" (no options) at the
prompt.

- GRUB, on the otherhand, has no means of "detecting" a filesystem
type beyond what info is available in the partition table's type
field. That is how it knows which Stage1.5 "filesystem" driver to
load. It reads FAT16 from partition table, loads fat_stage1_5 so it
can navigate the filesystem to find Stage2, but cannot succeed since
it is using the wrong Stage1.5 driver. (This is speculation -- have
not read source. It's a certainty, however, that Stage1 contains only
a _very_ simple means to detect which Stage1.5 to load -- MBR doesn't
allow for "tricks" with less than 512 bytes for all code!)

- therefore, you need to change the type field in the two FAT16
partitions that house your /boot and / partitions to ext3. This can
be done with sfdisk like this:

>From 'man sfdisk'for ?c or ??id number [Id] options:
... This option has the two very long forms --print-id and
--change-id. For example:
 [root]# sfdisk --print-id /dev/hdb 5
 6 <- tells that /dev/hdb5 has a partition Id of 6
 [root]# sfdisk --change-id /dev/hdb 5 83
 OK <- changes /dev/hdb5 to type 83 (Linux native)

Change 5 above to 6 to change the type field to ext3 (Linux native,
actually) on /dev/hdb6. Note that the sfdisk command has a space
between the device (/dev/hdb) and the partition # (5 or 6).

Here are some links that finally convinced me that I was on the right
track (with thanks to Michael Schwendt <ms-nospam-0306 arcor de> for
his insight/patience in the below):
Start of long thread:
http://www.redhat.com/archives/fedora-test-list/2003-October/thread.html#00338.html
The "good stuff":
http://www.redhat.com/archives/fedora-test-list/2003-October/msg00433.html
http://www.redhat.com/archives/fedora-test-list/2003-October/msg00436.html
http://www.redhat.com/archives/fedora-test-list/2003-October/msg00452.html
http://www.redhat.com/archives/fedora-test-list/2003-October/msg00474.html
http://www.redhat.com/archives/fedora-test-list/2003-October/msg00485.html

The only thing I noticed in your data was the sfdisk output which
shows every partition table taking up 63 sectors. Probabaly innocent,
but that happens to be what some disk overlay programs do. Did you
load a disk manager file (eg., E-Z Drive) when you installed your new
hd? If everything works OK from a cd boot, I don't think it matters.

Again, sorry for the late post. Hope this will get your setup working
the way you want.

regards
prg
email above disabled



Relevant Pages

  • RE: Help
    ... both OS's and you don't have a grub menu. ... In my case, the installer got ... it finds every OS that it can that are on your drives, ... even though no operating system exists on these partitions. ...
    (Ubuntu)
  • Re: Help
    ... both OS's and you don't have a grub menu. ... In my case, the installer got ... it finds every OS that it can that are on your drives, ... even though no operating system exists on these partitions. ...
    (Ubuntu)
  • Re: Grub did not install on dual boot machine.
    ... Only this time, I used grub. ... > But before installing Suse, ... > instructed Redhat to format the partitions as ext3. ... > must be too much to ask of the Redhat installer. ...
    (comp.os.linux.setup)
  • Re: Grub did not install on dual boot machine.
    ... Only this time, I used grub. ... > But before installing Suse, ... > instructed Redhat to format the partitions as ext3. ... > must be too much to ask of the Redhat installer. ...
    (comp.os.linux.misc)
  • Re: Debian Install problems
    ... The last time I touched linux ... I manually configured the partitions using the installer, ... how the swap space was not active. ...
    (Debian-User)