LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-04-2006, 03:42 PM   #1
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Rep: Reputation: 15
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?
 
Old 03-04-2006, 04:32 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 03-04-2006, 06:53 PM   #3
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
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.
 
Old 03-04-2006, 07:35 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 03-04-2006, 09:01 PM   #5
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
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.
 
Old 03-04-2006, 10:41 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
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
 
Old 03-05-2006, 03:14 PM   #7
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
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
 
Old 03-05-2006, 05:18 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
?????.
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.
 
Old 03-05-2006, 05:36 PM   #9
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
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...
 
Old 03-05-2006, 05:48 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
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.
 
Old 03-06-2006, 06:19 PM   #11
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
thanks, Syg00, that got WinXP back to me. Maybe I should go back to Mandrake...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bootloader Question: gwl777 Linux - Software 1 12-12-2005 10:55 AM
another bootloader question guuzjo Red Hat 8 05-30-2005 11:19 AM
bootloader question YBA^[x] Linux - General 3 08-03-2004 08:50 PM
Bootloader Question mike317 Linux - Newbie 2 09-01-2003 04:34 PM
Bootloader Question h1tman Linux - General 1 07-23-2003 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration