I had a windows xp installed on dev/sda1(c: ). Then I installed open suse 11.1 on a different partition(sda8 or sda9 I don not remember).
Everything was working proper. I wanted to edit the grub settings to change the timeout and change default to windows. I did change the timeout to 25 and then checked something else(I do not remember now). When I restarted I got no operating system found.
Then I used the suse 11.1 DVD and did something, I got the suse back and also the failsafe suse in the os choices menu but windows was not there. I logged in and was able to access all the drives except the one in which windows was present(c: ). though I was able to see it when I navigated through /root but the contents were not present.
Then I used a live cd(not suse live). When I logged in, I was able to see all the drives also C, but when I tried to open it, I got a message saying something like "the file system was not valid or is not proper ntfs or something like that.
Is all my data lost? Can I recover them and make them proper. Do I have to make changes to grub.conf? If so please tell me in detail. I am new to linux.
Also tell me where I can learn thing like these.
I have a 40 GB HDD.
Welcome to the openSUSE community, I hope you enjoy your stay and become a great member…
Now, do not panic, It happened to me as well, when I was a SuSE beginner. All you have to do, since you can boot in the openSUSE is go to YaST>BootLoader> and get a Suggested Configuration (or something like that, sorry I’m on a mac atm). This will add the xp partition, then make your xp default, from there. The last thing you want to do so you don’t come across that same problem again, is click on the other tab, again I’m not sure what it’s called, but it asks you where to store your GRUB config files… It has check boxes, check all of them to make sure you’ll always have it.
There is a bug in the YAST BootLoader program, so do a update before using it again. (My understanding)
You Master Partition Table looks ok. Need to see XP’s Volume Boot Record. Run code and post output of xxd command.
dd if=/dev/sda1 of=xpvbr count=1 bs=512
xxd xpvbr
You must run dd command from root, if you do not know how, below is how I do it.
press Aft+F2
2)type in konsolesu
3)type in root password
Note: I do check code but I do make typo mistakes. Be very careful with the dd command.
or
If your live cd has “testdisk” installed, you can run it and select from its 2nd menu
“advanced”, it can check Xp’s primary VBR with its backup. Read HOw-To at [TestDisk - CGSecurity](http://www.cgsecurity.org
/index.html?testdisk.html)
If you’d searched this community you’ll get solusns in olders posts.
About Booting Windows:
open the file menu.lst located at /boot/grub. Add the following lines at the end of the file.
title Windows XP
rootnoverify (hd0,0)
chainloader +1
There is a field named default in the file. Change it to n-1 where title Windows XP (the block u just added) is the n-th entry. For example if first title field is title opensuse then to boot opensuse by default edit default 0. If you are confused understanding this part of editing default then just append the block, save the file and exit. Reboot, Hopefully it’s fixed.
About Sound:
Are you trying to play mp3 files which are not playing? Then may be due to missing codec. What is the error you are getting while trying to play audio? Can you see the volume control on your panel? You may try to play ogg Vorbis (.ogg) files to test whether sound driver is ok or not. Let us know the error msg you are getting.
Then I used a live cd(not suse live). When I logged in, I was able to see all the drives also C, but when I tried to open it, I got a message saying something like "the file system was not valid or is not proper ntfs or something like that.
His problem is not booting into XP it is his XP partition is bad some how. It is possible he needs to boot his XP cd and run 'chkdsk" but if the Volume Boot Record is corrupt it could trash the data. That is the reason for him to post the VBR or have ‘testdisk’ check it.
I tried to play a .ogg file using amarok but did not hear any sound. There was a sound when the system started but it stopped and showed an error message. I think there is something wrong with the drivers.
This is nothing to do with the thread question. Start a new thread in the correct section, you will get better help that way: SDB:AudioTroubleshooting - openSUSE
And you are right. Something seems to be wrong with my c: XP partition. All other drives are working fine since I am able to access them from suse 11.1
The output from dd if=/dev/sda1 of=xpvbr count=1 bs=512 post #10. For what ever reason GRUB was written to the XP’s Volume Boot Record (VBR), that is NOT good.
The VBR contains 2 parts. one is the boot code for the OS to boot, in this case it must be XP’s. The 2nd part ,more important is the Bios Parameter Block (BPB). The BPB contains info for the partition parameters, if it is wrong the partition will fail to read correctly. The BPB starts at data offset 0003 and ends at 0050. Grub over wrote BPB starting at offset 003E. Till this is fixed NO NOT mess with the XP partition or data corruption will result.
There is a backup copy of the VBR at the very end of XP’s partition.
Now how to fix, ‘testdisk’ will fix it, but you must read it’s How-To and mostly to ‘recover XP boot sector’.
The other way is to use ‘dd’ again, but must know the ending sector for the XP partition.
To get ending sector:
sudo /sbin/fdisk -l -u
add the start sector # (+) the end sector # = needed sector #
Because in your earlier post you asked me to be careful of the typos. I did the dd thing. Then I restarted. When it went into suse it did not show the normal GUI login. So I used the reboot command after I put root and the login password.
I went into Suse Failsafe option and was able to get GUI and login properly. Guess what, my audio is working too and am able to play .mp3 files.
(No hurt intended) Please make sure you have posted the right thing because I do not want to lose this failsafe GUI login using the dd command, because I have to reinstall my XP, since I do not have many options left. I am a newbie in linux and I cannot operate things if I cant see them(GUI).
Are you sure?
No, I did make a mistake but you would not have seen the text as I requested you to look for with the ‘xxd’ command and would not have written raw data directly to hdd. All other posted ‘dd’ commands wrote data only to a file so no problems should have resulted.
Just what is ‘dd’ doing==
1)if=input data --read from device or file
2)of= write to device or file
3)bs=read # of bits
4)count= number of times to read ‘bs’
5)skip=used for ‘if’
6)seek=used for ‘of’
till the last dd command all you did was to read raw data from hdd to a file, so no problems could have been done.
Now for my error and explanation:
The XP program I was using list the MBR data directly listing the partition start sector and total sectors. linux fdisk list the start sector and end sector.
add the start sector # (+) the end sector # = needed sector #
it should be
end sector =needed sector
Corrected what to do:
sudo /sbin/fdisk -l -u
dd if=/dev/sda of=xpbuvbr count=1 bs=512 skip=xxx "xxx=XP's end sector
# from fdisk above "
Will now look at saved file and verify if it is correct before proceeding.
xxd xpbuvbr
you should see at end of file -left side
A disk read error occurred
NTLDR is missing
NTLDR is compressed
Press Ctrl+Alt+Del to restart
!!Very important!! if the above text is missing-STOP
dd of=/dev/sda1 if=xpbuvbr count=1 bs=512
The above code will write directly to the hdd-the very first sector of sda1 , the XP’s VBR.