Grub with Ubuntu and Windows XP

Asked by Wayne Burns

Trying to use GRUB bootloader to start Ubuntu 8.04 and Windows XP (service pack 3) on Dell Desktop Dimension 4100 with swap and primary partition for Ubuntu.
Prior to Ubuntu first partition had Windows 98 and second partition had Windows XP. I wanted to use the 20 GB first partition for removal of Windows 98 and installation of Ubuntu 8.04, and I retained second partition with Windows XP. I am a newbie in Ubuntu and I now believe that the MBR was on beginning of first partition (Windows 98) and was destroyed when Ubuntu was installed. Don't know how to use GRUB, but would like to configure it to allow default boot to Windows XP (for wife) with choice for me to boot into Ubuntu upon start-up.

Would very much appreciate if someone could provide detailed instrutions on how to accomplish this. GRUB was installed from distribution disk from Ubuntu (don't know if it was GRUB 2 or not). When booting the computer I hit Esc key to show various choices, but nothing at all about Windows XP. I know that I did not disturb Windows XP when I installed Ubuntu.

I need help in configuring GRUB to accomplish this. As much detail as possible would be appreciated.

Thank you for any response.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

To help you better we need some infos about your hard disk partitions so please open a Terminal from the menu Applications->Accessories->Terminal and type:

sudo fdisk -l

give your user password when requested, you don't see nothing when you type it, then press enter.

-l parameter is lower of -L

copy and paste result here.

Then copy and paste here the content of your /boot/grub/menu.lst file, using terminal type:

gedit /boot/grub/menu.lst

Thank you

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#2

I am assuming you can boot into Ubuntu and not Windows. This can easily be fixed, we just need to know some basic information about your system. Please follow marcobra´s instructions and paste the output of these two commands. We will provide simple instruction on how to configure you machine to dual boot.

Thanks

Revision history for this message
Wayne Burns (wburns05) said :
#3

On Sun, 2008-09-28 at 03:39 +0000, marcobra wrote:
> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> Project: Ubuntu => grub in ubuntu
> wayne@wayne-desktop:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd6a4d6a4

   Device Boot Start End Blocks Id System
/dev/sda1 1 426 3421813+ 82 Linux swap /
Solaris
/dev/sda2 2551 9726 57641220 f W95 Ext'd (LBA)
/dev/sda3 * 427 2550 17061030 83 Linux
/dev/sda5 2551 9726 57641188+ b W95 FAT32

Partition table entries are not in disk order
wayne@wayne-desktop:~$

# 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=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro single
initrd /boot/initrd.img-2.6.24-19-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Thanks for any help. The question was asked if Ubuntu boots and it does.

Will anxiously await your reply.

Wayne Burns

Revision history for this message
peter b (b1pete) said :
#4

hello Wyne Burns,

reading your question just thought that the reply to GODSMACK may be of some help

https://answers.launchpad.net/ubuntu/+question/46489

peter b

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#5

Did you install Windows XP as FAT32 partition instead of NTFS ?
I am little confused, I do not see a boot flag enabled on you FAT partition. Anyway you will need to create entry in the grub boot menu.

Open up a terminal with menu Applications-> Accessories->Terminal and type, or better to copy and paste

sudo gedit /boot/grub/menu.lst

To make Windows the default boot option add this after this line

## ## End Default Options ##

title Microsoft Windows XP
rootnoverify (hd0,1)
makeactive
chainloader +1

Save and exit

Also I am curious about your Windows boot loader you were using previously. If you have problems booting to Windows still, report the errors that you are getting along with the contents of the following windows file

boot.ini

Hope this helps

Revision history for this message
Wayne Burns (wburns05) said :
#6

On Sun, 2008-09-28 at 08:50 +0000, WWSmith36 wrote:
> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> Status: Needs information => Answered
>
> WWSmith36 proposed the following answer:
> I am assuming you can boot into Ubuntu and not Windows. This can easily
> be fixed, we just need to know some basic information about your system.
> Please follow marcobra´s instructions and paste the output of these two
> commands. We will provide simple instruction on how to configure you
> machine to dual boot.
>
> Thanks

Here is info you requested:

On Sun, 2008-09-28 at 03:39 +0000, marcobra wrote:
> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> Project: Ubuntu => grub in ubuntu
> wayne@wayne-desktop:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd6a4d6a4

   Device Boot Start End Blocks Id System
/dev/sda1 1 426 3421813+ 82 Linux swap /
Solaris
/dev/sda2 2551 9726 57641220 f W95 Ext'd (LBA)
/dev/sda3 * 427 2550 17061030 83 Linux
/dev/sda5 2551 9726 57641188+ b W95 FAT32

Partition table entries are not in disk order
wayne@wayne-desktop:~$

# 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=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro single
initrd /boot/initrd.img-2.6.24-19-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Thanks for any help. The question was asked if Ubuntu boots and it does.

Will anxiously await your reply.

Wayne Burns

>

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#7

Please re-read my last post.

Thank you

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#8

I think is better

Open up a terminal with menu Applications-> Accessories->Terminal and type, or better to copy and paste

cd /boot/grub/
sudo cp menu.lst menu.old
sudo gedit /boot/grub/menu.lst

give your user password when requested, you don't see nothing when you type it, then press enter.

Delete all /boot/grub/menu.lst content and please copy and paste the rows below into that file, then save and exit and reboot your pc:

# 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=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro single
initrd /boot/initrd.img-2.6.24-19-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST

title Microsoft Windows XP
rootnoverify (hd0,4)
makeactive
chainloader +1

Revision history for this message
Wayne Burns (wburns05) said :
#9

Windows XP was installed as FAT 32. After your changes to
gedit /boot/grub/menu.lst --I get a listing of "Microsoft Windows XP"
but it does not boot, resulting in error message as follows:
Error 12: Invalid Device Requested
Here is my menu.lst file after the changes.

# 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=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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 Microsoft Windows XP
rootnoverify (hd0,1)
makeactive
chainloader +1

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro single
initrd /boot/initrd.img-2.6.24-19-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST
On Sun, 2008-09-28 at 16:53 +0000, WWSmith36 wrote:
> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> WWSmith36 proposed the following answer:
> Did you install Windows XP as FAT32 partition instead of NTFS ?
> I am little confused, I do not see a boot flag enabled on you FAT partition. Anyway you will need to create entry in the grub boot menu.
>
> Open up a terminal with menu Applications-> Accessories->Terminal and
> type, or better to copy and paste
>
> sudo gedit /boot/grub/menu.lst
>
> To make Windows the default boot option add this after this line
>
> ## ## End Default Options ##
>
> title Microsoft Windows XP
> rootnoverify (hd0,1)
> makeactive
> chainloader +1
>
> Save and exit
>
> Also I am curious about your Windows boot loader you were using
> previously. If you have problems booting to Windows still, report the
> errors that you are getting along with the contents of the following
> windows file
>
> boot.ini
>
> Hope this helps
>

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#10

Please see my previous post...

Hope this helps

Revision history for this message
Wayne Burns (wburns05) said :
#11

Followed your instructions below, but now cannot boot to either Ubuntu
or Windows XP. Upon reboot GRUB lists all operating systems, including
Ubuntu and Windows XP, but NONE will boot. I copied the menu.lst file
(to menu.old) that did work before trying this, and now I need to know
how to copy menu.old back to menu.lst -----the only thing I can do
from my present situation is press "c" for a command line, but the
line is only has a GRUB prompt. Is there a way to reinstate my old
menu.lst under this situation? Before I can continue to try to get
GRUB to boot both operating systems I have to get back to being able
to boot Ubuntu. I have tried to boot thru the recovery but it won't
work either. I'm hoping I don't have to REINSTALL all of Ubuntu.

I hope you have some ideas that will help me. Thank you.

Wayne Burns

On Sep 28, 2008, at 12:54 PM, marcobra wrote:

> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> marcobra proposed the following answer:
> I think is better
>
> Open up a terminal with menu Applications-> Accessories->Terminal and
> type, or better to copy and paste
>
> cd /boot/grub/
> sudo cp menu.lst menu.old
> sudo gedit /boot/grub/menu.lst
>
> give your user password when requested, you don't see nothing when you
> type it, then press enter.
>
> Delete all /boot/grub/menu.lst content and please copy and paste the
> rows below into that file, then save and exit and reboot your pc:
>
>
> # 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=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro
>
> ## Setup crashdump menu entries
> ## e.g. crashdump=1
> # crashdump=0
>
> ## default grub root device
> ## e.g. groot=(hd0,0)
> # groot=(hd0,2)
>
> ## 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,2)
> kernel /boot/vmlinuz-2.6.24-19-generic
> root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 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,2)
> kernel /boot/vmlinuz-2.6.24-19-generic
> root=UUID=5e09740e-7b8b-49db-9044-b3c0a1b1aed7 ro single
> initrd /boot/initrd.img-2.6.24-19-generic
>
> title Ubuntu 8.04.1, memtest86+
> root (hd0,2)
> kernel /boot/memtest86+.bin
> quiet
>
> ### END DEBIAN AUTOMAGIC KERNELS LIST
>
> title Microsoft Windows XP
> rootnoverify (hd0,4)
> makeactive
> chainloader +1
>
> --
> If this answers your question, please go to the following page to
> let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529/+confirm?answer_id=7
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Wayne Burns (wburns05) said :
#12

Still need help -- please see earlier email from me a few minutes ago.

Wayne Burns

On Sep 28, 2008, at 1:18 PM, marcobra wrote:

> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> Status: Open => Answered
>
> marcobra proposed the following answer:
> Please see my previous post...
>
> Hope this helps
>
> --
> If this answers your question, please go to the following page to
> let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529/+confirm?answer_id=9
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#13

You can easy solve this by booting from Ubuntu live install cd using nautilus as root user on a free desktop
press ALT+F2 and type into opened window

gksudo nautilus

press simply enter if the system ask you for a password

then browse your hard-disk and still using Nautilus delete the menu.lst file and rename the menu.old to menu.lst

Then restart your pc.

Hope this helps

Revision history for this message
Wayne Burns (wburns05) said :
#14

Still have same problem of being unable to dual boot Windows XP and Ubuntu. None of the above has remedied the problem.

To repeat something about my situation it may be important to know:

Before installing Ubuntu, I had a two partition 80GB internal drive which was divided into two partitions as follows:

On first partition (C:) I had Windows 98 installed on this 20 GB partition; and on second partition (D:) had Windows P using the remaining 60 GB of the drive.

At the time of the original installation of the two Windows operating systems, it was required to install Windows 98 on the first 20 GB partition and following that to finally install Windows XP. It was not possible to install Windows XP first.

Finally in the earlier two Windows installations (before Ubuntu, which now boots on first partition) there was installed a bootloader which allowed either version of Windows to be booted; with the XP version being the default.

I don't know if the above is pertinent or not, but is it possible that the original installation of the Windows bootloader modified the XP bootloader at the time? Would this be causing problems now?

Does it make any difference that I already had XP installed on the second 60 GB partition before installing Ubuntu on the first 20 GB partition?

I have worked with gedit /boot/grub/menu.lst ad infinitum, and none of my changes have worked.

Windows XP is listed in GRUB but it will not boot Windows. Ubuntu does boot. Time and effort by anyone will be appreciated. Thanks.

Revision history for this message
Wayne Burns (wburns05) said :
#15

Still having Win 98 boot problems. If further info needed, please let
me know. I thought I would resend the following info from fdisk:

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd6a4d6a4

   Device Boot Start End Blocks Id System
/dev/sda1 1 426 3421813+ 82 Linux swap /
Solaris
/dev/sda2 2551 9726 57641220 f W95 Ext'd (LBA)
/dev/sda3 * 427 2550 17061030 83 Linux
/dev/sda5 2551 9726 57641188+ b W95 FAT32

Partition table entries are not in disk order

Next here is my present menu.lst file:

# 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=47220d30-d297-4bb2-9a5d-5b54b1a6bfb1 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=47220d30-d297-4bb2-9a5d-5b54b1a6bfb1 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=47220d30-d297-4bb2-9a5d-5b54b1a6bfb1 ro single
initrd /boot/initrd.img-2.6.24-19-generic

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

title Windows XP
rootnoverify (hd0,2)
map (hd0) (hd1)
map (hd1) (hd0)
savedefault
makeactive
chainloader +1

### END DEBIAN AUTOMAGIC KERNELS LIST

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#16

Wayne,

Sorry that I was not able to responded sooner. I have reviewed you menu.lst file. Since you have a single drive and the windows boot loader was over-written, you must edit you menu.lst to be able to boot to WinXp. You Win98 partition was overwritten that will no longer be available.

Since you only have one partition, grub calls it partition 0 (its common with computers to start numbering at zero). Furthermore, each partition is numbered, starting from zero.

From looking at your fisk -l output. It appear from you fisk -l output that:
/dev/sda1 contains you linux swap file
/dev/sda2 appears to be an extended partition containing other logical partitions.
/dev/sda3 seems to be your Ubuntu partition
/dev/sda5 might be your WinXp drive

Based upon this information alone, it seem that you WinXp partition should be defined in menu.lst as

title Windows XP
rootnoverify (hd0,3)
makeactive
chainloader +1

This partitioning scheme seems to be a bit contrary to what would be expected from you intitial explanation. I am requesting that you provide some more information to clarify where your WinXp installation resides.

Please boot to Ubuntu or the LiveCD and try these commands to mount you WinXP drive (assuming its ntfs format)

sudo mkdir /media/windows
sudo mount -t ntfs-3g /dev/sda5 /media/windows
ls /media/windows

If this out provides a directory listing of the windows C:\ drive then menu.lst entry that I provided above should get you back into WinXp.

If this does not work, please respond with in detail at any errors, the actual contents of /dev/sda5, or exhaustive explanation of your problems. If this answers your question, please mark it as solved.

Thank you

Revision history for this message
Wayne Burns (wburns05) said :
#17

Let me say first that I appreciate your time and patience. I tried your suggested entry into menu.lst but it did not work. It returned:
Error 2: Invalid device requested. I went thru a long list of device changes to "rootnoverify" using trial and error but none were successful.

I think you are right that it must be determined accurately where Windows XP resides. I re-run "sudo fdisk -l" with results:

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd6a4d6a4

  Device Boot Start End Blocks Id System
/dev/sda1 1 426 3421813+ 82 Linux swap /
Solaris
/dev/sda2 2551 9726 57641220 f W95 Ext'd (LBA)
/dev/sda3 * 427 2550 17061030 83 Linux
/dev/sda5 2551 9726 57641188+ b W95 FAT32

Partition table entries are not in disk order
wayne@wayne-desktop:~$

To me, a novice, it looks like Windows XP resides on /dev/sda2 AND /dev/sda5, but I don't know how that translates to GRUB.

Unfortunately, my Windows XP is on FAT 32 so the command you suggested for ntfs will not work, will it? If not, then can you suggest a command for sudo that will reliably give the file where Windows XP FAT 32 resides?

I THINK IT IS IMPORTANT FOR YOU TO UNDERSTAND that pre-Ubuntu the C: drive contained Windows 98 and that Windows XP resided on drive D:, and there were two partitions. When I installed Ubuntu I replaced Windows 98 with Ubuntu and left Windows XP undisturbed.

Now presently Windows XP is not loaded into the first, or beginning drive,but rather in a non-first partition. In my studies I have learned that this complicates being able to boot Windows XP with GRUB. I hope it is possible to solve this problem.

Also, in my studies I have found that under my circumstances it may be necessary to enter two map lines, as follows:

map (hd0 (hd1)
map (hd1) (hd0)

I have experimented with these map commands but to no avail.

Do you think the map entries are essential in my situation?

I really need to salvage Windows XP since I do not have re-installation disks to do so.

Again, thanks for your help.

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#18

I think the proper mount parameter for FAT32 filesystems is vfat, so

sudo mkdir /media/windows
sudo mount -t vfat /dev/sda5 /media/windows
ls /media/windows

I think marcobra´s suggestion of defining your windows installation in grub as

title Microsoft Windows XP
rootnoverify (hd0,4)
makeactive
chainloader +1

is correct. Typically, the menu.lst partition specifier is one value less than fdisk sda specifier. So sda5 would look like (hd0, 4). Did you try this in you ¨trial and error¨?

As for mapping, this is only required when there are two separate hard drives and windows is installed on the secondary hard drive. One of the requirements of windows is that it must be installed on the primary hard drive. Mapping is a technique used to fool windows into thinking that it is on the primary hard drive.

If you are successful in mounting you windows partition, I would be interested in the contents of your windows boot.ini file located in the base directory on your windows partition.

Revision history for this message
Wayne Burns (wburns05) said :
#19

I was unsuccessful after implementing your suggestions below. I am
enclosing a copy of the terminal readout yielded by the sudo commands,
as follows:

wayne@wayne-desktop:~$ sudo mkdir /media/windows
[sudo] password for wayne:
mkdir: cannot create directory `/media/windows': File exists
wayne@wayne-desktop:~$ sudo mount -t vfat/dev/sda5/media/windows
wayne@wayne-desktop:~$ ls /media/windows/*.*
ls: cannot access /media/windows/*.*: No such file or directory
wayne@wayne-desktop:~$ sudo ls /media/windows
wayne@wayne-desktop:~$ sudo cd /media/windows
sudo: cd: command not found
wayne@wayne-desktop:~$ sudo mount -t /vfat/dev/sda5/media/windows
wayne@wayne-desktop:~$ ls /media/windows
wayne@wayne-desktop:~$

After running these commands I get no response from the "ls /media/
windows" command. I understand it is supposed to list the files in
Windows C:\ drive, but as you can see above there was no output.
Perhaps I misread your instructions as to the exact, specific commands
because I was not always sure when to put in a "space" in the command
lines. I ran the commands above twice, and that is why line 3 says
that /media/windows file exists. I assume the mount command took
effect because there was no readout of any error in this command.

I hope this will shed some light upon the problem. I take it that
since the "ls /media/windows" did not give a readout that it means I
did not successfully mount the drive. If you could ascertain whether
the command I used to mount the drive was correct, it would go a long
ways toward solving this problem.

I did make the changes suggested in the menu.lst file. Thanks again
for your time and efforts. I JUST NOTICED THAT THE "MKDIR" COMMAND DID
NOT INCLUDE THE DRIVE. Should it have been "sudo mkdir /dev/sda5/media/
windows"? Otherwise, how would the new directory be in the right
place? I hesitate to try this without your advance approval. Wouldn't
the command as entered by me have simply created a file (directory) in
Ubuntu rather than Windows. Isn't it needed to be in Windows? Thanks.

Wayne Burns

On Oct 6, 2008, at 1:33 PM, WWSmith36 wrote:

> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> Status: Open => Answered
>
> WWSmith36 proposed the following answer:
> I think the proper mount parameter for FAT32 filesystems is vfat, so
>
> sudo mkdir /media/windows
> sudo mount -t vfat /dev/sda5 /media/windows
> ls /media/windows
>
> I think marcobra´s suggestion of defining your windows installation in
> grub as
>
> title Microsoft Windows XP
> rootnoverify (hd0,4)
> makeactive
> chainloader +1
>
> is correct. Typically, the menu.lst partition specifier is one value
> less than fdisk sda specifier. So sda5 would look like (hd0, 4). Did
> you try this in you ¨trial and error¨?
>
> As for mapping, this is only required when there are two separate hard
> drives and windows is installed on the secondary hard drive. One of
> the
> requirements of windows is that it must be installed on the primary
> hard
> drive. Mapping is a technique used to fool windows into thinking that
> it is on the primary hard drive.
>
> If you are successful in mounting you windows partition, I would be
> interested in the contents of your windows boot.ini file located in
> the
> base directory on your windows partition.
>
> --
> If this answers your question, please go to the following page to
> let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529/+confirm?answer_id=17
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#20

The linux file system are different from what you are accustomed to in windows.

The standard form of the mount command, is
mount -t type device directory

As you can see from the command the spaces are very important.
sudo mount -t vfat /dev/sda5 /media/windows

This will take your device /dev/sda5 and attach it to our file system under the directory named /media/windows. Now if you want to see whats on the DRIVE called /dev/sda5 we just look in the folder /media/windows.

After you mount the drive, I suggest you use the file manager and browser it. Once you do this, you will have a better understanding of how the linux file system and directory structure works.

Also to gain a better understand of the mount command you type in the terminal
man mount

This will give the you the manual on the mount command. Hit ´q´ to quit the manual. This will work for any command.

Hope this helps

Revision history for this message
Wayne Burns (wburns05) said :
#21

WW, I still can't boot Windows XP, but have made the following progress. I was able to use the mount command and by using ls I could view the windows files, directories. I may still be having problems with making the proper entries into menu.lst to boot XP. I'm not sure as to exactly what location to place the XP entries. I'm enclosing a copy of my latest menu.lst, and as you can see I put the entry up higher rather than near the end of the find. What is the best, or only, location to put the XP entries? Just prior to this latest menu.lst I tried placing the XP entries near the end of the file, but to no avail.

When I try to boot XP, unsuccessfully, it returns the following:

Error 12: Invalid device requested.

With regard to the use of mount, I assume that once it's been done under sudo that it would not require new mounts after restarts. Right?

Here is the complete menu.lst file:

# 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

title Microsoft Windows XP
rootnoverify (hd0,4)
makeactive
chainloader +1

#

#
# 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=47220d30-d297-4bb2-9a5d-5b54b1a6bfb1 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=47220d30-d297-4bb2-9a5d-5b54b1a6bfb1 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,2)
kernel /boot/vmlinuz-2.6.24-19-generic
root=UUID=47220d30-d297-4bb2-9a5d-5b54b1a6bfb1 ro single
initrd /boot/initrd.img-2.6.24-19-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#22

Firstly, your windows entry should be at the end of the file after ### END DEBIAN AUTOMAGIC KERNELS LIST

Secondly, you will have to remount your windows drive after reboot, unless you setup /etc/fstab to automount it on bootup.

Thirdly, I believe that it was your Win98 bootloader that controlled booting into WinXP. Since WinXp is on an extended partition, that may also be causing some problems.

Can you check to make sure these files exist in the base directory of you windows partition (c:\)
boot.ini
ntldr
NTDETECT.COM

Please post the contents of your boot.ini files as well.

I believe the solution to this problem may be and edit to your boot.ini along with some partition remapping.

Thanks

Revision history for this message
Wayne Burns (wburns05) said :
#23

WW, thanks very much for your continuing help with my travails of dual booting XP and Ubuntu. I still need help.

I have the following output when I mount /dev/sda5 /media/windows an then use a ls command, as follows:

wayne@wayne-desktop:/media/windows$ ls /media/windows
AdvBackup.bkf found.000 hpzids01.dll System Volume
Information
artista found.001 My Designs temp
ARTlink found.002 OESD Designs Win98102302.bkf
Config.Msi found.003 OESD Simon windows
DocsSettings102202.bkf found.004 pagefile.sys WUTemp
Documents and Settings found.005 Program Files
epsonreg hiberfil.sys Recycled

I have an idea that one of my troubles may be that since I do not automount /dev/sda5 /media/windows; that even though I manually mount it, then I have to reboot to get back to using GRUB to start XP during which time I lose the mount. Seems like a real "catch 22". The only solution may be to automount by changing /etc/fstab to do this. I entered a command attempting to set up automount in that file, but upon rebooting, I could not get a readout for ls /media/windows. I entered the same command in /etc/fstab as when manually mounting, then saved the file. Would the command be different than normal if entered in /etc/fstab? I really need to get an automount started before continuing to experiment with GRUB. Could you please advise what the proper command would be inside /etc/fstab?

You asked if any of the files: boot.ini ntdlr NTDETECT.COM appears after a ls /media/windows and they do not as you can see from the readout above. I need help on how to obtain a print out of boot.ini so that I can send it.

I noted with much curiosity that the above readout contains a reference to Windows 98 which should be impossible in view of my using that partition for the installation of Ubuntu. How could it have survived?

Finally, what do you mean by partition remapping?

Thanks for your many kindnesses.

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#24

I have been investigating your problem in depth due to the fact that I don´t see many Win98 references, especially dual-boot win98 systems. Unfortunately, I believe you will most likely have to reinstall WinXP to get it working properly. I say this because these reasons.

1) Win98 was your primary partition and controlled booting of winXP. When that partition was over written so was you winXP bootloader.
2) Your winXP partition does not contain boot.ini ntdlr NTDETECT.COM - these are vital for booting winXP
3) If windows referred to your winXP as the D:\ drive, all you your windows registry entries will contain the invalid path references since winXP will now look at itself C:\

I think the best thing to do would be to back up all you windows data and reinstall windows. I would recommend reinstalling winXP to a primary partition rather than a logical partiion. After installing winXP you will then have to reinstall grub from the liveCD to get back into Ubuntu.

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#25

If you are still determined to get the system working as you can try this procedure.

Unmount /dev/sda5
Use gparted to manage the boot flag on /dev/sda5 and tick the box that says boot.
Remove the command makeactive for WinXP in you current menu.lst

Now when you boot you should get an error saying NTLDR is missing, press any key to restart

You will need to download a boot discs from this site.
http://tinyempire.com/notes/ntldrismissing.htm
Boot discs from that site have the needed Windows files that you would have been deleted with your Windows primary partition, that boot CD should boot Windows for you. Copy the three vital Windows XP boot loader files (ntldr, ntdetect.com and boot.ini), from the floppy disk or the CD to the root of the Windows partition and Windows should now be bootable from GRUB.

The procedure from that website seems a little confusing. All this said, I am not sure winXP will run properly if you do manage to boot to it. That is why I recommend a winXP reinstall.

Revision history for this message
Wayne Burns (wburns05) said :
#26

WW I'm going to start over and re-install Win XP on a blank formatted hard disk. There will be no partition at that time.

Later after getting XP working I will install Ubuntu and it will do the necessary partitioning. Should I use the "Guided" partition and installation for Ubuntu? Is there any particular advantage for a newbie to use the Manual which is what I used before? On an 80 GB drive how much space do you recommend for Ubuntu? How much swap partition? RAM is 256 MB.

Hoping to not have trouble, but just in case I do, can we leave this open so if I needed help I could contact you?

You have been generous with your time and help and it is most sincerely appreciated. Will keep you posted.

Revision history for this message
Wayne Burns (wburns05) said :
#27

On Oct 8, 2008, at 2:48 PM, WWSmith36 wrote:

> Your question #46529 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> WWSmith36 proposed the following answer:
> If you are still determined to get the system working as you can try
> this procedure.
>
> Unmount /dev/sda5
> Use gparted to manage the boot flag on /dev/sda5 and tick the box
> that says boot.
> Remove the command makeactive for WinXP in you current menu.lst
>
> Now when you boot you should get an error saying NTLDR is missing,
> press
> any key to restart
>
> You will need to download a boot discs from this site.
> http://tinyempire.com/notes/ntldrismissing.htm
> Boot discs from that site have the needed Windows files that you
> would have been deleted with your Windows primary partition, that
> boot CD should boot Windows for you. Copy the three vital Windows
> XP boot loader files (ntldr, ntdetect.com and boot.ini), from the
> floppy disk or the CD to the root of the Windows partition and
> Windows should now be bootable from GRUB.
>
> The procedure from that website seems a little confusing. All this
> said, I am not sure winXP will run properly if you do manage to boot
> to
> it. That is why I recommend a winXP reinstall.
>
> --
> If this answers your question, please go to the following page to
> let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529/+confirm?answer_id=24
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/46529
>
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#28

Yes use "Guided"

On 80 giga (i always use all only for Ubuntu) but i suggest you to assign half disk to Ubuntu

Windows(40) Ubuntu(40) giga

Consider to add more RAM memory to your pc to get best speed, you are under the minimum requested...

Minimum system requirements to install Ubuntu 8.04.1 https://help.ubuntu.com/community/Installation/SystemRequirements

Hope this helps

Revision history for this message
Andreas Troschka (signupbox) said :
#29

If memory helps, from the WinXP install CD can be generated some recovery floppy disks.
They can be used to reset a valid boot MBR, and to (automatically) rewrite the boot files with fresh copies.
This procedure doesn't delete any data in the Windows partition but gives you a chance to try to get the WinXP to boot again.

The main rule to have chances to get it functioning is to set the boot flag to the WinXP partition before starting the recovery procedure with the floppy.
You can do it using the fdisk command as described above.
Remember to use the w (write) command and the q to quit. After this you have to reboot to get used the new partition table! Then you can start the floppy's rescue procedure.

My 50cents

Revision history for this message
Andreas Troschka (signupbox) said :
#30

The almost main rule is:

never, and I'm saying NEVER!, install a Microsoft o.s. in an extended logical partition! Windows can't deal with that.
Linux can. ;-)

First install Windows in the first main partition, then do whatever you want with Linux.
You'll have no problems moving a Linux partition.
You'll have only trouble by moving a WIndows partition.
Having a Windows installation in what it calls disk D: is a risk because some application software has hardcoded paths, including C:\something.
In this cases that applications can do any kind of mess because they expect Windows installed into the C:\ logical device instead of the D:\ one.

There are many things a regular normal user is not aware of about WIndows...

I hope you can save your data and have, finally, good "user experiences" with both your WindowsXP and Linux.

The other 50cents.

Can you help with this problem?

Provide an answer of your own, or ask Wayne Burns for more information if necessary.

To post a message you must log in.