LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-02-2009, 09:16 AM   #1
Slowbey
Member
 
Registered: Jul 2006
Location: Reading, UK
Distribution: Ubuntu 12.04, Mint 16
Posts: 32

Rep: Reputation: 0
Dual boot: Ubuntu 8.04 and XP. XP won't boot now - loops back to Ubuntu


Dear all,
I have been using Ubuntu 8.04 and XP on a single partitioned hard drive for about four months now without problems. Ubuntu is the default option if I do nothing at the opening menu.

I booted up yesterday and went into the XP option. This time, it went through a process checking the hard drive sector by sector and correcting apparent "errors".

Now when I try to get into XP it loops back into the Ubuntu userid screen and I can't seem to access XP at all.

I would like to keep the dual booting if at all possible, but would prefer to avoid the pain of reinstalling one or both of the OS.

Any suggestions would be most welcome.

Many thanks
David
 
Old 01-02-2009, 09:39 AM   #2
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 308

Rep: Reputation: 39
Do you know which bootloader you use? I assume grub here, so please give us the info in the file /boot/grub/menu.lst

Thanks.
 
Old 01-02-2009, 09:50 AM   #3
CQ1ST
Member
 
Registered: Oct 2005
Location: NewZealand
Distribution: Xubuntu Trusty
Posts: 77

Rep: Reputation: 18
unfortunately this is looking like a windows problem
if your grub/menu.lst is looking like:
title WindowsXP
root (hd0,0)
makeactive
chainloader +1
and grub hands the bootstraps over to a windows kern. then you'll have to do something like :: boot windows>press F8 and choose (maybe if the other options fail) safe mode??> then run
chkdsk c: /R /F ??? (which it should say "lets reboot to do that")
(and now you may need to boot into recovery console with your xp disk)
http://vlaurie.com/computers2/Articles/chkdsk.htm
maybe :: Running Chkdsk from the Recovery Console?


this'll recover mbr if it's lost
http://www.google.co.nz/search?q=xp+...ient=firefox-a
http://www.tech-recipes.com/rx/483/x...overy_console/
but "this'll recover grub 'after' windows claims it all back
https://help.ubuntu.com/community/Re...tallingWindows

otherwise I'd suggest that you talk to some one who knows and uses windows really
 
Old 01-02-2009, 09:56 AM   #4
3rods
Member
 
Registered: Mar 2008
Posts: 70

Rep: Reputation: 16
Did you happen to install any 3rd party apps that may have accessed the boot loader for XP? (i.e. Norton Ghost, Partition Magic)

Your menu.lst file should have something like this under the "Other Operating Systems" area:

Code:
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
The root (hd0,0) points to the first partition in the first physical drive; if you installed Ubuntu before XP, it might be on a different partition.
 
Old 01-02-2009, 10:20 AM   #5
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
I agree with CQ1ST and 3rods, it sounds like most likely you have a Windows problem and not a Grub problem. But in order to get a better picture of your setup, how about opening a terminal (Applications > Accessories > Terminal) and do:
Code:
cd ~/Desktop && wget 'http://home.comcast.net/~ubuntu_grub/boot_info_script.txt' && sudo bash boot_info_script.txt
That will create a "RESULTS.txt" file in the same directory from where the script is run, namely your desktop; please copy/paste the contents of that file to your next post, highlight the copied text, and click the pound sign # graphic in the Ubuntu forum message box so that the text will get "code" tags put around it. The results of that script will help clarify your setup and maybe shed some light on your Windows booting problem.
 
Old 01-02-2009, 05:00 PM   #6
Slowbey
Member
 
Registered: Jul 2006
Location: Reading, UK
Distribution: Ubuntu 12.04, Mint 16
Posts: 32

Original Poster
Rep: Reputation: 0
Here's the output of the results.txt file as requested.
Hope this helps.
Thanks
David

Code:
============================= Boot Info Summary: ==============================

 => Drive sda does not have a valid partition table.
 => Drive sdb does not have a valid partition table.
 => Drive sdc does not have a valid partition table.
 => Drive sdd does not have a valid partition table.
 => Grub is installed in the MBR of /dev/sde and looks on the same drive in 
    partition #2 for its boot files.

sde1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  According to the info in the boot sector, sde1 has 
                       287483111 sectors, but according to the info from 
                       fdisk, it has 287483112 sectors.
    Operating System:  Windows XP
    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM

sde2: _________________________________________________________________________

    File system:       ext2
    Boot sector type:  Unknown
    Boot sector info:  
    Operating System:  Ubuntu 8.04.1
    Boot files/dirs:   /boot/grub/menu.lst /etc/fstab /boot /boot/grub

sde3: _________________________________________________________________________

    File system:       swap

=========================== Drive/Partition Info: =============================

Drive sda: _____________________________________________________________________

fdisk -lu /dev/sda:

sfdisk -V /dev/sda:

/dev/sda: No medium found

sfdisk: cannot open /dev/sda for reading

Drive sdb: _____________________________________________________________________

fdisk -lu /dev/sdb:

sfdisk -V /dev/sdb:

/dev/sdb: No medium found

sfdisk: cannot open /dev/sdb for reading

Drive sdc: _____________________________________________________________________

fdisk -lu /dev/sdc:

sfdisk -V /dev/sdc:

/dev/sdc: No medium found

sfdisk: cannot open /dev/sdc for reading

Drive sdd: _____________________________________________________________________

fdisk -lu /dev/sdd:

sfdisk -V /dev/sdd:

/dev/sdd: No medium found

sfdisk: cannot open /dev/sdd for reading

Drive sde: _____________________________________________________________________

fdisk -lu /dev/sde:

Disk /dev/sde: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x2b915dcc

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *          63   287483174   143741556    7  HPFS/NTFS
/dev/sde2       288559530   390716864    51078667+  83  Linux
/dev/sde3       287483175   288559529      538177+  82  Linux swap / Solaris

Partition table entries are not in disk order

sfdisk -V /dev/sde:

partition 2: start: (c,h,s) expected (1023,254,63) found (1023,0,1)
partition 3: start: (c,h,s) expected (1023,254,63) found (1023,0,1)
/dev/sde: OK

blkid -c /dev/null: ____________________________________________________________
/dev/sde1: UUID="2AC8E42BC8E3F2CD" TYPE="ntfs" 
/dev/sde2: UUID="e8e3a797-252e-4490-b39d-7f377bf2484c" TYPE="ext2" 
/dev/sde3: TYPE="swap" UUID="06f9c1e4-9870-444c-ba2e-4965f981e7ea" 

=============================== "mount" output: ===============================
/dev/sde2 on / type ext2 (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-22-generic/volatile type tmpfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/david/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=david)
/dev/sde1 on /media/disk type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
Unknown BootLoader  on /dev/sde2

00000000  f6 f6 f6 f6 f6 f6 f6 f6  f6 f6 f6 f6 f6 f6 f6 f6  |................|
*
00000200


================================ sde1/boot.ini: ================================

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn


=========================== sde2/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		10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=e8e3a797-252e-4490-b39d-7f377bf2484c ro

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

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

## 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-22-generic
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.24-22-generic root=UUID=e8e3a797-252e-4490-b39d-7f377bf2484c ro quiet splash
initrd		/boot/initrd.img-2.6.24-22-generic
quiet

title		Ubuntu 8.04.1, kernel 2.6.24-22-generic (recovery mode)
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.24-22-generic root=UUID=e8e3a797-252e-4490-b39d-7f377bf2484c ro single
initrd		/boot/initrd.img-2.6.24-22-generic

title		Ubuntu 8.04.1, kernel 2.6.24-21-generic
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.24-21-generic root=UUID=e8e3a797-252e-4490-b39d-7f377bf2484c ro quiet splash
initrd		/boot/initrd.img-2.6.24-21-generic
quiet

title		Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.24-21-generic root=UUID=e8e3a797-252e-4490-b39d-7f377bf2484c ro single
initrd		/boot/initrd.img-2.6.24-21-generic

title		Ubuntu 8.04.1, kernel 2.6.24-16-generic
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=e8e3a797-252e-4490-b39d-7f377bf2484c ro quiet splash
initrd		/boot/initrd.img-2.6.24-16-generic
quiet

title		Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=e8e3a797-252e-4490-b39d-7f377bf2484c ro single
initrd		/boot/initrd.img-2.6.24-16-generic

title		Ubuntu 8.04.1, memtest86+
root		(hd0,1)
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/sda1
title		Microsoft Windows XP Home Edition
root		(hd0,0)
savedefault
makeactive
chainloader	+1


=============================== sde2/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda2
UUID=e8e3a797-252e-4490-b39d-7f377bf2484c /               ext2    relatime,errors=remount-ro 0       1
# /dev/sda3
UUID=06f9c1e4-9870-444c-ba2e-4965f981e7ea 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

================================== sde2/boot: ==================================

total 53988
drwxr-xr-x  3 root root    4096 2008-12-22 21:50 .
drwxr-xr-x 21 root root    4096 2008-12-14 20:16 ..
-rw-r--r--  1 root root  422607 2008-04-10 17:51 abi-2.6.24-16-generic
-rw-r--r--  1 root root  422838 2008-10-22 04:12 abi-2.6.24-21-generic
-rw-r--r--  1 root root  422838 2008-11-24 22:47 abi-2.6.24-22-generic
-rw-r--r--  1 root root   79964 2008-04-10 17:51 config-2.6.24-16-generic
-rw-r--r--  1 root root   80062 2008-10-22 04:12 config-2.6.24-21-generic
-rw-r--r--  1 root root   80062 2008-11-24 22:47 config-2.6.24-22-generic
drwxr-xr-x  2 root root    4096 2008-12-14 20:16 grub
-rw-r--r--  1 root root 7833064 2008-10-28 12:55 initrd.img-2.6.24-16-generic
-rw-r--r--  1 root root 7350068 2008-04-22 23:01 initrd.img-2.6.24-16-generic.bak
-rw-r--r--  1 root root 7462082 2008-12-14 20:16 initrd.img-2.6.24-21-generic
-rw-r--r--  1 root root 7464483 2008-10-29 21:38 initrd.img-2.6.24-21-generic.bak
-rw-r--r--  1 root root 7462535 2008-12-22 21:50 initrd.img-2.6.24-22-generic
-rw-r--r--  1 root root 7461712 2008-12-14 20:17 initrd.img-2.6.24-22-generic.bak
-rw-r--r--  1 root root  103204 2007-09-28 11:06 memtest86+.bin
-rw-r--r--  1 root root  899892 2008-04-10 17:51 System.map-2.6.24-16-generic
-rw-r--r--  1 root root  905617 2008-10-22 04:12 System.map-2.6.24-21-generic
-rw-r--r--  1 root root  905617 2008-11-24 22:47 System.map-2.6.24-22-generic
-rw-r--r--  1 root root 1904248 2008-04-10 17:51 vmlinuz-2.6.24-16-generic
-rw-r--r--  1 root root 1920760 2008-10-22 04:12 vmlinuz-2.6.24-21-generic
-rw-r--r--  1 root root 1921176 2008-11-24 22:47 vmlinuz-2.6.24-22-generic

=============================== sde2/boot/grub: ===============================

total 212
drwxr-xr-x 2 root root   4096 2008-12-14 20:16 .
drwxr-xr-x 3 root root   4096 2008-12-22 21:50 ..
-rw-r--r-- 1 root root    197 2008-10-28 12:55 default
-rw-r--r-- 1 root root     15 2008-10-28 12:55 device.map
-rw-r--r-- 1 root root   8056 2008-10-28 12:55 e2fs_stage1_5
-rw-r--r-- 1 root root   7904 2008-10-28 12:55 fat_stage1_5
-rw-r--r-- 1 root root     16 2008-10-28 12:55 installed-version
-rw-r--r-- 1 root root   8608 2008-10-28 12:55 jfs_stage1_5
-rw-r--r-- 1 root root   5446 2008-12-14 20:16 menu.lst
-rw-r--r-- 1 root root   5014 2008-12-14 20:16 menu.lst~
-rw-r--r-- 1 root root   7324 2008-10-28 12:55 minix_stage1_5
-rw-r--r-- 1 root root   9632 2008-10-28 12:55 reiserfs_stage1_5
-rw-r--r-- 1 root root    512 2008-10-28 12:55 stage1
-rw-r--r-- 1 root root 108356 2008-10-28 12:55 stage2
-rw-r--r-- 1 root root   9276 2008-10-28 12:55 xfs_stage1_5

=============================== StdErr Messages: ===============================

/dev/sda: No medium found

sfdisk: cannot open /dev/sda for reading
/dev/sdb: No medium found

sfdisk: cannot open /dev/sdb for reading
/dev/sdc: No medium found

sfdisk: cannot open /dev/sdc for reading
/dev/sdd: No medium found

sfdisk: cannot open /dev/sdd for reading
 
Old 01-02-2009, 05:19 PM   #7
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
It looks like your problem is truly with Windows, because it appears your Grub is configured correctly to boot Windows. The script did find that one of the NTFS file system parameters in the Windows boot sector is ever-so-slightly off, so you could repair that with "testdisk", because it might make a difference. To use testdisk, first make sure the Ubuntu Universe repository is enabled in System > Admin > Software Sources, and then download and run testdisk with the following commands:
Code:
sudo apt-get install testdisk
sudo testdisk
After starting testdisk, choose "No log", choose the correct HDD and "Proceed", choose "Intel", choose "Advanced", select the Windows partition, choose "Boot", then choose "Rebuild BS"; if testdisk gives you a warning that the "Extrapolated boot sector and current boot sector are different", then choose "Write". After you are done doing the "Rebuild BS" in testdisk, reboot and let me know exactly what happens when you boot Windows XP from the Grub menu. We can work from there.
 
Old 01-03-2009, 10:14 AM   #8
Slowbey
Member
 
Registered: Jul 2006
Location: Reading, UK
Distribution: Ubuntu 12.04, Mint 16
Posts: 32

Original Poster
Rep: Reputation: 0
Thanks for your previous thoughts. I have run the testdisk programme and it gave the hard drive a clean bill of health.

After the XP screen and the moving blue bar appear, the screen switches to the famous blue screen, which says:

Code:
C0000021 Bad image checksum
Image shlwapi.dll is possibly corrupt. The header check sum does not match computed checksum.
Unfortunately none of the methods I know to capture the screen seem to be working, so this is the result of repeated re-boots.

The computer then takes me back to the grub menu screen.
Hope you can help with this one.

Best wishes
David
 
Old 01-03-2009, 10:40 AM   #9
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Do you have your Windows Install CD? If so, I would boot that, go to the "recovery console" and do:
Code:
chkdsk /r
And run the chkdsk command as many times as it takes until it reports no errors. Then try to boot Windows again, and if you have the same problems, I would boot your Windows Install CD, choose "Install Windows" from the main menu, and after that choose the option to do a "Windows Repair." I think that's your best bet short of reinstalling Windows at this point. Let me know how it goes.
 
Old 01-05-2009, 02:44 AM   #10
Slowbey
Member
 
Registered: Jul 2006
Location: Reading, UK
Distribution: Ubuntu 12.04, Mint 16
Posts: 32

Original Poster
Rep: Reputation: 0
Smile

Thanks for the very quick response.
I have tried what you suggested but the process is recording "unrecoverable errors" on the partition when I run chkdsk, giving me no further guidance and just going back to the C:> prompt.

I am currently trying to reinstall XP on that partition, as the repair route was unsuccessful. If this fails, I may have to go over to a "linux only" machine.
Best wishes
David
 
  


Reply

Tags
boot options, dual, dual boot, ubuntu, xp



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
Ubuntu 7.10 Dual Boot with XP, ubuntu partition deleted, grub 1.5 error 22 narchy Linux - Newbie 11 02-07-2011 03:54 AM
How to make XP boot as default OS in WinXP-Ubuntu dual boot system svin Ubuntu 14 11-04-2009 04:49 PM
Upgrading Dual Boot System (Ubuntu 6.06 to Ubuntu 7.10) WESS126 Linux - Newbie 1 05-12-2008 09:25 AM
XP won't boot, loops back to GRUB: dual-boot XP and Ubuntu dan2010 Linux - Newbie 4 08-08-2007 12:09 PM
Changing default boot OS back to Ubuntu without being able to boot Ubuntu revenge02 Linux - Newbie 5 04-16-2007 08:37 PM

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

All times are GMT -5. The time now is 12:52 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