WinXP broken post Ubuntu install
WinXP broken post Ubuntu install
Author
Discussion

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
I've created a bit of a problem for myself: I've just done a fresh install of Ubuntu and and now unable to start Windoze. This is the error message:
Windows could not start because the following file is missing 
or corrupt:
<Windows root>\system32\hal.dll.
Please re-install a copy of the above file.

I've rebooted with the system CD and started a recovery console to run bootcfg - I've noticed that it seems to think %windir% is on D:, where it should be on C:
I'm not familiar with Ubuntu and can't find a tool to view the partition table so that I can see what's happened. Ideally I'd like to be able to use the Windows recovery console to do this but the olde-fashioned tools I am familiar with (like fdisk) don't seem to be available.
Any bright ideas gratefully received.

_Lee_

7,520 posts

274 months

Sunday 22nd July 2007
quotequote all
Have you tried to change windir's location using the 'set' command?

ThePassenger

6,962 posts

266 months

Sunday 22nd July 2007
quotequote all
Right. First of all, you'll be hard pushed to do anything on the parition via Ubuntu. You'd need NTFS-3G and FUSE to write to it.

I'd suggest that even if you hadn't of installed Ubuntu you'd be looking at this screen, but I'd suggest getting your WinXP disks and booting from it. Select 'Repair'. Should do the job (but might disable GRUB, which is easy enough to repair).

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
When I selected the repair option I ran DISKPART - this appears to confirm my suspicion that C: & D: have swapped.
How do I re-assign drive letters without windows?

fredf

267 posts

264 months

Sunday 22nd July 2007
quotequote all
Ubuntu should have installed the Linux fdisk (someone needs to be shot if it hasn't). just run it from the console as root and see what's actually happened to the table.
Which partition has the boot flag set?
Where is grub installed? hda or hda1

Can you post your /boot/grub/menu.lst file. The windows specific bit should be enough. Does it do any weird partition/disk swapping?
It should only be something like:
..title Windows
..root (hd0,0)
..savedefault
..makeactive
..chainloader +1

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda3
title Windows XP Media Center Edition
root (hd0,2)
savedefault
makeactive
chainloader +1

I guess that means it's trying hard disk 0, partition 2?

I'm struggling to run fdisk because I can't find the hard disk in /dev - there are no hdas listed ...

fredf

267 posts

264 months

Sunday 22nd July 2007
quotequote all
run fdisk against /dev/sda.
Grub is setup to load windows off the first hdd, partition 3, does this sound right?

Note: grub starts from 0 when counting hdd's and partitions, everything else starts from 1

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
Aha - /dev/sda

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 7 56196 de Dell Utility
/dev/sda2 8 8857 71087625 f W95 Ext'd (LBA)
/dev/sda3 * 13985 19452 43921408 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.
/dev/sda4 8858 13984 41182627+ 83 Linux
/dev/sda5 8 8632 69280281 7 HPFS/NTFS
/dev/sda6 8633 8857 1807281 82 Linux swap / Solaris

Partition table entries are not in disk order

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
So ... if I edit /boot/grub/menu.lst to (hd0,4) that may do the trick?

Guessing I'd have to make that slice bootable too ...

Edited by LordGrover on Sunday 22 July 22:58

fredf

267 posts

264 months

Sunday 22nd July 2007
quotequote all
hmm. what have you done there? partition 3 is slightly corrupt (end's at the wrong point), and they are out of order. shouldn't be a problem though

can you mount sda3 and sda5 to see which is the correct partition
.. sudo mount /dev/sda3 /mnt -t ntfs-3g

(install the ntfs-3g package if you haven't already)

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
Don't have ntfs-3g.

The drive I want to boot from is mountable by double clicking in File Browser but I can't see anything useful in the properties ...


Does that help?

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
now have ntfs-3g

$ sudo mount /dev/sda3 /mnt -t ntfs-3g
fusermount: mount failed: Device or resource busy
FUSE mount point creation failed
Unmounting /dev/sda3 (New Volume)

fredf

267 posts

264 months

Sunday 22nd July 2007
quotequote all
can you type 'mount' to see which partition is mounted on /media/disk

I don't use Ubuntu or many graphical admin tools, so I don't know if there's a GUI tool to do the same

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
fredf said:
can you type 'mount' to see which partition is mounted on /media/disk

I don't use Ubuntu or many graphical admin tools, so I don't know if there's a GUI tool to do the same
$ mount
/dev/sda4 on / type ext3 (rw,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)
procbususb on /proc/bus/usb type usbfs (rw)
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.20-16-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/scd0 on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=lord)
/dev/sda3 on /mnt type ntfs (rw)


Bugger - just noticed it's not mounted - shall redo momentarily ... oops! redface

Edited by LordGrover on Sunday 22 July 23:20

fredf

267 posts

264 months

Sunday 22nd July 2007
quotequote all
Looking at the disk sizes, sda5 is the 66GB and sda3 is 42GB. and you say the 66GB partition is the one you want.

As you said earlier, try changing grub to boot from hd0,4.
BTW, you can change the grub options and boot type by typing 'e' (i think....) at the grub boot menu

Edited by fredf on Sunday 22 July 23:24

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
~$ mount
/dev/sda4 on / type ext3 (rw,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)
procbususb on /proc/bus/usb type usbfs (rw)
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.20-16-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/scd0 on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=lord)
/dev/sda3 on /mnt type ntfs (rw)
/dev/sda5 on /media/disk type ntfs (rw,nosuid,nodev,umask=222,utf8)

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
fredf said:
Looking at the disk sizes, sda5 is the 66GB and sda3 is 42GB. and you say the 66GB partition is the one you want.
Yep ... probably ... almost certainly ... I hope.

btw, thanks v much for help thus far. thumbup

fredf

267 posts

264 months

Sunday 22nd July 2007
quotequote all
in case you missed my edit...

As you said earlier, try changing grub to boot from hd0,4.
BTW, you can change the grub options and boot type by typing 'e' (i think....) at the grub boot menu

LordGrover

Original Poster:

34,191 posts

243 months

Sunday 22nd July 2007
quotequote all
fredf said:
in case you missed my edit...

As you said earlier, try changing grub to boot from hd0,4.
BTW, you can change the grub options and boot type by typing 'e' (i think....) at the grub boot menu
Sorry - did miss that. just vi-ed the grub johnny, so here goes - if you don't hear from me again soon - I've now completely knackered it ...

3 - 2 - 1 - ...

fredf

267 posts

264 months

Sunday 22nd July 2007
quotequote all
LordGrover said:
Sorry - did miss that. just vi-ed the grub johnny, so here goes - if you don't hear from me again soon - I've now completely knackered it ...

3 - 2 - 1 - ...
Fingers crossed then... Though if you have knackered it you probably won't notice I said that thumbup