have reloaded windows xp on dual boot but unable to boot ubuntu at first repaired with boot repair now cannot boot xp now

Asked by Tonyt

 reloaded windows xp after it crashed back on the same discs as the ubuntu on diff partitions so could dual boot it ..at first was unable to boot ubuntu at first only xp boot with no option to boot ubuntu 12.04 so booted straight in xp.... repaired with boot repair package with the live cd in try ubuntu mode now get no boot xp option mode so boots straight into ubuntu ,the dual booting work ok before the xp crashed ,could boot either xp or ubuntu.partition have not changed

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you run:

sudo update-grub; lsb_release -a

What is output?

Thanks

Revision history for this message
Tonyt (tonys666) said :
#2

trooper1a@trooper1a-HP-625:~$ sudo update-grub; lsb_release -a
[sudo] password for trooper1a:
/usr/sbin/grub-mkconfig: 1: /etc/default/grub: thetrooper#: not found
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
trooper1a@trooper1a-HP-625:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Can you give the output of:

head /etc/default/grub

Thanks

Revision history for this message
Tonyt (tonys666) said :
#4

trooper1a@trooper1a-HP-625:~$ head /etc/default/grub
thetrooper# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
trooper1a@trooper1a-HP-625:~$

The output the output of:

head /etc/default/grub

you asked for

Thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

ok run:
gksudo gedit /etc/default/grub

Find this line:
thetrooper# If you change this file, run 'update-grub' afterwards to update

and change it to:
# If you change this file, run 'update-grub' afterwards to update

Save thenew file and close gedit, then run:
sudo update-grub

What is output?

Thanks

Revision history for this message
Tonyt (tonys666) said :
#6

trooper1a@trooper1a-HP-625:~$ sudo update-grub
[sudo] password for trooper1a:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-27-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-27-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-27-generic
Found initrd image: /boot/initrd.img-3.2.0-27-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda2
done
trooper1a@trooper1a-HP-625:~$

Out is now

Thanks

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#7

Cool, reboot to test

Revision history for this message
Tonyt (tonys666) said :
#8

thanks for help all sorted now

Revision history for this message
Tonyt (tonys666) said :
#9

Thanks actionparsnip, that solved my question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

If you have random words in your config files, it will cause issues.