GRUB install failure, code 18 now

Asked by Redkid

I am trying to make myself a fileserver for my home network. For this, I was planning on using Ubuntu 9.04, and my 1.5TB SATA drive which has some files on an NTFS partition that I do not want to loose. And using some old spare parts I have lying around.

I have resized the NTFS partition, so that I have 10gb of free space. I have downloaded Ubuntu 9.04, MD5 checksummed, and burned it to DVD, did not have any CDs. Booted from the DVD, Check disc for defects gave no errors.

Now, I started the installation. Manually arranged the partitions, sda1 being the NTFS partition, sda2 an 8gb "/"-ext3 partition, and a 2gb linux-swap partition. Installer starts, but when it gets to installing GRUB loader, it fails, giving me an error code 1, trying to install to (hd0).

Since Ubuntu actually showed up on the partition when I tried to reinstall, someone asked me to try installing GRUB manually, following this guide: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows?action=show

But when I get to "sudo grub-install --root-directory=/media/root /dev/sda", it gives me these errors:

grub-probe: error: Cannot open '/boot/grub/device.map'
[: 494: =: unexpected operator
The file /media/root/boot/grub/stage1 not read correctly.

Any idea what might be the problem?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Tom
Solved:
Last query:
Last reply:
Revision history for this message
zvacet (ivicakolic) said :
#1

I found http://members.iinet.net.au/~herman546/p15.html#1 I hope it will be helpful to you.

Revision history for this message
Redkid (peter-wiklof) said :
#2

Doesn't help me, I'm completely new at this.

Revision history for this message
Tom (tom6) said :
#3

Hi :)

Are you using the Server Edition (no graphical desktop) or the desktop edition? File-serving to a small internal Lan probably doesn't need the full Server Edition so you are kind of halfway between the 2. Either install Server and then maybe add a Gnome desktop and a few things or install Ubuntu (complete with gnome preconfigured) and then add server functionality. Lol, good luck either way :)

Please run a LiveCd session with your Ubuntu Cd
https://help.ubuntu.com/community/LiveCD
if you are not already at a command-line then get to one using this guide
https://help.ubuntu.com/community/UsingTheTerminal#Starting%20a%20Terminal
and get from the linux command-line to the grub command-line by typing in

sudo grub

find /boot/grub/stage1

hopefully it should give an output such as (hd0,1), taking my numbers as an example but using the figures your machine gave please try

root (hd0,1)

setup (hd0)

quit

now that you are back on the linux command-line type in

cd /media/disk-1/boot/grub
dir
sudo cp menu.lst menu.lst-030909
dir

where "menu.lst" is a lower-case "MENU.LST". As you will see from the 2nd dir command the "cp" command should have made a CoPy of menu.lst and called it "menu.lst-030909" so that we know it's backed up safely.

Ok, please let us know how this all goes!
Good luck and regards from
Tom :)

Revision history for this message
Redkid (peter-wiklof) said :
#4

find /boot/grub/stage1
Error 15: File not found

I am at a loss. I tried burning to a CD and reinstalling Ubuntu, even tried selecting it to install to /dev/sda2 (ext3 partition) instead of just (hd0) in the installer. No luck.

Revision history for this message
Redkid (peter-wiklof) said :
#5

Oh, and I'm using desktop edition. I figured have a GUI might be more newbie friendly. I'm not only going to use it for file-serving in the LAN, but probably as an FTP, irc-proxy, and possibly torrentbox.

Revision history for this message
Tom (tom6) said :
#6

Yeah, desktop edition should be a lot easier for this but ftping is internet facing and a bit of a security issue. Less of a problem with a linux but still an issue. You might b better with a more serious server OS such as "CentOS" or "Scientific Linux"
http://distrowatch.com/table.php?distribution=centos
http://distrowatch.com/table.php?distribution=scientific

The main thing is to get a LiveCd session of whichever distro, whether that's CentOS, Ubuntu or Scietific to work on the machine
https://help.ubuntu.com/community/LiveCD
try a few of the boot options and see if that can help. Try a few different distros even though Ubuntu is probably the most user friendly it is worth having a look around at others

Good luck and regards from
Tom :)

Revision history for this message
Redkid (peter-wiklof) said :
#7

Finally, I got an error I can work with. I did as you said but went straight to root (hd0,1). I got an Error 18: Selected cylinder exceeds maximum supported by BIOS.

I had a feeling this was the problem all along, with this old motherboard not being able to read boot data 1tb+ away. Only thing is. I do not want to mess up the files on the NTFS partition, and it is the first one. Is there any way to move a partition without loosing the data?

I'm all about user friendly, so I'll stick to Ubuntu. :)

Revision history for this message
Best Tom (tom6) said :
#8

Hmmm, yes i had a feeling it was something like that lurking in the background there. There are several options

1. Update your bios, this is always risky and may make your mbord completely unusable in various worst case scenarios. Take care and make sure the whole actual update part of the process doesn't get interrupted by a power cut-out or lightning strike or something.

2. Get a smaller drive to act as a boot device and install the GRand Unified Boot-loader (grub) to that. It's unlikely but your mbord might support an "external drive" boot in the Boot Order in it's current bios. This might allow you to use a usb-stick to contain a grub partion (100Mb)

3. Move the ntfs partition and while doing so why not create enough room to put Ubuntu's root at the front of the drive too? Again this is a very risky operation, this time possibly resulting in the loss of some or all of the data that's on the 1Tb drive.

Option 2 is the least risky and my preference would be to install a 'new' drive internally - even if it's an old 10Gb drive scavenged from an old machine somewhere. Note that you wouldn't have to run an OS from the drive but it might be handy to also stick a swap partition on it to improve the machine's overall performance.

There might be other options such as using a network boot but the 3 one's i could really understand best are the 3 i gave.

Still committed to option 3?
Regards from
Tom :)

Revision history for this message
Redkid (peter-wiklof) said :
#9

I have a 120gb drive I could use for 2. If so I'd just install it all onto that and make the NTFS partition full size again. Option 1,3 would however be the smoothest were it not for the risks.

Thank you for your help, Tom.

Revision history for this message
Redkid (peter-wiklof) said :
#10

Thanks Tom, that solved my question.

Revision history for this message
Tom (tom6) said :
#11

You are welcome :)

If the 120Gb is an internal drive then make sure you change the jumper pins at the back, usually between where the data lead goes and where the power plugs in. Also you might need to change the jumpers on the 1Tb drive unless that's a sata drive (which it probably is?). Usually there are fairly clear instructions written onto the drive itself as to exactly how to plug the jumper in to make it a slave or master. However it is quite likely to be already set as MAster. Also take care not to cut yourself on any unexpected sharp edges in the machine and take care not to fry components with static from your fingers! Err and try to avoid getting an electric shock yourself too although usually that's the easy part.

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#12

Hi :)

Have you been able to try the new Ubuntu 10.04 before it gets officially released?
http://www.ubuntulinux.org/testing/lucid/beta2
Trying it as a LiveCd or as an extra dual/multi-boot would be ideal. Developers and everyone are keen to try to iron out any problems before 10.04 gets officially released so you might find faster & more effective answers to your bug reports which would make 10.04 work better on your system for you

Thanks and regards from
Tom :)