LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble setting up a dual-boot into Windows XP (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-setting-up-a-dual-boot-into-windows-xp-4175455317/)

dk2 03-23-2013 09:44 PM

Trouble setting up a dual-boot into Windows XP
 
I'm new to Linux, and I'm having some trouble with installation. I recently downloaded and installed Lubuntu 12.10 on my computer. During the installation procedure, the installer detected that I had Windows XP Home Edition installed on the hard drive, and offered me the option of installing Lubuntu alongside it, so that I would be able to choose which OS to start when starting the computer. Installation finished without a hitch, but when I tried to get back into Windows XP, I got the following error:

"A disk read error has occurred.
Press Ctrl-Alt-Delete to restart."

All the files from my Windows installation are still there; I can still open Word documents and edit them, save them, etc. In an attempt to fix this, I did some searching, and found a tool called "Boot-Repair" for Ubuntu. I clicked the "Recommended repair" button, restarted the computer, and tried again to boot into XP, and got the same error message as above.

I then did a Google search for how to uninstall Lubuntu. From what I gather, the standard way of doing it is removing the hard drive partitions that have Linux, and then going into the Windows XP Recovery Console and doing a "fixmbr" and "fixboot." Tried all that, got the same error.

Then, I found this article through a Google search, which suggested deleting boot.ini, doing "bootcfg /rebuild," and then doing "fixboot" again to write a new bootsector. No success.

I don't know what else to try. I'm currently posting this from the Lubuntu 12.10 Live CD, because I can't boot back into Windows, and I removed the Linux partitions using GParted. (That reminds me: I also resized my Windows partition to take up the rest of the drive.) Again, I just want to stress that it appears there's nothing wrong with the files or the drive itself, it's just that I can't boot back into Windows. Anyone have any other suggestions?

By the way, here are my system specs (just in case they would help...):
The computer is an HP Pavilion a530n; 512 MB of RAM; 2.00 GHz AMD Athlon 64 processor; 200 GB hard drive; CD-ROM drive; DVD drive/CD-DVD writer.

syg00 03-23-2013 09:55 PM

That sounds like a lame-brained BIOS. From a terminal in the liveCD, try this and post the results
Code:

sudo parted -l
(that's a lower case ell)

dk2 03-23-2013 10:01 PM

Thank you for the quick reply!
Here's the results of sudo parted -l:

Code:

lubuntu@lubuntu:~$ sudo parted -l
Model: ATA ST3200822A (scsi)
Disk /dev/sda: 200GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size  Type    File system  Flags
 1      32.3kB  200GB  200GB  primary  ntfs        boot


Warning: Unable to open /dev/sr1 read-write (Read-only file system).  /dev/sr1
has been opened read-only.
Error: Can't have a partition outside the disk!                         

lubuntu@lubuntu:~$


syg00 03-23-2013 10:21 PM

Not much of interest there - try bootinfoscript and post the RESULTS.txt
This is basically the same as the boot repair, but gives us a listing rather than trying to mangle things.

dk2 03-23-2013 10:47 PM

from RESULTS.txt:

Code:

                  Boot Info Script 0.61      [1 April 2012]


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

 => Windows is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    File system:      ntfs
    Boot sector type:  Windows XP: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files:        /boot.ini /ntldr /NTDETECT.COM

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *            63  390,721,535  390,721,473  7 NTFS / exFAT / HPFS


"blkid" output: ________________________________________________________________

Device          UUID                                  TYPE      LABEL

/dev/loop0                                              squashfs 
/dev/sda1        3AF084BEF084823D                      ntfs      HP_PAVILION
/dev/sr1                                                iso9660    Lubuntu 12.10 i386

================================ Mount points: =================================

Device          Mount_Point              Type      Options

/dev/loop0      /rofs                    squashfs  (ro,noatime)
/dev/sr1        /cdrom                  iso9660    (ro,noatime)


================================ sda1/boot.ini: ================================

--------------------------------------------------------------------------------
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Home Edition" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Home Edition"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=""
C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn
--------------------------------------------------------------------------------

========= Devices which don't seem to have a corresponding hard drive: =========

sdb sdc sdd sde

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

  No volume groups found


syg00 03-23-2013 11:00 PM

Sorry, I'm at a loss too. That all looks as you would expect.

dk2 03-23-2013 11:05 PM

Is this kind of problem typical for Windows users who install Linux?

yancek 03-23-2013 11:06 PM

Quote:

I then did a Google search for how to uninstall Lubuntu.
You don't uninstall operating systems. You reformat the partition(s) they are on an install something else over them.

Quote:

From what I gather, the standard way of doing it is removing the hard drive partitions that have Linux,
And you now know that wasn't right. Do yourself a favor and note the sites where you got this information and AVOID them in the future. You need to repair the windows bootloader FIRST and then re-format the partitions.

You said you can still view your windows files so everything is there and you have the standard boot files for xp as shown in the bootinfoscript. You wouldn't happen to have the xp installation disk? I've never actually used xp but have read about it and it seems in this situation you may need it as the files to reapir the bootloader may not be on a Recovery disk. The microsoft site below has some info on the problem but it isn't clear to me what they are referring to by 'Recovery Console' but it doesn't seem to mean the same as Recovery Disk? Someone else more familiar with xp should come along with more advice.

http://www.microsoft.com/resources/d....mspx?mfr=true

dk2 03-23-2013 11:36 PM

I'm sorry, yancek. Like I said, I'm still relatively new to Linux.
I tried Microsoft's suggestion of doing "fixmbr \device\harddisk0," but it didn't work.
Should I try restoring the MBR using Boot-Repair?

syg00 03-24-2013 01:43 AM

Ahhh .... I presumed you have successfully run the fixboot/fixmbr.
Run them with no parameters - fixboot first.

dk2 03-24-2013 02:11 AM

No, I haven't. I've run fixboot, fixmbr, and bootcfg /rebuild multiple times without success.

syg00 03-24-2013 02:28 AM

Quote:

Originally Posted by dk2 (Post 4917517)
Is this kind of problem typical for Windows users who install Linux?

No.
I have had no machines (work/private/laptop/desktop) for many years that were not multi-boot. Most have Windoze plus several Linux.

No HP though ...

vigi 03-24-2013 05:59 AM

I would start over rather than waste more time trying to fix xp. The recovery option takes forever and has never worked for me. The most likely reason it is corupted is when ever you make partition changes with a second system, you need to reboot xp so it updates to the new configuration tables. Especially when ntfs file systems are changed.
Use the live cd to create a second partition, and move your to it.
The safest way to dual boot is use two hard drives, install xp on one first, then linux on the second drive. I asl recommend to create a small 50MB primary partion at the start of the linux drive and install grub legacy as a boot manager. If things go wrong, you just unplug the linux drive and it should reboot alone, as the loader is in the mbr unchanged.
With one drive the linux system will overwrite the xp mbr.

vigi 03-24-2013 06:02 AM

Should read., use the live cd to create a separate partion and move your data to it.

dk2 03-24-2013 10:40 AM

I do have a spare internal hard drive, but the problem is that my computer doesn't appear to have a place to install a secondary drive. Is there a safe way to install a second internal hard drive when there isn't a place to install another drive?
Also, are you saying that if I use GParted to create a new partition and move all my XP files into that partition, that I'll at least be able to save my data?


All times are GMT -5. The time now is 06:01 AM.