No option to boot into WinXP (with Ubuntu 8.04 installed)
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.
No option to boot into WinXP (with Ubuntu 8.04 installed)
Hello,
I am a total newbie to Linux.
Recently, I have been trying to setup the Ubuntu OS on my WinXP desktop. My desktop originally had Win2K and WinXP installed on 2 separate partitions on a single hard-disk drive. When installing Ubuntu, I had selected to have the Win2k partition deleted and created 3 partitions in which to install Ubuntu, namely
Partition 1
Swap Point : /
Partition 2
Swap Point : /home
Partition 3
Swap Files
Installation went smooth enough but when i restarted the computer, there was no option to boot into WinXP. Even when I hit the "ESC" key while boot-up during the GRUB prompt, there were only 3 entries with "Ubuntu" heading, none with no option for WinXP.
I have browsed through the forums and came across a similar case. I ran the test that was recommended in that thread using Applications -> Accessories -> Terminal
Code:
cd ~/Desktop && wget 'http://home.comcast.net/~ubuntu_grub/boot_info_script.text' && sudo bash boot_info_script.txt
Below are the results :
Code:
============================= Boot Info Summary: ==============================
=> Grub0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
sda1: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 8.04.1
Boot files/dirs: /boot/grub/menu.lst /etc/fstab
sda2: _________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: _________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System: Windows XP
Boot files/dirs: /wubildr.mbr
sda6: _________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sda7: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:
=========================== Drive/Partition Info: =============================
Drive sda: _____________________________________________________________________
Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders, total 78165360 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd9f5d9f5
Partition Boot Start End Size Id System
/dev/sda1 * 63 13,671,314 13,671,252 83 Linux
/dev/sda2 13,671,315 78,108,029 64,436,715 f W95 Ext d (LBA)
/dev/sda5 39,054,078 78,108,029 39,053,952 7 HPFS/NTFS
/dev/sda6 13,671,441 17,575,109 3,903,669 82 Linux swap / Solaris
/dev/sda7 17,575,173 39,054,014 21,478,842 83 Linux
blkid -c /dev/null: ____________________________________________________________
/dev/sda1: UUID="3d9e3af0-884d-4d51-ad52-ca85a644ab3a" TYPE="ext3"
/dev/sda5: UUID="50944220944208C4" LABEL="WinXP" TYPE="ntfs"
/dev/sda6: TYPE="swap" UUID="41fb043d-0cce-429b-b6e0-1fd3a958c0f9"
/dev/sda7: UUID="b9b36923-9046-452b-977a-199ee635
Sorry, I think the results in the first post got truncated so I append again here
Code:
============================= Boot Info Summary: ==============================
=> Grub0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
sda1: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 8.04.1
Boot files/dirs: /boot/grub/menu.lst /etc/fstab
sda2: _________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: _________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System: Windows XP
Boot files/dirs: /wubildr.mbr
sda6: _________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sda7: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:
=========================== Drive/Partition Info: =============================
Drive sda: _____________________________________________________________________
Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders, total 78165360 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd9f5d9f5
Partition Boot Start End Size Id System
/dev/sda1 * 63 13,671,314 13,671,252 83 Linux
/dev/sda2 13,671,315 78,108,029 64,436,715 f W95 Ext d (LBA)
/dev/sda5 39,054,078 78,108,029 39,053,952 7 HPFS/NTFS
/dev/sda6 13,671,441 17,575,109 3,903,669 82 Linux swap / Solaris
/dev/sda7 17,575,173 39,054,014 21,478,842 83 Linux
blkid -c /dev/null: ____________________________________________________________
/dev/sda1: UUID="3d9e3af0-884d-4d51-ad52-ca85a644ab3a" TYPE="ext3"
/dev/sda5: UUID="50944220944208C4" LABEL="WinXP" TYPE="ntfs"
/dev/sda6: TYPE="swap" UUID="41fb043d-0cce-429b-b6e0-1fd3a958c0f9"
/dev/sda7: UUID="b9b36923-9046-452b-977a-199ee635da75" TYPE="ext3"
=============================== "mount" output: ===============================
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-19-generic/volatile type tmpfs (rw)
/dev/sda7 on /home type ext3 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/prdtest11/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=prdtest11)
=========================== sda1/boot/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 3
## 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=3d9e3af0-884d-4d51-ad52-ca85a644ab3a ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
## 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.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=3d9e3af0-884d-4d51-ad52-ca85a644ab3a ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=3d9e3af0-884d-4d51-ad52-ca85a644ab3a ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
title MS Windows XP
root (hd0,0)
savedefault
makeactive
chainloader +1
### END DEBIAN AUTOMAGIC KERNELS LIST
=============================== sda1/etc/fstab: ===============================
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=3d9e3af0-884d-4d51-ad52-ca85a644ab3a / ext3 relatime,errors=remount-ro 0 1
# /dev/sda7
UUID=b9b36923-9046-452b-977a-199ee635da75 /home ext3 relatime 0 2
# /dev/sda6
UUID=41fb043d-0cce-429b-b6e0-1fd3a958c0f9 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
=================== sda1: Location of files loaded by Grub: ===================
5.6GB: boot/grub/menu.lst
5.7GB: boot/grub/stage2
5.6GB: boot/initrd.img-2.6.24-19-generic
5.7GB: boot/vmlinuz-2.6.24-19-generic
5.6GB: initrd.img
5.7GB: vmlinuz
I did some searching in the web and based on the above results, I added these lines to menu.lst :
Code:
title MS Windows XP
root (hd0,4)
savedefault
makeactive
chainloader +1
After rebooting, there was indeed an option for WinXP but when I selected this option, it generated an error "invalid device".
Where did I go wrong ? Anyone ?
Look at the output from the boot info script with partition information:
Quote:
Partition Boot Start End Size Id System
/dev/sda1 * 63 13,671,314 13,671,252 83 Linux
/dev/sda2 13,671,315 78,108,029 64,436,715 f W95 Ext d (LBA)
/dev/sda5 39,054,078 78,108,029 39,053,952 7 HPFS/NTFS
/dev/sda6 13,671,441 17,575,109 3,903,669 82 Linux swap / Solaris
/dev/sda7 17,575,173 39,054,014 21,478,842 83 Linux
Your xp is on sda5 which is a logical partition and it won't boot from a logical partition unless you have another windows install on a primary. I expect your boot files for your windows install (w2k & xp) were in the w2k partition which you deleted. Create another primary for xp.
Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd9f5d9f5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 851 6835626 83 Linux
/dev/sda2 852 4862 32218357+ f W95 Ext'd (LBA)
/dev/sda5 2432 4862 19526976 7 HPFS/NTFS
/dev/sda6 852 1094 1951834+ 82 Linux swap / Solaris
/dev/sda7 1095 2431 10739421 83 Linux
Partition table entries are not in disk order
Look at the output from the boot info script with partition information:
Your xp is on sda5 which is a logical partition and it won't boot from a logical partition unless you have another windows install on a primary. I expect your boot files for your windows install (w2k & xp) were in the w2k partition which you deleted. Create another primary for xp.
I am not exactly sure how the computer was originally setup - whether it was on a Primary or Logical partition. However I could see that WinXP and Win2K were on different partitions and when I started up the system, there was a selection menu that allowed me to boot into either. Correct me if I am wrong but I thought Windows had to be in a primary partition to enable it to be booted into ? Unless I have access to Windows, I cannot confirm the information about this partition because I am a complete noob to Linux... Any suggestions as to how I might read this info from Linux ?
Just guessing but, if this computer had w2k and xp, I imagine w2k was inistalled first and on the first primary partition. xp could have been on a logical partition. w2k and xp use the same bootloader so when the xp was installed entries were created in the w2k boot.ini to boot it. You deleted/overwrote the first primary with Ubuntu so those files are gone.
On my first hardrive, I have W98 on the first primary and w2k on the first logical. The w2k boot files are in the w98 partition and both systems are booted from them.
If you go to the support.microsoft.com site you can search and find info on this. You won't be able to boot windows from a logical partition without another windows OS on a primary.
Just guessing but, if this computer had w2k and xp, I imagine w2k was inistalled first and on the first primary partition. xp could have been on a logical partition. w2k and xp use the same bootloader so when the xp was installed entries were created in the w2k boot.ini to boot it. You deleted/overwrote the first primary with Ubuntu so those files are gone.
On my first hardrive, I have W98 on the first primary and w2k on the first logical. The w2k boot files are in the w98 partition and both systems are booted from them.
If you go to the support.microsoft.com site you can search and find info on this. You won't be able to boot windows from a logical partition without another windows OS on a primary.
Yes, that might be possible. I wasn't the one who installed the PC originally so I can't be absolutely sure. By the way, is there any way I could :
1) check whether it is a logical partition in the Linux environment ? (maybe with the fdisk command ?)
2) confirm if the bootloader files are still in WinXP ?
Yes, that might be possible. I wasn't the one who installed the PC originally so I can't be absolutely sure. By the way, is there any way I could :
1) check whether it is a logical partition in the Linux environment ? (maybe with the fdisk command ?)
2) confirm if the bootloader files are still in WinXP ?
From your previous post, the output of fdisk -l is telling you that the XP partition is a logical one. /dev/sda2 is an extended partition and therefore all partitions after that are logical ones (and all before it are primary ones).
Now, since you're allowed up to 4 primary partitions (or is it 3 primary + 1 extended? I forget whether an extended partition is also considered a primary), and you're only using 4, maybe you can simply rewrite the partition table to this:
Code:
Device Boot Start End Blocks Id System
/dev/sda1 1 851 6835626 83 Linux
/dev/sda2 852 1094 1951834+ 82 Linux swap / Solaris
/dev/sda3 1095 2431 10739421 83 Linux
/dev/sda4 * 2432 4862 19526976 7 HPFS/NTFS
without changing anything else. Note I've reordered the partitions there to correspond to their start and end points as reported by fdisk - I don't understand why they are currently numbered in a different order.
Wait for somebody else to chime in first though, because that may be bad advice which will break things! But logically it seems like it should work. If you try it, make sure you back up the old partition table, and any important data. If it doesn't work, you should be able to just restore the old table, but there's an outside chance you'd need to reinstall Ubuntu because of something I've not thought of.
Re your 2nd question - see if there's a boot.ini file on the root of the win partition. Mine (for WinXP) looks like this:
Quote:
[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
If you amend your partition table to what I said above, you should be able to copy that and just change partition(1) to partition(4). But if there's no code in the boot sector of the Windows partition that's a more serious problem. However I would think there would have to be, if it was working before - maybe yancek knows more about that.
PS just so you know, in your OP you meant "mount point" rather than "swap point". "swap" means virtual memory - so you can have swap partitions or swap files, but "swap point" means nothing.
You can have up to 4 primary partitions, one of which can be used as an extended partition in which you can create logical partitions.
Quote:
check whether it is a logical partition in the Linux environment ? (maybe with the fdisk command ?)
Using the fdisk command in Linux, logical partitions start with "5". If you have one primary as sda1 and create and extended (sda2) your first logical will be sda5.
Quote:
confirm if the bootloader files are still in WinXP ?
Create a mount point for xp in Ubuntu: sudo mkdir /mnt/xp
mount the filesystem: sudo mount -t ntfs /dev/sda5 /mnt/xp
open a terminal and navigate to xp: cd /mnt/xp
look for files: ls -l /mnt/xp/
if you have boot.ini, ntldr, etc...
I'm not sure how you would change xp to primary. You should be able to create another primary as you only have 2 now. I'll post back if I figure out how you might do this?
Found this site which explains how to do this and it is with Ubuntu. The important part starts at Post#6 and I would suggest you read through to the end a couple of times before starting anything.
Found this site which explains how to do this and it is with Ubuntu. The important part starts at Post#6 and I would suggest you read through to the end a couple of times before starting anything.
Well, I tried the suggested method in the link above but it didn't work. It was unable to boot into the OS after the changes - there were several error messages about being unable to create the folders in /home. I am now in the process of re-installing Windows.
Anyway, thanks for the help guys. Let me know if you need any clarifications on any steps I've done.
It was unable to boot into the OS after the changes - there were several error messages about being unable to create the folders in /home.
You mean you can't boot Ubuntu now? Hmm, I wonder if changing the partition table changes the partitions' UUIDs. In which case you'll need to edit your /etc/fstab to point to the newly-renumbered /home partition.
Shame about XP, but it should work after you reinstall anyway. I think it normally puts the bootloader in the MBR so you'll need to run Grub from a live cd to be able to Ubuntu again. Alternatively you can edit boot.ini and have the Windows bootloader display a boot menu with Ubuntu on there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.