Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-04-2010, 02:45 AM   #1
LQ Newbie
Registered: Mar 2010
Posts: 3

Rep: Reputation: 0
grub error 18 windows xp and ubuntu dual boot

this question is regarding an error 18 message resulting from anattempted dual boot system. (first windows xp SP2 was installed, then Ubuntu 9.04).

The installation was done using the largest continuous free space, then when I turned on the computer, I got this message:
"Grub loading, please wait ...
Error 18"
and the system just hangs until I shut it down.

I decided to just remove everything and start over. so far I have just reinstalled windows and would like to reinstall ubuntu (or for that matter another distro, just as long as it can be used to build LFS)

Right now I am using Ubuntu 9.04 on an external hard drive with no other OS. The dual boot system will be on the internal hard drive on my Thinkpad X31.

most of what I've read suggests creating a small partition at the beginning of the hard disk, then label it /boot. I need to confirm some things before I attempt this.

first, how large should this partition be, my /boot directory (and the grub subdirectory) are 76 mb. Does everything in the /boot directory get transfered or just specific files and if so, how much space beyond this 76 mb is recommended.

also, is the /boot partition recognized during the installation, more specifically, does the live cd install the correct files on that partition or does this have to be done manually using the live cd during or after the installation is complete. How exactly does this work.

Not sure if my bios supports logical block addressing. This may not even be relevant, just thought I'd mention it. The bios version to the most recent one. (listed below)

One other thing to mention is this, I cannot use the "Access IBM" button, I recieve the error "Authentication of system services failed.
Press <ESC> to Resume."

system information:

Thinkpad X31, 40 GB IDE
BIOS Version - 3.02 (1QET97WW)
Embedded Controller - 1.08

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 9
model name : Intel(R) Pentium(R) M processor 1600MHz
stepping : 5
cpu MHz : 1600.000
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 tm pbe up bts est tm2
bogomips : 3197.25
clflush size : 64
power management:

# /etc/fstab: static file system information.
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=d1686c2a-4787-4802-b5d4-91427ba2ba64 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=39db946f-a904-4725-92b0-4fe08b1d3df7 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

fdisk -l:

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0d870d87

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4473 35921340 7 HPFS/NTFS

Disk /dev/sdb: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0f4738c

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 4006 32178163+ 83 Linux
/dev/sdb2 4659 4863 1646662+ 5 Extended
/dev/sdb3 4007 4658 5237190 83 Linux
/dev/sdb5 4659 4863 1646631 82 Linux swap / Solaris

Partition table entries are not in disk order

Also if anyone needs the
results, just let me know.


Last edited by 00000; 03-04-2010 at 07:35 AM.
Old 03-04-2010, 08:23 PM   #2
LQ Guru
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,059

Rep: Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937
I notice that your fstab file indicates / (root) being on /dev/sda1 during installation and your fdisk output shows Linux on sdb1. Also, fstab shows swap was on /dev/sda5 during installation when you have swap on sdb5. Change boot priority or cabling?

So what you want to do is install your Ubuntu 9.04 onto the drive (sda) on which you now have only windows? How old is this computer? I don't know that you would need a separate boot partition but, if you want to do that there are actually quite a few tutorials on doing it. I'd search here at LQ or google "create grub boot partition". 100MB should be more than enough.

During the installation, you should get options as to where and how to install the bootloader. You will need to select manual or expert partitioning. If you get to a point where you are not sure, you can always stop. The bootloader installation also has an Advanced tab which you will need to use.

I've never used a separate boot partition myself so don't have specific knowledge or suggestions.
1 members found this post helpful.
Old 03-05-2010, 05:20 AM   #3
LQ Newbie
Registered: Mar 2010
Posts: 3

Original Poster
Rep: Reputation: 0
The release date of the Thinkpad X31 was 2003 so the bios probably just can't access anything beyond the 1024 cylinder limit.
Nonetheless, what I'm going to do is create the 100 mb /boot partition at the begining of the disk and manually install from there. I will post the results in a few days or when time permits.

all the help is appreciated.

Last edited by 00000; 03-05-2010 at 07:01 AM.
Old 03-06-2010, 07:16 PM   #4
LQ Newbie
Registered: Mar 2010
Posts: 3

Original Poster
Rep: Reputation: 0
OK, I have finally finished this gruelling task. I'm going to write it all out for everyone to see.

First order of business was to partition the hard disk. Gparted was used for this. here is my partitioning scheme below:

Device Boot Start End Blocks Id System
/dev/sda1 1 13 104391 83 Linux
/dev/sda2 * 14 1925 15358140 7 HPFS/NTFS
/dev/sda3 1926 4864 23607517+ 5 Extended
/dev/sda5 1926 3200 10241406 83 Linux
/dev/sda6 3201 3391 1534176 82 Linux swap / Solaris
/dev/sda7 3392 3999 4883728+ 83 Linux
/dev/sda8 4000 4864 6948081 83 Linux

The windows partition was resized to 15gb, then given a space of 100mb
preceding it. the /boot partition was then placed in that 100mb space - you have to declare /boot as the mount point, then I gave it a filetype of ext2 (as was recommended in the arch linux "Beginners' Guide" and "Official Arch Linux Install Guide"). Then I created an extened partition which the contained the main installtion and was given a mount point of / (filetype ext3). Next was the swap space. All these remaining partitions where stored as logical partitions.

I noticed after the installation was complete that the partition scheme was initially in a different order than what is posted - sda1 and sda2 where swaped. Of course the goal here was to make the /boot partition first in line. fdisk was used to fix this, here's how:
sudo fidsk /dev/sda
then enter into expert mode with the following:
x (expert mode)
then press f to fix partitions:
f (fix)
then write this to disk with:
w (write table to disk and exit)

Next was to install Ubuntu. This was done using the manual installation option. Again I had to specify the mount point as was declared in the initial partition.

Now, when I booted up, I went directly to the grub boot loader - so far so good. I was able to boot into Ubuntu without any problems. However, when I attempted to enter windows, I was given this rather cryptic message:

Windows could not start because the following file is missing
or corrupt:
<Windows root>\system32\hal.dll.
Please re-install a copy of the above file.

So, after some research I found a few tutorials which recommended I
try this:
boot into the windows xp disk and enter recovery console. you then choose a disk number - I entered 1, then hit enter.
next type this code:
expand d:\i386\hal.dl_ c:\windows\system32\
then I was prompted to overwrite existing file - yes
then enter exit

This example assumes that "d" is the optical drive and "c" is windows.
this didn't work.

What ultimately solved my issue was modifying the partition numbers in C:\boot.ini file from 1 to 2 as windows is now on the second partition.

here's what the file looked like before this was done:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

here's what the file looks like after this was done:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

To edit this file, I first had to create a directory and then mount
the partition in that directory:
mkdir /mnt/c
sudo mount /dev/sda2 /mnt/c

Anyway things are up and running and in perfect working order.
Perhaps someone will find this useful.

Last edited by 00000; 03-06-2010 at 07:40 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 7.10 Dual Boot with XP, ubuntu partition deleted, grub 1.5 error 22 narchy Linux - Newbie 11 02-07-2011 03:54 AM
GRUB doesn't recognize ubuntu or windows XP for dual boot bmosov01 Linux - Newbie 16 01-28-2009 12:35 AM
Ubuntu 8.04 on dual boot Grub does not find Windows XP ronmettler Linux - Newbie 4 05-02-2008 08:38 AM
grub dual boot ubuntu/windows dellcom1800 Linux - General 1 01-25-2007 06:02 AM
Grub will not load Windows XP with Ubuntu dual boot Alex4R Linux - Software 1 03-26-2005 11:29 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:45 AM.

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