LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   yet another bootloader question (https://www.linuxquestions.org/questions/linux-general-1/yet-another-bootloader-question-421648/)

m_a_b 03-04-2006 03:42 PM

yet another bootloader question
 
So, I upgraded my hard drive in my 1.4 GHz P4 computer with a 300 GB HD a few months ago. I installed Windows XP immediately, but waited until this morning to install Linux. This time, I went with Suse 10. It installed beautifully through the 1st disk, but then when I restarted, it gave me an "Error 18" when Grub started. I read a few things (like disk size and LBA, using LILO instead, etc.) and tried them and nothing seemed to work. I finally gave up for the day and tried to recover the Windows MBR and apparently it is now corrupt, so that computer is dead in the water. The only way I can get it to boot is by using the Suse 10 installation program to detect the linux installation and tell it to boot into it. I also have a Mandrake 2006 LiveCD that I used to try "sudo /usr/sbin/grub-install /dev/hda", but it gave me an error about the disk.

From what I understand, if the bootloader is located far into the disk, then GRUb doesn't have support for larger drives - at least that is what I read. My disk structure, however, has the windows partition for the first 40 GB, then the data partition for the next 200 GB, then a 50 GB linux partition, and finally a 1 GB swap, so the linux files are at the very end of the disk.

So, my question is what can I do to fix this? Is there a way I can move the windows partition and put a boot partition before it at this point? Has anyone personally experienced this and worked through it?

bigrigdriver 03-04-2006 04:32 PM

I had the same problem when I upgraded from a 40 G to a 160 G drive. Installation went well, but I couldn't boot.

I forgot do do one important thing when I installed the drive. I forgot to edit the BIOS to tell it about the new disk!

You need three pieces of information from the decal on the back of the drive: cylinders, sectors, heads.

Edit the BIOS to add that information. In the same line, at the right end, change NORMAL to LBA. From that, the BIOS can determine the size of the drive.

Then grub should work without doing anything else.

m_a_b 03-04-2006 06:53 PM

I already tried changing the LBA Enable/Disable.

Remember, this drive has been running windows for about 3 months now. The BIOS automatically picked up everything about the drive, but just to make sure, I also tried setting it up manually today. Still, Grub gives the same error.

bigrigdriver 03-04-2006 07:35 PM

To get windows booting again, search these boards on how to fix the mbr using fixmbr, running from the windows installation cd.

I'd suggest starting the installation over. Create a small (15 to 20 M) boot partition immediately behind the xp partition. Then the data partition, followed by the Linux and swap partition. That would put grub in a more agreeable position on the drive.

m_a_b 03-04-2006 09:01 PM

is there a way to create the boot partition before the data partition without disturbing the data partition? The data partition is already there and has about 4 gb of data on it. My feeble attempt seemed to always put it after the data partition.

syg00 03-04-2006 10:41 PM

Quote:

Originally Posted by m_a_b
I finally gave up for the day and tried to recover the Windows MBR and apparently it is now corrupt, so that computer is dead in the water.

Mmmmm - does this mean you used fixmbr ???.
What error messages do you get ???.
Quote:

I also have a Mandrake 2006 LiveCD that I used to try "sudo /usr/sbin/grub-install /dev/hda", but it gave me an error about the disk.
Message ???.

I don't know of grub having an issue with big disks, so long as the geometry data is correct.
From one of your linux liveCDs, run this and post the output (parm is ell, as in list)
Code:

fdsik -l

m_a_b 03-05-2006 03:14 PM

Quote:

Originally Posted by syg00
Mmmmm - does this mean you used fixmbr ???.
What error messages do you get ???.Message ???.

Yes, I used fixmbr, bootcfg, and fixboot. I received no error messages. Everything was successful except when I try to start the computer, if just gives me a black screen and nothing happens.

Quote:

I don't know of grub having an issue with big disks, so long as the geometry data is correct.
From one of your linux liveCDs, run this and post the output (parm is ell, as in list)
Code:

fdsik -l

Code:

Disk /dev/hda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1              1        5099    40957686    7  HPFS/NTFS
/dev/hda2  *        5100      38912  271602922+  f  W95 Ext'd (LBA)
/dev/hda5            5100      32123  217062216+  7  HPFS/NTFS


syg00 03-05-2006 05:18 PM

?????.
No Linux partitions shown there. Seen several posts about Suse 10 and bootloader/partition problems - I wouldn't use it personally.

To fix your problem, use fdisk to take the boot flag off hda2, and put it on hda1. Ain't right, and doesn't make a lick of sense to have it on the extended.

m_a_b 03-05-2006 05:36 PM

hehe, yeah, there is no linux partition anymore. I was deleted the partitions to try to get fixmbr to work right. How do I use fdisk to change the boot partition? I can't figure out why it is there unless fixmbr put it there...

syg00 03-05-2006 05:48 PM

From Linux, "fdisk /dev/hda", then follow the prompts.
"m" gives you all the (sub)commands available. Use "p" to list the partitions, "a" to change the boot flag.
"w" writes updates back to disk, "q" quits.

m_a_b 03-06-2006 06:19 PM

thanks, Syg00, that got WinXP back to me. Maybe I should go back to Mandrake... ;)


All times are GMT -5. The time now is 05:29 AM.