grub loading error 18 frozen screen

Asked by vincent

trying to install 9.04 from disc i downloaded from ubuntu cannonical site. i followed all instructions reguarding checking disc ect. pressed key to install along side windows xp it started to install then the following came up installing grub stage 1.5 please wait . grub loading error 18. now i cannt get xp the screen with that error message comes on as soon as i turn on computor i can only use machine by turning on and off with the cd in the drive i can then geton as a live session user can anyone help please i still want to use ubuntu but i want to decied when thanks hope you can help vinny

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
Xuacu Saturio (xuacusk8) said :
#1

Please, have a look here:

http://wiki.linuxquestions.org/wiki/GRUB#Error_18
Good luck

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

It sounds like you need to update the bios (if that's possible or even advisable, sounds risky to me) or alternatively create a 100Mb partition at the start of your drive and then install grub to it. Install grub by using a LiveCd to get to a command-line and then type in (assuming this is your primary, master hard-drive and the grub boot-loader sees the first partition as the first partition, i have a feeling it numbers them in the order they are made rather than their position on the drive though, in which case this should just give an error message)

sudo grub

root (hd0,0)

setup (hd0)

quit

sudo reboot

Revision history for this message
shan (holinuhi) said :
#3

well i suffered that too AND IT FREAKED ME BIG

then i reloaded the the ubuntu 9.04 disk and after a few attempts i opted for the full install since by then i had already messed my xp i think

and it worked beautifully

of course i do not have xp anymore but for me that was the point so if you feel you want to surrender xp this might be the way forward

hope it helps shan

Revision history for this message
shan (holinuhi) said :
#4

i think it is a size thing which gives you and me the message there is not really the space for xp (with all your existing files) and ubuntu 9.04

i think that makes sense

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

Vinny please let us know if you are still having a problem and then we might be able to try helping in more detail or another way or sometihing
Good luck and regards from
Tom :)

Revision history for this message
vincent (vincentbarnes246) said :
#6

sorry its taken so long to reply. have tried to use your solution but no joy . iget either INVALID COMMANED or ERROR 27.next i think i will try to install 9.04 over the all hard drive and forget about xp what do you think. thanks for all your help so far regards vinny

Revision history for this message
shan (holinuhi) said :
#7

vinny all i can tell you is that doing a full install removed all the problems
and 2 weeks down i do not miss xp

good luck shan

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

Hi Vinny :)
You are using LiveCd sessions? Please go up to the top taskbar and click on

Applications - Accessories - Terminal

and type into teh terminal/command window/console (or copy&paste with the mouse)

sudo fdisk -l

& please post the output from that into here.
https://help.ubuntu.com/community/AutomaticallyMountPartitions#Viewing%20the%20system%27s%20physical%20information
Thanks and regards from
Tom :)

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

Sorry i didn't mean to post the result into the wiki page, i meant post your results into this comments thread here. I gave the link to the guide so that you could see a reference showing the command, as i wrote it, is safe

Good luck and regards from
Tom :)

Revision history for this message
vincent (vincentbarnes246) said :
#10

thanks tom hear is the output device boot start end blocks id system
/dev/sda1 * 1 4213 33840891 7 hpfs/ntfs
/dev/sda2 4214 4865 5237190 5 extended
/dev/sda5 4540 4843 2441848+ 83 linux
/dev/sda6 4844 4865 176683+ 82 linux swap/solaris
    this means allmost nothing to me but ican follow instructions as to what to input at the terminal i can see that scme of the start and end numbers are overlapping hope you can make sence of it thanks and regards vinny ps thanks to shan also vinny

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

Hi :)

sda2 is an "Extended Partition", which i think of as a bucket that contains all the "Logical" partitions inside it. A hard-drive can only have 4 "Primary" partitions so this fudge was made of making one of those a bucket that could hold lots of other partitions. So sda2 contains sda5 & sda6.

The start and end values are all slightly meaningless to us because they are based on "cylinders" rather than GB or MB but it looks as though one of the main troubles is that the hard-drive is too small for Ubuntu. Ubuntu really needs 15Gb, the good news is that Xubuntu is pretty much the same but might well fit the space better :)

Ok, in a terminal console type

free -m

and give us the result in here so that we can see how much ram you have. this will help us see how much linux-swap you need. At the moment that's sda6.

Good luck and regards from
Tom :)

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

Also please let us know how much hard-drive space you have. Xubuntu is supposed to be able to fit into about 2Gb but a bit more would be nice. If you can it would be good to copy the data from your Xp onto external drive, or onto cd/dvd if you have a second cd/dvd-drive that you can use? If you look in the "Places" menu you should see your Xp 'drive' helpfully labelled as something like "12.4 Gb Media", searching around in the various users in "Documents & Settings" in there should get you to a lot of your old data :)

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

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

As a hint or roadmap of where we are aiming at
https://help.ubuntu.com/community/GrubHowto#If%20/boot%20is%20on%20another%20partition

Tjhis will be easier with a fresh install but we need to move your Xp partition to give us a 100Mb space at the front of the drive. We can make the 100Mb space into a /boot partition, it might be good to squeeze the linux-swap in just after it so that we end up with partitions organised something like this

/boot
linux-swap
Xp on hpfs/ntfs
Extended partition containing
 /
 /home

Notice that all the linux partitions (except swap) start with / because / is the start of the file-system in linux. The /home is much like "Documents & Settings" but it's much more rigorous and ensures that all you data really is in there. It's wise to have this on a separate partition if reasonably possible so that your data is safe if you ever want to reinstall you OS, or install another linux instead - so it keeps your options open. Likewise /boot keeps all the stuff you need to boot up the machine with. It's quite unusual to need to have this as a separate partition but on your hardware it is vitally important, as the guide hints at. Most of this is much easier to set up in advance of installing and then the install also makes it easier to set this whole thing up so that you don't have to mess around with "fstab" or other tricky and perhaps dangerous system-files like that. Anyway, we'll guide you through once we know hard-drive size and the result of

free -m

Good luck and regards from
Tom :)

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

Errr, i forgot to say that we can move the Xp partition from the LiveCd, we don't need to delete it or anything and so the data should be safe. However Murphy's Law (or something similar) states that we will need a backup only if we haven't made one. So i try to backup where possible, if i care about the data at all (even slightly).

Revision history for this message
vincent (vincentbarnes246) said :
#15

result of free-m total used free shared buffers cached
mem 307 289 17 0 i 83
-/+buffers/cache 204 107
swap: 249 20 229
hope this is what you needed
thanks for all the help you are giving vinny

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

Ok, so on the LiveCd session you use these days please go up to the top taskbar and click on

System - Administration - Partition Editor

Then right-click on sda6 (which should be at the end of the drive) and delete it. Also delete sda5 and sda2. It might be a little more tricky trying to catch hold of sda2 to delete it because it's only an empty box so you have to click on it's coloured border or use the pane that's the bottom half of GPartEd's window. Anyway, once everything except sda1 is deleted then click on the "Apply" button.

After that right-click on sda1 to 'resize' it. Really we need to move this to the right so that there's a 612Mb space in front of it. This time it will take ages, plenty of time to get a cuppa tea or have lunch or something.

When that's done right click in the grey space at the front of the drive and create a new partition of only 100Mb, make this a Primary, ext3 partition. After it make another partition filling the space between sda1 and the partition you've just made. It should be about 512Mb, make this one a Primary, linux-swap partition. This time when you click on "Apply" it should be relatively quick. When it's done right-click on the linux swap and choose "SwapOn".

At this point it would be good to let us know what the bottom pane of gparted is telling you. I'm particularly interested in how much space there is in the grey area at the end of the drive but i'm also interested in how much unused space there is in sda1. Note that sda1 is probably in the middle of the drive by now with sda2 and sda3 in front of it - this is quite normal and nothing to worry about. Partitions are labelled chronologically, in the order they were created rather than where they happen to be on the drive.

Ok! Good luck with all this!
Regards from
Tom :)

Revision history for this message
vincent (vincentbarnes246) said :
#17

ok so i tried to delet sda6 no go info said it was active and did not give me the option of deleting
 sda1 is 37.27
  Gib used 7.87 Gib unused 24.40 Gib any use to you
regards vinny

Revision history for this message
vincent (vincentbarnes246) said :
#18

i think i can move sda1 without deleting the others if that would help
regards vinny

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

Yes, shrinking sda1 down by 612Mb off it's start would be a good start. This is the step that takes the longest by quite a long way. This is also the move that puts the data on your "C: "drive"" most at risk. After this it'll be pretty much plain sailing.

To delete sda6 try right-click and unmount it first, then it should let you delete it. The only slowdown here is when it rescans the partitions after unmounting.
Good luck and regards from
Tom :)

Revision history for this message
vincent (vincentbarnes246) said :
#20

have tried to delete sda6 it will not let me it will only give me the option of swapoff, manage flags, information. giving up for tonight will try tomorrow regards to all my readers and thanks vinny

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

Sorry, that's my fault. Tomorrow is plenty soon enough. Shrinking sda1 is the first thing :)
Good luck and regards from
Tom :)

Revision history for this message
vincent (vincentbarnes246) said :
#22

hi tom if you are there. right i have finally got everthing deleted you surgested.the drive now looks like this
partition system size used unused flags nallocated unallocated 611.85mib ... ...
/dev/sda1 ntfs 31.67Gib 7.87Gib 23.79Gib boot
unallocated unallocated 5Gib ... ...
i have read your answer abot making a partition of 100mib aprimary ext 3 but i dont know how "am i thick or what" never had to do anything like this befor.
regardsvinny

Revision history for this message
vincent (vincentbarnes246) said :
#23

OK I have finally got those partitions mounted. heer is the info
partition /dev/sda2 file system ext 3 size 101.9Mib used 8.76Mib unused 93/19Mib
partition /dev/sda3 file system linux swap size 509.88Mib used ... unused ...
partition /dev/sda1 file system ntfs size 31.67Gib used 7.87Gib unused 23.79Gib flag boot
partition unallocated file system unallocated size 5Gib. is this the information you required "TOM" thank you REGARDS VINNY

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

Hi :) Nope you're not being dumb. It's all new and the toughest part is at the beginning. As i said to soemone else today already ...

It is very tough with a very steep learning curve at the very beginning. Once you have overcome the initial hurdles and installed it as a dual-boot it settles down a lot. Most of us didn't have any experience installing any OS before starting with linux as Windows is pre-installed by teams of experts doing batch runs on one type of hardware setup. In linux we have to work out the foibles of our own hardware and do the work of a team of experts, and that's just for 1 machine! So the fact you've got this far is pretty awesome and you deserve congrats for that! Here's a general guide worth dipping into from time to time to help with translations
https://help.ubuntu.com/community/SwitchingToUbuntu/FromWindows

Something for morale
https://help.ubuntu.com/community/Antivirus

and something for general help to get access to proper community documentation aimed at Ubuntu specifically
https://help.ubuntu.com/community/Signpost?action=show&redirect=HowToGetHelp
https://help.ubuntu.com/community/SwitchingToUbuntu

Right, now i'll have a go at the main question here i think :)
Good luck and regards from
Tom :)

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

Yes, it is the information i wanted but i was hoping that the value for "unallocated" would be about double that. I take it you can boot into Ubuntu LiveCd sessions quite well and easily but still can't get Xp working?

Ahah, lots of free space in sda1 :)) Ok, resize sda1 down by about 7Gb so that we end up with 12Gb unallocated at the end of the drive. A little more would be nice but it's difficult to justify taking an extra 3Gb from Windows when it's all going to just work without it. <crosses fingers>

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

Once you have resized sda1 down to about 24Gb(ish) then create one big new partition filling up all the unallocated space at the end of the drive. Make this an Extended partition rather than a primary one. Notice the difference?

Inside the Extended partition make a 'Logical' partition of 5Gb with 'file-system' "ext3" again. After it make another "ext3" Logical partition filling the remaining drive-space. This last partition can be a bit larger but there's not a lot of point because you're going to be able to use all the data that's on the windows side anyway so it's worth keeping most of your stuff over in Windows :)

Right, this has set things up to install Ubuntu like this
sda2 /boot
sda3 linux-swap
sda1 Xp on hpfs/ntfs
sda4 Extended partition containing
 . sda5 /
 . sda6 /home

Note that /boot and /home both build up from the "Root" of the folder-structure that starts with / This is not something that can be done with Windows and it's a very difficult flexibility to 'wrap your head around' so in a way i guess i'm asking you to trust me. The easiest way to think of a Windows way of explaining is that imagine you had a large music collection, too large to fit on your current hard-drive so that you bought another hard-drive just to fit it all on. In Windows, inside your "My Documents" folder, or alongside it is a folder called "My Music" - wouldn't it be great if opening the "My Music" folder took you to the music on your new hard-drive? And then going "up" would take you back to the drive where everything else is? Well it can be done in Windows but involves a lot of hacking around with the infamous registry. In linux it's easy & that's the type of thing we are doing here with /boot and /home being on different partitions :)

The reason /boot needs to be on a separate partition is that your hardware needs the boot sector to be in the first 1024Mb of the hard-drive. Putting linux-swap near the front of the drive gives a performance increase because the read/write speed is faster at the front of the drive and in your machine the ram & swap are going to be doing a LOT of work together. Having the /home folder on a separate folder gives extra stability to the system - you will be able to easily install a different version of llinux to replace Ubuntu or perhaps reinstall Ubuntu over the top of itself if you ever need to without having to worry about backing up your data & settings as they will all remain untouched in the /home partition ;)

So it should work out quite well :))
Good luck and regards from
Tom :)

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

Ok, before starting with the install it would be nice to check it's all set-up right. So in a terminal console type

sudo fdisk -l

& please post the output from that into here.

Then start the install from the icon on the top left-hand corner of the desktop and when you get to the partitioning section about halfway through choose the very bottom option of the 3 "Manual Partitioning". Most people don't notice it because the other 2 options have a nice graphic representation of what they are going to do but we can't afford to use either of those, especially not after all the work you've done. When you choose "Manual" it will take a few scary moments to rescan the hard-drive. Then it will show the layout you are familiar with but the colour-coding is different <sighs> <shakes head>

"Manual Partitioning" is where you edit each partition except sda1 which must be left alone. Make sure that sda1, the ntfs partition, is UNticked in the "Format?" column. With sda2 edit it so that it's "Mount Point" is set to "/boot". Edit sda5 to set it's "Mount Point" to "/" - or it might actually say "Root". Then set sda6's "Mount Point" to "/home". Again check that the Xp partition, sda1, the hpfs/ntfs partition is NOT going to get formatted and then go forwards.

A few screens later you get a summary of what's going to happen during the install. Scroll up and down that to check that all is well. You can back out or just go back a few steps to correct anything that seems wrong, such as keyboard or something - if you do then make sure you return through the Manual Partitioning section and recheck the summary before continuing with the install.

You'll never guess where my major disasters with all this have happened - lol
Anyway, hopefully that should all install nicely and will pick-up on all the hardware thats plugged into your machine during the install process. hopefully grub will automatically set-up entries for Xp and Ubuntu so that when you reboot you'll see a few options for booting into Ubuntu and 1 for booting into Xp :)
Good luck and regards again from
Tom :)

Revision history for this message
vincent (vincentbarnes246) said :
#28

how do i mount partition inside the extend partition i have tried but it seems to mount in front giing 2 sepparate partitions
vinny

Revision history for this message
vincent (vincentbarnes246) said :
#29

sorry have to sign off now "wife" is playing **** with me ill be back tomorrow
regards vinny

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

Don't bother to mount any of the partitions. Please just give us the output of

sudo fdisk -l

so we can see how it's going at the moment
Thanks from
Tom :)

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

Ok, tomorrow is good :)

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

Ahhh, i think i've worked out what you're asking. The trick is to right-click inside the grey space - the top option should be "create" or "new" - take it from there :)

Revision history for this message
vincent (vincentbarnes246) said :
#33

output = bus error

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

I've gota sleep. Hopefully i'll be good for this tomorrow :)

Revision history for this message
vincent (vincentbarnes246) said :
#35

OK output from fdisk -l as follows
device boot start end blocks id system
 /dev/sda1 * 79 3335 261611852+ 7 hpfs/ntfs
/dev/sda2 1 13 104391 83 linux
/dev/sda3 14 78 522112+ 82 linuxswap/solaris
/dev/sda4 3336 4865 12289725 5 extended
/dev/sda5 3336 3973 5124703+ 83 linux
/dev/sda6 3974 4865 7164958+ 83 linux
this looks ok to me
i will follow your install instructions in a couple of hours.
thanks and regards vinny:}

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

Ok, it is looking good -- i agree :) So the order on the drive is - or rather, will be once you've sorted the "Mount Points" in the "Manual Partitioning" section of the installer

sda2 /boot
sda3 linux-swap
sda1 Windows to be untouched
sda4 Extended (bucket)
 . sda5 /
 . sda6 /home

Good luck and regards from
Tom :)

Revision history for this message
vincent (vincentbarnes246) said :
#37

every thing seems OK XP seems to be slower than i remeber maybe ive just got uest to 9. 04
can i thank every one who helped getting my system back working but especially TOM who has been very patient with me
REGARDS
vinny
this is not the last you have heard from me

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

Brilliant, nicely done :)))
Congrats :))
Xp probably needs a bit of tlc now. Inside Xp should be a 'disk'-defragmenter, probably

Start button - All Programs - Accessories - System Tools - Defragmenter

Try not to have anything else open or running and let it take a good few hours to complete it first time and then run it again. Again a few times it should be only take about half hour or so. You don't need to do this all back-to-back, just let it run overnight for the next few nights or something like that ;)

Good luck and regards from
Tom :)

Revision history for this message
jt (jwtucker) said :
#39

Tom,

I think I have the same problem and have been running through these steps. I have the 100 MiB space and 512 MiB in front of sda1 but I can not delete sda2, sda5, or sda6. I only have the option to delete sda5 but it won't allow it. I've tried using the "sudo umount" command on all of these at the terminal but it says they are not mounted. Can you help me blow these away?

Thanks,
jt

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

Hi :)

Please re-post a new question about this. Most of these types of questions are quite unique and it helps to have these questions each in their own thread.
https://answers.launchpad.net/ubuntu/+addquestion

If you have booted up into an OS on your hard-drive then it's difficult to then edit any of the partitions on that hard-drive. You really need to bootup from an Ubuntu Cd to a LiveCd session. I tend to prefer using the LiveCd session of Wolivix Hunter 1.1.0 or sliTaz for this type of thing.
http://distrowatch.com/table.php?distribution=wolvix
http://distrowatch.com/table.php?distribution=slitaz

It would be helpful if you could give us the output from these two commands

free -m

sudo fdisk -l

where " -l" is a lower-case " -L" but also try to keep your question reasonably brief as shorter questions seem to attract better answers
Thanks, good luck and regards from
Tom :)

Revision history for this message
jt (jwtucker) said :
#41

Thanks Tom
I've started a new question #80662.