-   Linux - Software (
-   -   Windows Partition broken by Kubuntu? (

creature124 02-03-2008 11:45 AM

Windows Partition broken by Kubuntu?

I have been running Kubuntu 7.10 for around a week now, and I just attempted to boot into windows for the first time since then (for all the problems ive had, totally hooked on linux).

It began booting normally, and then a flash of blyue ith some ominous looking error codes flashed past, then loading into the built in SONY VAIO recovery center. From that I was able to get the following error message:

No OS found on drive C:. Could not boot into Windows.

I am wondering if this is coincidence, or something I have done while running Kubuntu has caused this.

Possible culprits:

Mounting my vista partition for read only access using script (this immediately proceeded me discovering this problem, as curiously all my program and OS files seem to be intact, my Documents and Settings appears blank).
I obtained the script from this terminal command:
# wget
I did so at the recommendation of a page on the official ubuntu help site (which I have not been able to find again to post a link)

Using Wine to try and run windows programs (I'm not sure if this could be related, dosent seem likely)

Please offer any suggestions. While I am not overly upset my Vista partition has bit the dust, it would still be nice to have it back.


bigrigdriver 02-03-2008 03:14 PM

First question: when you turn the power on, do you see a grub or lilo menu, with the choice of booting either Windows or Linux? Or, do you see a windows ntldr boot screen offering either Linux or Windows?

Second question: open a console and enter the command: fdisk -l. What is the output? It should be a simple table listing the size of the drive and the beginning and end point of each partition.

Third question: can you mount the windows partition from Linux and pull off any files you want to keep, and re-install windows? If yes, it will break your bootloader if you're using grub or lilo. You need to make a Linux boot disk before re-installing windows.

creature124 02-03-2008 07:43 PM

Question One: I load into the GRUB bootloader, offering me either Unbuntu or Vista/Longhorn. The Vista/Longhorn option takes me to the Vista boot loader (as I formerly had a windows XP partition where linux now sits, and I never updated the mbr)

Question 2:

creature124@creature-lappy:~$ fdisk -l

Disk /dev/sdb: 2055 MB, 2055019520 bytes
16 heads, 63 sectors/track, 3981 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0xab0ffec9

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  *          1        3982    2006823+  e  W95 FAT16 (LBA)

Question 3: I have read only access to the entire partition. However, under Kubuntu my C:/Documents and Settings/ folder appears totally blank (and contain within are the files I want to save). I was loading into Vista to ensure they were still there in reality and just unseen by Kubuntu that lead to my discovery of this error.

bigrigdriver 02-03-2008 08:23 PM

The output of fdisk -l has me worried. It shows only one partition on one disk. If that's the case, you installed Kubuntu over Windows. In other words, it no longer exists.

Did you do a generic "fdisk -l' or a specific 'fdisk -l /dev/sdb'?

Boot into Kubuntu. Run these commands: 'sudo cat /boot/grub/menu.lst' and 'sudo cat /etc/fstab'. Copy the outputs of both commands and post them here.

creature124 02-03-2008 10:45 PM

I also noted that when I looked at that output. I did the generic command, exactly as you typed it. I assure you, there is NO way I installed Kubuntu in such a way that removed Vista. When I attempt to load, it begins to boot, just like it always has, with the funny endless loading bar deal. Also, I can still access *most* of the files from my Vista partition, so obviously that data is still there.

I seriously wonder if the script I used to mount my vista partition for read only access (which I provided a link to in my original post) is the culprit, and somehow broke Vista. It sounds implausible even as I type it though. Darn.

When I installed Kubuntu, I downsized the Vista partition to do it, and make doubly sure that my vista partition would not be erased.

I am confused now. Tying myself in knots, figuratively.

Here are the outputs of the commands you requested.

sudo cat /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)

# 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

## 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=a264d994-4415-4ff8-860e-2e1cb703fa7d 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 7.10, kernel 2.6.22-14-generic
root            (hd0,2)
kernel          /boot/vmlinuz-2.6.22-14-generic root=UUID=a264d994-4415-4ff8-860e-2e1cb703fa7d ro quiet splash
initrd          /boot/initrd.img-2.6.22-14-generic

title          Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root            (hd0,2)
kernel          /boot/vmlinuz-2.6.22-14-generic root=UUID=a264d994-4415-4ff8-860e-2e1cb703fa7d ro single
initrd          /boot/initrd.img-2.6.22-14-generic

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


# This is a divider, added to separate the menu items below from the Debian
# ones.
title          Other operating systems:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title          Windows Vista/Longhorn (loader)
root            (hd0,0)
chainloader    +1

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title          Windows Vista/Longhorn (loader)
root            (hd0,1)
chainloader    +1

sudo cat /etc/fstab:


# /etc/fstab: static file system information.
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
# /dev/sda3
UUID=a264d994-4415-4ff8-860e-2e1cb703fa7d /              ext3    defaults,errors=remount-ro 0      1
# /dev/sda5
UUID=76fab835-a55f-461d-bcff-f0640bc7da12 none            swap    sw              0      0
/dev/scd0      /media/cdrom0  udf,iso9660 user,noauto,exec 0      0
#Added by diskmounter utility
/dev/sda2 /media/sda2 ntfs ro,user,fmask=0111,dmask=0000 0 0

I bit of that looks promising. Can you shed some light on what that means? Please, if you have time, explain your logic, so that I can learn from this. Eventually, I want to be able to contribute to this community instead of just leech from it!

Thanks much,

bigrigdriver 02-03-2008 11:58 PM

This is getting worse by the minute.

Fdisk -l says you have only one hard drive with one partition, and it's formated for DOS/win95, not ntfs/vista, and that drive/partition is designated /dev/sdb1. It that correct to the extent that you have only one hard drive?

Grub's menu.lst says you have three partitions, /dev/sda1 to /dev/sda3, with 1 and 2 formated for Vista and 3 formated for Ubuntu.

So what happened to sdb1, and where did sda1 to 3 come from?

And then there is fstab, which lists /dev/sda2 (vista), /dev/sda3 (Linux), and swap (/dev/sda5). I hesitate to point out that fdisk -l doesn't mention sda5 either.

From that, I conclude that /dev/sda1, while formatted for Vista, is a data partition, and not an operating system partition (no bootable system there).

So, when you turn the power on, do you see two entries for windows in the menu? Select the second one instead of the first one. What happens?

I suspect that Ubuntu wrote an entry in menu.lst for the first ntfs partition even though it doesn't have a bootable operating system (I've seen that before). I also suspect that the bootable OS is in the second partition (information gleaned from fstab and menu.lst).

If windows boots on selecting the second windows entry from the grub menu, then edit menu.lst and delete the first entry (the one that refers to partition hd0,0). Better yet, just comment that entry out (put the leading hash (#) at the beginning of each line. If you make a mistake, it's easier to remove the hash mark than it is to recreate the entry. Or do it in reverse if it's the first one that boots, and the second doesn't.

There still remains the puzzleing output of fdisk.


I can still access *most* of the files from my Vista partition, so obviously that data is still there.
Tell me more about how you access those files.

creature124 02-04-2008 08:04 AM

There are indeed two Vista/Longhorn (loader) entries in grub, and I tried them both. The first one boots directly into the small VAIO recovery utility placed on my HDD by Sony. The second, which I presume would be my main Vista partition, gives the failed boot up sequence I previously described. I do only have one internal hard drive on my system - I have an external hard drive, but has not been connected since I started using Kubuntu, or for some time before.

Originally, when I first installed Kubuntu, I had no read or write access to my Vista partition. It appeared in Dolphin, but I received an error (hal-storage-fixed-mount-all-options refused uid 1000. I retrieved this error by attempting to access the recovery partition in Dolphin, and I am certain Vista partition gave the exact same output). I tried the ntfs-config utility that every forum seemed to recommend, but mysteriously the process won't run.

So I tried a script called Diskmounter that I found referenced on the official ubuntu forums. I downloaded an ran the script (location in the first post) and it gave me read only access to the drive.

I can now access my Vista data in Dolphin just as I do for the Linux file system (the recovery partition is labeled sda1, vista sda2 and linux sda3). I can read and copy all my data, but I cannot make changes.

The exception, and the reason for my *most* stipulation, is that my C:/Documents and Settings/ folder appears empty, as if someone went in and deleted all files and subfolders. If this data is actually gone, it might render me unable to login, but it strikes me as unlikely that it would interrupt the boot process so early.

The more I think on this, the weirder it gets. I hope that this can be resolved inside Kubuntu, because as seems to be common practice, I have not received any OS disks with my generic sony laptop. Instead, I was supposed to make 'recovery' disks that would reset my HDD to factory state. Bah. I would have, if that utility had ever actually worked, and sony had given me a straight answer when I told them I wanted discs.

Now I am rambling. I'll stop now.


bigrigdriver 02-04-2008 10:50 AM

It's been a long time since I used windows, I don't remember what files go into C:/Documents and Settings. Nor do I remember what attributes are set on the folder or it's contents. Could it be that the attribute is set to Hidden?

I'm out of suggestions, other than take it to a local computer shop to see if they can get the files from C:/Documents and Settings, and re-install windows for you.

creature124 02-04-2008 11:14 AM

Ahh frakk it. I'm just gonna erase the bugger. The data on there is a want to retrieve, not a need to retrieve. I guess I'll just close that door and fully immerse myself into Linux.

Thank you -very- much for the help, I appreciate it very much.


filosofic 04-07-2008 10:10 PM

How I solved a similar problem:

Mounting NTFS eSATA HD w/ error = "hal-storage-fixed-mount-all-options refused uid 1000"
Don't forget to right click on desktop and choose Configure Desktop, then Behavior, then Device Icons, and check Mounted and Unmounted Hard Disk Volume
As root in konsole: ntfsfix /dev/sdc1
Logging in as root and trying to change permissions, does not work.
Something like this might work: ntfs-3g /dev/sdc1 /mnt/wherever -o force
What do you add to fstab? Some answers at:
Reboot with external drives installed and running (I have an 500GB eSATA drive and another USB drive).
After ntfsfix /dev/sdx1 reboot and "hal-storage" error is gone
Clicking on icon yields:
Volume is scheduled for check. Please boot into Windows TWICE, or
use the 'force' mount option. For example type on the command line:
mount -t ntfs-3g /dev/sdb1 /mnt/sdb1 -o force
Or add the option to the relevant row in the /etc/fstab file:
/dev/sdb1 /mnt/sdb1 ntfs-3g defaults,force 0 0
Below #Dynamic entries below should be:
/dev/sdb1 /mnt/sdb1 mtfs-3g nonauto, users 0 0
Then in command line as root do mount -t command as above, and all should work.

All times are GMT -5. The time now is 12:16 PM.