LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-07-2007, 05:33 PM   #1
Chronothread
Member
 
Registered: Apr 2007
Posts: 121

Rep: Reputation: 15
Dual Boot Into Windows Trouble


Hello. I am currently running Ubuntu 7.04 with KDE and would like to be able to dual boot to windows xp. Originally, one of my friends set up this version of Linux on my computer. GRUB was was on along with it and windows was another boot option I originally had. However, I recently updated my Ubuntu using adept and in doing so, windows was replaced on the boot list by the update. In the end, I would now like to find a way to get windows back onto my boot list. I know this probably isn't enough information about my system to explain to me how to accomplish this, so if there's any other info you need please just let me know. Also, know that I hardly know what I"m doing with Linux still, so I may ask a few questions about the answers you give me. Thank you for your time.
 
Old 09-07-2007, 05:58 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The first thing needed is to find out able the disk landscape of your computer. As root run
Code:
fdisk -l
(That is lowercase 'ell', not 'one').

That should return a list of partitions, of which one or more hopefully contains your Windows stuff. Post the results here (in code tags, please).

Also, post your /boot/grub/grub.conf or /boot/grub/menu.lst file here (again, please be courteous, and use code tags)
From there, we can begin to piece the recovery process together.

--- rod.
 
Old 09-07-2007, 06:15 PM   #3
Chronothread
Member
 
Registered: Apr 2007
Posts: 121

Original Poster
Rep: Reputation: 15
Alright,
Code:
fdisk -l
Gives me the following:
Code:
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       12791   102743676   83  Linux
/dev/sda2   *       12792       24134    91112647+   7  HPFS/NTFS
/dev/sda3           24135       24321     1502077+   5  Extended
/dev/sda5           24135       24321     1502046   82  Linux swap / Solaris
I'm almost certain by knowing this that the second boot device is Windows.

Also, my /boot/grub/menu.lst is as follows:
Code:
# 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 change this entry to 'saved' 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=ecf427ba-8726-443d-a568-58a0695fdc00 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

## ## End Default Options ##

title		Ubuntu, kernel 2.6.20-16-generic
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.20-16-generic root=UUID=ecf427ba-8726-443d-a568-58a0695fdc00 ro quiet splash
initrd		/boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title		Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.20-16-generic root=UUID=ecf427ba-8726-443d-a568-58a0695fdc00 ro single
initrd		/boot/initrd.img-2.6.20-16-generic

title		Ubuntu, kernel 2.6.20-15-generic
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.20-15-generic root=UUID=ecf427ba-8726-443d-a568-58a0695fdc00 ro quiet splash
initrd		/boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title		Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.20-15-generic root=UUID=ecf427ba-8726-443d-a568-58a0695fdc00 ro single
initrd		/boot/initrd.img-2.6.20-15-generic

title		Ubuntu, memtest86+
root		(hd0,0)
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST
And thanks for the help/quick reply.
 
Old 09-07-2007, 07:03 PM   #4
benerivo
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Rep: Reputation: 15
I think you need to add some lines to your /boot/grub.nenu.lst file. Here is the end of mine...


kernel /boot/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/hda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1



See how it adds on an extra entry beneath the "### END DEBIAN AUTOMAGIC KERNELS LIST" line. My XP is on my hda1 partition, and so is called "hd0,0" in grub. To explain...
a = 0
b = 1

1 = 0
2 = 1

so...

hdb2 is 1,1
hda2 is 0,1
hda1 is 0,0
sda2 is 0,1

I would add an option in to your /boot/grub.nenu.lst like mine to read...


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

Last edited by benerivo; 09-07-2007 at 07:05 PM.
 
Old 09-07-2007, 07:55 PM   #5
Chronothread
Member
 
Registered: Apr 2007
Posts: 121

Original Poster
Rep: Reputation: 15
Awesome, Windows XP now appears in GRUB.

In the end I added the following:
Code:
# 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/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1
to the /boot/grub/menu.lst

Thanks a lot for the help and knowledge. And I think it makes enough sense now that if I install another OS I don't think I'll need to ask for help. Thanks again.
 
  


Reply



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
dual boot and boot loader trouble cyberiapost Linux - Newbie 3 11-30-2006 05:04 PM
dual boot trouble Raziel Slackware 2 08-24-2005 05:33 PM
4 primary partitions, windows dual boot trouble geekX Linux - General 5 02-25-2004 04:42 PM
Trouble getting Windows XP to dual boot with Fedora using GRUB davstin2002 Linux - Newbie 12 01-22-2004 03:24 PM
Dual Boot Trouble, cant load Windows 2000 wizeguy12 Linux - Newbie 6 09-24-2003 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:27 AM.

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