GRUB doesn't recognize ubuntu or windows XP for dual boot
Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
GRUB doesn't recognize ubuntu or windows XP for dual boot
Sorry this post is a bit long, but I'm going to try and be as descriptive as I can:
I just installed Ubuntu Intrepid 8.10 on my brand new Lenovo Thinkpad T400. It came with a 200 GB hdd partitioned into two primary partitions: one for windows and one for recovery of the OS software. I wanted to keep this recovery partition so I was told to install GRUB into a third primary partition /boot (I assume that means that when you're in the partition editing utility on the Live CD you simply create a primary partition in ext3 format, give it about 100 MB, and mount it as /boot...but correct me if I'm wrong). Anyway, I did this, selecting the option to have GRUB installed in /dev/sda3 which was mounted as /boot. I believe this was meant to prevent overwriting the master boot record.
Anyway, after repartitioning I installed Ubuntu and rebooted, and the boot sequence took me directly into Windows XP (SP2), which I was told would happen. So far so good; I was feeling pretty good about the install. I went into the administrative tools section of Windows and changed the active partition to be sda3 (the partition I mounted as /boot), and this is where things got a bit confusing. Windows recognized the other primary partitions on the hdd, but for this partition that I had designated as /boot (and I'm 100% positive I specified "primary" when I created it, as I double and triple checked everything) it said that the partition type was "Unknown." Anyway, being absolutely certain that I had made it a "primary" partition, I figured Windows just didn't know how to recognize it for whatever reason, and I went ahead and made it the active partition.
Now when I boot, I must be going into the /boot partition because I see that GRUB loads, however it takes me directly to a command-prompt-type interface and there is no list of operating systems on my computer as I thought there should be. The screen simply reads:
[ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ]
grub>
I'm not sure what went wrong here. I know that when I resized my Windows partition it worked properly because I got Windows to boot, but then on changing the active drive partition I just went straight to this interesting GRUB command line. Now I'm not sure how to change the active disk partition back to my original one since I can't get back to a DOS prompt in Windows (since I can't boot either of the OS's on my system now).
Is there something I need to do to configure GRUB properly since it seems like it's merely missing some kind of pointer to the two OS's? Should I try repartitioning my hdd and reinstalling Ubuntu? And if I need to reinstall and the name of the partition in which GRUB is installed changes, how do I switch the active partition to that new one?
Any help you could provide would be much appreciated.
Thanks in advance!
can I suggest you either change it back to normal first partition and mod your windows to chainload grub
and I assume you correctly put grub into sda3....or
boot up the live linux cd and put grub into mbr....yep you lose xp bootloader links
edit the linux menu to have a chainloader for xp
see my signature for both ways
but yours for linux will be
title windows
root (hd0,0)
makeactive
chainloader +1
Windows generally won't recognize a Linux partition.
Creating a separate /boot partition isn't necessary but, if you want to do it the link below explains in detail how to on Ubuntu:
You mentioned your two windows primary partitions and the sda3 for /boot. Did you create an sda4 to put Ubuntu on?
Quote:
Anyway, I did this, selecting the option to have GRUB installed in /dev/sda3 which was mounted as /boot. I believe this was meant to prevent overwriting the master boot record.
No, that's not the reason. Read the link aabove for details.
You also don't need Ubuntu on a partition that is set as active nor does it need to be on a primary partition. I expect that after your first re-boot when it went to windows, you had not installed Grub stage1 to the mbr and after the second re-boot you had but don't have the pointer correctly set. Read the link above, should be helpful and also post the output of the file syg00 suggested as it gives a lot of detailed info.
You mentioned your two windows primary partitions and the sda3 for /boot. Did you create an sda4 to put Ubuntu on?
Yes, I created an extended partition (I assume that's the sda4 that doesn't show up in gparted, but houses sda5-8). I wrote down the details, listed below:
The partition editor in the live cd makes an extended partion automatically if you select the "logical" option (there is no "extended" option, but I read in the Ubuntu documentation that it lumps logicals into an extended partition "automatically").
I do have a set of CD's that I made when I first got my laptop, that I believe contain the contents of the service partition. Thinkvantage had a utility that allowed me to write the OS to 3 DVD's as a backup, one of which is bootable. Other than that, I have virtually no data on the computer as it is brand new, so I'm not worried about backing up.
I'll try running the programs some of you mentioned and listing the output later, but I'm off to class now. Thanks for the replies, I'll reply back later this afternoon.
How do I run the BootInfoScript file you referred me to if I can't get on the internet? My wireless doesn't seem to be working when using the Live
CD. Does it come with the Ubuntu distribution? I do have access to a desktop also with an internet connection, by the way.
Also, am I correct in assuming the specifying a mount point for my partitions in the partition editor on the Live CD is the same as giving them a name? I mounted a /data partition as a logical inside my extended partition which contains the / partition and the Ubuntu install. Will this simply show up as a /data drive on the system or will Ubuntu just not know what to do with it since it wasn't one of the standard mount options??
Use the Live CD. Open a terminal window. Type: sudo fdisk -l (lower case letter L) and post the output.
In the terminal window type: sudo mkdir /mnt/ubuntu
sudo mount -t ext3 /dev/sda5 /mnt/ubuntu
cd /mnt/ubuntu
ls -l
after the last command you should see a list of directories and you will know if your installation succeeded.
to see if your boot files are there do:
sudo mkdir /mnt/boot
sudo mount -t ext3 /dev/sda3 /mnt/boot
cd /mnt/boot
ls -l
to see if your boot files are there.
If you want a separate boot partition, I would suggest some detailed reading of the site I referred you to earlier. Very good info on Ubuntu. Also, if you have your computer setup with separate /boot, root and /home partitions you will have to tell the installer where to install everything.
I have downloaded the bootinfoscript file, but can't run it. I tried saving it to the desktop and running, but I don't know how to navigate to my desktop in the terminal. Ubuntu won't let me save it to another directory either...
I also noticed that in my grub directory, there is no grub.conf file. I tried making one myself, but I didn't have the permissions to save it to the grub directory. I don't know what's going on, but I think it must have something to do with using the Live CD.
Bmosov01, once you have the Boot Info Script on your Ubuntu desktop, just do the following from the terminal:
Code:
sudo bash ~/Desktop/boot_info_script*.sh
That will create a "RESULTS.txt" file in the same directory from where the script is run, namely your desktop; how about copying/pasting the contents of that file to your next post, highlight the copied text, and click the pound sign # graphic in the forum message box so that the text will get "code" tags put around it. The results of that script will help clarify your setup and hopefully what your booting problem might be.
Thanks CJS, sorry for being so dense with this stuff...
Code:
============================= Boot Info Summary: ==============================
=> ThinkPad is installed in the MBR of /dev/sda
sda1: _________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /NTLDR /NTDETECT.COM
sda2: _________________________________________________________________________
File system: ext3
Boot sector type: Grub
Boot sector info: Grub0.97 is installed in the boot sector of sda2 and
looks at sector 234509184 of the same hard drive for
the stage2 file and on partition #3 for /grub/menu.lst
.
Operating System:
Boot files/dirs: /grub/menu.lst /grub
sda3: _________________________________________________________________________
File system: Extended Partition
sda5: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 8.10
Boot files/dirs: /etc/fstab /boot
sda6: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:
sda7: _________________________________________________________________________
File system: swap
sda8: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:
sda4: _________________________________________________________________________
File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info:
Operating System:
Boot files/dirs: /boot.ini /ntldr /NTLDR /NTDETECT.COM /ntdetect.com
=========================== Drive/Partition Info: =============================
Drive sda: _____________________________________________________________________
Disk /dev/sda: 200.0 GB, 200049647616 bytes
240 heads, 63 sectors/track, 25841 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xed1f86f7
/dev/sda1 2,048 234,388,349 234,386,302 7 HPFS/NTFS
/dev/sda2 * 234,388,350 234,581,129 192,780 83 Linux
/dev/sda3 234,581,130 378,427,139 143,846,010 5 Extended
/dev/sda5 234,581,193 254,116,169 19,534,977 83 Linux
/dev/sda6 254,116,233 273,651,209 19,534,977 83 Linux
/dev/sda7 273,651,273 281,458,799 7,807,527 82 Linux swap / Solaris
/dev/sda8 281,458,863 378,427,139 96,968,277 83 Linux
/dev/sda4 378,437,632 390,719,487 12,281,856 12 Compaq diagnostics
/dev/sda4 ends after the last cylinder of /dev/sda
blkid -c /dev/null: ____________________________________________________________
/dev/sda1: UUID="F864BD8F64BD515C" LABEL="Preload" TYPE="ntfs"
/dev/sda2: UUID="7ef466f2-9561-4b3f-9391-a2ed54e387de" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda4: LABEL="SERVICEV001" UUID="08B9-C3F1" TYPE="vfat"
/dev/sda5: UUID="ba79e001-bf29-43d1-9a69-50aae1d475ed" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda6: UUID="c1cbcb4f-ac33-46f9-a6b3-f52df41a2bb4" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: TYPE="swap" UUID="f58cac3c-d2a8-4a98-8d02-1e5f966b186b"
/dev/sda8: UUID="3735d561-1154-4951-a519-870ee5784f77" SEC_TYPE="ext2" TYPE="ext3"
/dev/loop0: TYPE="squashfs"
=============================== "mount" output: ===============================
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /lib/modules/2.6.27-7-generic/volatile type tmpfs (rw,mode=0755)
tmpfs on /lib/modules/2.6.27-7-generic/volatile type tmpfs (rw,mode=0755)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/scd0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
================================ sda1/boot.ini: ================================
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
============================= sda2/grub/menu.lst: =============================
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=ba79e001-bf29-43d1-9a69-50aae1d475ed ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=7ef466f2-9561-4b3f-9391-a2ed54e387de
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 7ef466f2-9561-4b3f-9391-a2ed54e387de
kernel /vmlinuz-2.6.27-7-generic root=UUID=ba79e001-bf29-43d1-9a69-50aae1d475ed ro quiet splash
initrd /initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 7ef466f2-9561-4b3f-9391-a2ed54e387de
kernel /vmlinuz-2.6.27-7-generic root=UUID=ba79e001-bf29-43d1-9a69-50aae1d475ed ro single
initrd /initrd.img-2.6.27-7-generic
title Ubuntu 8.10, memtest86+
uuid 7ef466f2-9561-4b3f-9391-a2ed54e387de
kernel /memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
chainloader +1
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Windows NT/2000/XP
root (hd0,1)
savedefault
chainloader +1
================================== sda2/grub: ==================================
total 184
drwxr-xr-x 2 root root 1024 2009-01-21 23:08 .
drwxr-xr-x 4 root root 1024 2009-01-21 23:08 ..
-rw-r--r-- 1 root root 197 2009-01-21 23:08 default
-rw-r--r-- 1 root root 15 2009-01-21 23:08 device.map
-rw-r--r-- 1 root root 8108 2009-01-21 23:08 e2fs_stage1_5
-rw-r--r-- 1 root root 7856 2009-01-21 23:08 fat_stage1_5
-rw-r--r-- 1 root root 16 2009-01-21 23:08 installed-version
-rw-r--r-- 1 root root 8712 2009-01-21 23:08 jfs_stage1_5
-rw-r--r-- 1 root root 4745 2009-01-21 23:08 menu.lst
-rw-r--r-- 1 root root 7352 2009-01-21 23:08 minix_stage1_5
-rw-r--r-- 1 root root 9756 2009-01-21 23:08 reiserfs_stage1_5
-rw-r--r-- 1 root root 512 2009-01-21 23:08 stage1
-rw-r--r-- 1 root root 121460 2009-01-21 23:08 stage2
-rw-r--r-- 1 root root 9556 2009-01-21 23:08 xfs_stage1_5
=================== sda2: Location of files loaded by Grub: ===================
120.0GB: grub/menu.lst
120.0GB: grub/stage2
120.0GB: initrd.img-2.6.27-7-generic
120.0GB: vmlinuz-2.6.27-7-generic
=============================== sda5/etc/fstab: ===============================
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda5
UUID=ba79e001-bf29-43d1-9a69-50aae1d475ed / ext3 relatime,errors=remount-ro 0 1
# /dev/sda3
UUID=7ef466f2-9561-4b3f-9391-a2ed54e387de /boot ext3 relatime 0 2
# /dev/sda8
UUID=3735d561-1154-4951-a519-870ee5784f77 /data ext3 relatime 0 2
# /dev/sda6
UUID=c1cbcb4f-ac33-46f9-a6b3-f52df41a2bb4 /home ext3 relatime 0 2
# /dev/sda7
UUID=f58cac3c-d2a8-4a98-8d02-1e5f966b186b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
================================== sda5/boot: ==================================
total 8
drwxr-xr-x 2 root root 4096 2009-01-21 22:57 .
drwxr-xr-x 21 root root 4096 2009-01-21 23:08 ..
================================ sda4/boot.ini: ================================
[boot loader]
timeout=0
default=C:\
[operating systems]
multi(0)disk(0)rdisk(0)partition(4)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\ = "PC-DOS"
=============================== StdErr Messages: ===============================
No errors were reported.
sda2 is the bootable partition as appears to be where boot is...but I have not asked him to read my troubleshooter as yet...to confirm that.....as the script says so
now the only question is....does the OP want to use windows to chainload to the bootloader in root of sda2 or install grub to mbr and use grub to chainload to bootloader at root of sda1?
I guess it might be easiest to just install GRUB to the mbr. This whole problem kind of came about because I was trying to avoid that, but at this point I'd just like to get this *%@# thing working. I know there is a command line option in the grub shell to install it to the mbr, so maybe I should just try that?
Bmosov01, please don't think that you are being "dense", after all, we all start out as newbies to Linux at some point; so I totally understand these things are not obvious in the beginning (especially if you come from using Windows), or at least they weren't for me either.
It looks like the only problem is that the Grub installed to the boot sector of your sda2 boot partition is for some reason pointing to the sda3 partition for Grub's menu.lst file, when Grub should be pointing to your sda2 boot partition for the menu.lst; that would explain why you get dumped into the Grub command line on start up, because Grub can't find the menu.lst. How about trying the following:
And please post the output of the commands before doing "quit." The above commands will reinstall Grub to the boot sector of your sda2 partition and hopefully correct the problem. Next reboot, and let us know exactly what happens on start up. We can work from there if you want.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.