FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to resolve an issue with winxp and fedora 6 on my laptop hardisk, for which details are as follows.
The harddisk has 2 partitions. On 1st partiition winxp is installed and on 2nd fedora 6 is installed. The boot loader is one which came with fedora 6 and I remember it uses the MBR of hard disk partition 1 where xp is installed.
I have important data to take from my winxp partition. I tried to boot from fedora cd...but it is not able to detect any partitions in hard drive which it used to detect earlier. when trying to boot it says operating system not found...I was able to boot earlier fine many times.
It also says if you proceed to install with new installation all data will be removed....so I am not taking any step further.
Wish to boot normally in winxp and need to take backup of imp data.
Any help would be highly appreaciated..thanks in advance
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369
Rep:
Quote:
Originally Posted by ashish1
Hi,
I am trying to resolve an issue with winxp and fedora 6 on my laptop hardisk, for which details are as follows.
The harddisk has 2 partitions. On 1st partiition winxp is installed and on 2nd fedora 6 is installed. The boot loader is one which came with fedora 6 and I remember it uses the MBR of hard disk partition 1 where xp is installed.
I have important data to take from my winxp partition. I tried to boot from fedora cd...but it is not able to detect any partitions in hard drive which it used to detect earlier. when trying to boot it says operating system not found...I was able to boot earlier fine many times.
It also says if you proceed to install with new installation all data will be removed....so I am not taking any step further.
Wish to boot normally in winxp and need to take backup of imp data.
Any help would be highly appreaciated..thanks in advance
Do have you the CD of winxp if so use the rescue mode of the winxp cd
and use the command fixmbr and restart
winxp should boot again leaving fedora fore what it is
It sounds like the hard disk or partition table is not being found.
Start by looking to see if the laptop BIOS has detected the hard disk. If you see a graphical logo when you start the computer try pressing the Esc key to display the text screen.
If the hard disk isn't detected by the BIOS then the hard disk may have failed. Double check the BIOS settings to make sure that the hard disk controller and hard disk are enabled.
If the laptop is old, the CMOS battery may have gone bad and that sometimes causes the BIOS to lose settings.
Before you use the "fixmbr" command, you should verify that the hard disk does not have any errors. Boot from the Windows XP Setup CD and select the options to run the Recovery Console. Type in the following command to check the disk for errors.
chkdsk /p c:
If the "chkdsk" command completes with errors, use it again until there are no errors or the errors are always identical.
If the drive C partition with NTFS can't be found then the partition table has been lost and using "fixmbr" won't solve the problem.
The "fixmbr" command doesn't require any other options.
fixmbr
It's possible that "fixmbr" will not completely solve the problem. You can use these other two commands in that case.
fixboot c:
bootcfg /rebuild
If it appears that there is no partition table, don't panic. You can use software such as Paragon Partition Manager to search for deleted partitions. There are free programs to recover partitions and files. The important thing is to avoid doing anything else that changes the contents of the disk. That's why I don't recommend using "fixmbr" if the partition for Windows XP can't be found. Even if it didn't make the problem worse it wouldn't correct the problem.
The mbr is a area not on a partition, I think you installed the boot loader in windows and windows killed it.
You should try to use a Trinty Rescue disk to recover data or use knoppix disk
Yes I have bootables of winxp and Fedora 6. I am bit scared to run those fixmbr and other commands, if those command ruin the further recovery steps.
I saw many people in forums fixing their problem via mounting filesystem and fixing grub and all. But for me when I tried to boot via fedora cd, went to rescue and all couldn't even mount system, simply because it cannot see any of hard disk partitions. Before this disaster everything was working fine for 2-3 weeks and later dont know what caused that to happen?
I will give a try to use the trinity home or knoppix to see what happens. Meanwhile I would like to know since this issue is related to MBR, will these tools fix MBR or allow you to see those unseen partitions? If they allow to see those partitions then problem is how to take backup because I do not have any visible partition.
So I guess there should be something specifically for fixing MBR, right?
Thanks a lot!
Last edited by ashish1; 04-06-2009 at 04:18 AM.
Reason: Updated Issue
Yes I have bootables of winxp and Fedora 6. I am bit scared to run those fixmbr and other commands, if those command ruin the further recovery steps.
I saw many people in forums fixing their problem via mounting filesystem and fixing grub and all. But for me when I tried to boot via fedora cd, went to rescue and all couldn't even mount system, simply because it cannot see any of hard disk partitions. Before this disaster everything was working fine for 2-3 weeks and later dont know what caused that to happen?
I will give a try to use the trinity home or knoppix to see what happens. Meanwhile I would like to know since this issue is related to MBR, will these tools fix MBR or allow you to see those unseen partitions? If they allow to see those partitions then problem is how to take backup because I do not have any visible partition.
So I guess there should be something specifically for fixing MBR, right?
Thanks a lot!
The tools that "fix" the Master Boot Record will not allow you to see unseen partitions. They are intended only to replace the software in the MBR and they do not alter the partition table area of the MBR.
Since nothing can see partitions on the hard disk you will have to solve that problem first. Try to determine if the hard disk is working. Does the BIOS detect the disk?
If the disk is detected by the BIOS then you can use partition un-delete or file recovery programs to reconstruct the partition table. I mentioned Paragon Hard Disk Manager since I have used that to recover partitions. It can search the hard disk for filesystems and recreate the partitions. There are other programs able to do that.
You may be better off to connect the hard disk to a working computer with a copy of Windows XP that does boot. You can use an external hard disk enclosure or USB adapter for IDE / SATA drives. You can also open the side cover on the other computer and connect the disk directly to the motherboard. I have done that a few times, usually with the disk sitting on top of an empty cardboard box if the cables are not long enough.
You can use the commands "fdisk" and "cfdisk" in Linux to display the partition table. It's possible that the partitions are just hidden (in the partition table marked as hidden). If you don't see any partitions in the partition table using "fdisk" or "cfdisk" then something has written over the Master Boot Record and software will be required to recover the partitions.
If you know exactly what size partitions existed before then you can create them again using "fdisk" or "cfdisk" without losing the data. DO NOT create logical partitions (inside an extended partition) until you have recovered your data from other (primary) partitions. Logical drives have partition entries at other locations besides the MBR and creating them can write over file data.
Since Windows XP's NTFS file system was probably the first primary partition you can probably access the files even if you create a partition that is too large. Just be careful and DO NOT use "chkdsk" until you have recovered all the important files. Using chkdsk could write over parts of other partitions unless you have the NTFS partition exactly the right size. You are better off to create partitions using Linux "fdisk" or "cfdisk" since Windows XP is likely to write things to the disk partition. With Linux you can guarantee that only the partition table will be changed and you can force the NTFS filesystem to be mounted read-only.
If you have very critical data on the disk then a safer approach is to get another hard disk and use "dd" in Linux or other software to make an exact sector-by-sector image copy of the hard disk. You can store the image into a large file or onto another empty hard disk. Programs such as Paragon Drive Backup can create a sector-by-sector image into an archive file that is compressed. As long as you make a good image backup then you can make another attempt even if you accidentally write over the data on the bad hard disk.
I apologize if I sound like a commercial for Paragon software but those are the programs I'm used to. They are good but not free and many of the free tools are just as good and sometimes better at certain things.
You may also find my blog on partitions and booting helpful. My Blog
Thanks for all the recommendations. Following is the status of actions carried out but not yet reached to any expected results.
[1]I used Super grub disk to remove grub from MBR, I thought now XP Boot menu will come but didnt see that.
[2] Any other command from grub disk not able to find partitions. Read help for fixing windows in grub disk, commands were not successful
[3]Then using recovery console of XP I used fixmbr command ..it says successfully written new MBR...then
[4] fixboot c: went successfully.
[5] Last command bootcfg /rebuild says "command not recognized". Could not understand why that happened
Now when system starts it says "NTLDR is missing, press any key to restart".
It seems something more is to be done to boot into winxp? any idea?
Thanks for all the recommendations. Following is the status of actions carried out but not yet reached to any expected results.
[1]I used Super grub disk to remove grub from MBR, I thought now XP Boot menu will come but didnt see that.
[2] Any other command from grub disk not able to find partitions. Read help for fixing windows in grub disk, commands were not successful
[3]Then using recovery console of XP I used fixmbr command ..it says successfully written new MBR...then
[4] fixboot c: went successfully.
[5] Last command bootcfg /rebuild says "command not recognized". Could not understand why that happened
Now when system starts it says "NTLDR is missing, press any key to restart".
It seems something more is to be done to boot into winxp? any idea?
The problem is the missing partitions. Since there is no partition containing NTFS (and Windows) the boot sector software can't find the NTLDR file. That file is always located in the first Primary partition. The first Primary partition usually also contains Windows (the WINDOWS folder).
You will have to create at least one partition. The best way to do that is with software that can search for missing partitions. If you use Linux "fdisk" or "cfdisk" you will have to know exactly what size your NTFS partition was to prevent the loss of the data in other partitions. If you don't care about the other partitions then create one large Primary partition using the entire disk. The next time you run "chkdsk" it will probably add all that extra space to the list of free clusters and eventually start writing new data there. Don't forget to set the first partition as Active (set the Boot flag with "fdisk" or "cfdisk").
The reason that bootcfg doesn't work is probably because there are no partitions on the hard disk. That command searches for copies of Windows and then updates or creates the "BOOT.INI" file. Since there is no partition on the hard disk it isn't possible to access "BOOT.INI" or create it.
Here is what happens when a computer boots Windows XP.
Power on or reset starts the BIOS software
The BIOS performs Power on Self Test
The BIOS detects disks
The BIOS reads the first (MBR) sector of the boot disk
The first (MBR) sector code executes
Normal MBR software looks for an Active "Boot" partition
MBR code reads the Active "Boot" partition's first sector
The NTFS Partition Boot Sector for Windows starts NTLDR
NTLDR reads BOOT.INI and displays boot menu
NTLDR uses NTDETECT.COM and BIOS to load Windows XP
Here is a diagram of how the boot process works.
BIOS-->MBR-->Partition Boot Sector-->NTLDR-->Windows XP
What I think you have now is this.
BIOS-->MBR-->Partition Boot Sector-->X
Up until the "X" none of the software knows or cares about filesystems. After that point a valid NTFS filesystem containing NTLDR is needed in order to continue booting.
In order for the Partition Boot Sector (created by "fixboot") to load NTLDR it has to see a valid partition and NTFS filesystem for the first Primary partition.
The first sector on the hard disk is the MBR containing boot software and the partition table. The "fixmbr" command replaces the boot software but does not repair or create the partition table in the MBR.
The first sector of an NTFS partition has the software to read NTLDR (the Windows XP boot loader). It searches the root directory for the "NTLDR" file name and then uses the directory entry to find the sectors containing NTLDR. Then it reads those sectors into memory and executes the NTLDR software. The first NTFS sector (Partition Boot Sector) only works if the NTFS partition and filesystem are present and correct.
I understand the need for partition, but if i now create new partition it will write new information in partition table, so i might be losing data, right? I was wondering how and which tool will write same partition table information which will allow me to restore my earlier state of hard disk. Can you recommend any free tools to check it up.
I know my 1st partition which was having winxp was larger in size than the one for linux. I had data on my winxp partition and no data on my linux partition. So I guess if any tool shows me that I can identify things based on size. Eager to know which tool should be used to fix and recover the partition table.
Since I do not have a base like OS to run any recovery tools, I badly need a tool which allow first to create an cd disk from its ISO image file, then boot from it and perform the fixing and recovery operations for partition table.
Thanks for such a detailed explanation and support
I understand the need for partition, but if i now create new partition it will write new information in partition table, so i might be losing data, right? I was wondering how and which tool will write same partition table information which will allow me to restore my earlier state of hard disk. Can you recommend any free tools to check it up.
I know my 1st partition which was having winxp was larger in size than the one for linux. I had data on my winxp partition and no data on my linux partition. So I guess if any tool shows me that I can identify things based on size. Eager to know which tool should be used to fix and recover the partition table.
Since I do not have a base like OS to run any recovery tools, I badly need a tool which allow first to create an cd disk from its ISO image file, then boot from it and perform the fixing and recovery operations for partition table.
Thanks for such a detailed explanation and support
Ashish
The Linux "fdisk" and "cfdisk" programs can create partitions without affecting the data in the hard disk partitions. They only change the partition table information in the Master Boot Record sector. You should not create an Extended partition or Logical drives/partitions since those require changing the contents of other hard disk sectors and could write over your data. If you don't care about recovering the data from the Linux partition then you only need to create one Primary partition using the entire hard disk. Set the type of that Primary partition to "NTFS".
The only partition recovery software that I've used is Paragon Partition Manager. Perhaps some others here can recommend programs that they have used. Since your Windows XP partition was at the beginning of the hard disk you should be able to just use Linux to create one partition for the entire hard disk. You might not need special software to find and create the partitions.
You should be able to use a Linux boot CD to create the partition for NTFS and be able to boot Windows XP. I recommend Slackware Linux because the boot CD goes to a shell prompt where you can type in commands. With other Linux CDs you will have to find out how to start a shell prompt to enter commands. Use the "cfdisk" command to edit the partition table.
cfdisk /dev/hda
or
cfdisk /dev/sda
I believe you will see no partitions. Select the option to create a new partition and just use the default size (all space on the hard disk). After you create the partition change the partition type to 7 (NTFS). Write the new partition table to the disk and then quit the program.
You can either try to mount the NTFS partition in Linux or try to boot from the hard disk. To mount the partition from Linux do something like this.
mount /dev/hda1 /mnt
or
mount /dev/sda1 /mnt
If the partition is mounted then you can look at files.
ls /mnt
You should see the NTLDR file and the WINDOWS directory.
When you are done looking then dismount the disk.
umount /mnt
Reboot the computer and see if the hard disk is able to boot.
Why don't you load grub/boot loader on a usb or CD - change to boot from what ever media in the bios(USB or CD)? when the box boots just select the OS (windows)and grab your stuff. All you need is the boot file from another Linux system with grub.
Yesterday I thought before editing the partition table, lets run some commands to know the status of hard disk. Here are the 3 results, based on this can you guide me what should be my next steps?
[1] fdisk -l at command prompt
______________________________
Sh-3.1# fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
units = cylinders of 16065 * 512 = 8225280 bytes
This doesn't look like a partition table. Probably you selected the wrong device
Code:
Device Boot Start End Blocks Id System
---------------------------------------------------------------------------------
/dev/sda1 ? 116388 126889 84344761 69 Unknown
partition1 does not end on cylinder boundary
/dev/sda2 ? 105915 222310 934940732+ 73 Unknown
partition2 does not end on cylinder boundary
/dev/sda3 ? 1 1 0 74 Unknown
partition3 does not end on cylinder boundary
/dev/sda4 1 213826 1717556736 0 Empty
partition4 does not end on cylinder boundary
Partition table entries are not in disk order
I remember my hard disk as partition1 with winxp, partiton2 with linux, some free space was there..so may be it is partition3, but i dont know about partition4.
[2] Super Grub Disk
____________________
When i use super grub disk, Super Grub disk > Boot & Tools > Boot partition - it shows the following output:
Code:
N IDE SCSI GRUB HURD TYPE OS
----------------------------------------------------
1 hda1 sda1 (hd0,0) hd0s1 unknown
2 hda2 sda2 (hd0,1) hd0s2 unknown
3 hda3 sda3 (hd0,2) hd0s3 unknown
[3] With Fedora CD
___________________
When I boot from fedora cd and ran normal installation mode it says:
Code:
/dev/sda has a loop partition layout. To use this disk for the installation of fedora core, it must be reinitialzed, causing the loss of all data on this drive.
I did not proceed further, as i just wanted to check status of hard disk.
Keeping hope alive that now I am moving towards some solution
Are you sure that the correct device name is "/dev/sda"? Have you tried using "/dev/hda"?
If you are sure that the correct device name is "/dev/sda" and you are not using any kind of RAID configuration then the partition table looks completely wrong. You can use "fdisk" or "cfdisk" and tell it to clear or reset the partition table. That will give you a table with no partitions defined. Then define the correct partitions. You can define a single partition filling the entire disk (type 7 for NTFS). You won't be able to recover your Linux files unless you create a second partition in exactly the correct location. Windows XP usually creates the first partition starting at sector offset 63. If you don't see your NTFS files you may have to tell "fdisk" or "cfdisk" to create the first partition starting at 63.
I recommend that you copy your most important files using Linux before you boot Windows XP. Windows XP may change information on the hard disk.
Using Linux "fdisk" and "cfdisk" to create ONLY Primary partitions will not change the data in the hard disk partitions. Be careful to avoid writing to the NTFS partition with other programs until you are sure that you have copied all your important files. You can mount the "ntfs" filesystem with the "ro" option although I think that may be the default. "ntfs-3g" can write to NTFS so be careful to use the "ro" option with that.
Great support for this continued follow-up. I had completed few steps but trying to resolve few things, here is the detail update.
My device is /dev/sda as /dev/hda didnt work. With linux fdisk i cleared the partition table, then defined a single partition with default values, made type as NTFS(7) and saved successfully the made changes. But I was not successful in mounting the filesystem.
I am bit confused with dev/sda and dev/sda1. Please see the output of these different commands.
Code:
[I] fdisk -l at shell prompt:
______________________________
disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 14593 116720257+ 7 HPFS/NTFS
I also tried to start at 63 but no desired effect observed.
Code:
[II] Comparing results of fdisk /dev/sda and fdisk /dev/sda1
_____________________________________________________________
fdisk /dev/sda
---------------
The number of cylinders for this disk is set to 14593. There is nothing wrong with that but this is larger than 1024 and could in certain setups cause problems with
1) Software that runs at boot time (e.g. old versions of lilo)
2) Booting and partitioning software from other OS (e.g. dos fdisk, os2 fdisk)
fdisk /dev/sda1
---------------
Device contains neither a valid dos partition, nor sun, SGI or OSF disk label.
Building a new DOS disk label. Changes will remain in memory only,
until you decide to write them. After that of course previous wont be recoverable.
The number of cylinders for this disk is set to 14531. There is nothing wrong with that but this is larger than 1024 and could in certain setups cause problems with
1) Software that runs at boot time (e.g. old versions of lilo)
2) Booting and partitioning software from other OS (e.g. dos fdisk, os2 fdisk)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Code:
[III] Comparing print partition results of fdisk /dev/sda and fdisk /dev/sda1
________________________________________________________________________________
fdisk /dev/sda --> Print Partition Table
-----------------------------------------
disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 14593 116720257+ 7 HPFS/NTFS
fdisk /dev/sda1 --> Print Partition Table
-------------------------------------------
/dev/sda1: 119.5 GB, 119521543680 bytes
255 heads, 63 sectors/track, 14531 cylinders
units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
I am worried now what can be done. If you see I need to execute some commands,
can you please suggest them in exact format.
ashish1 you do relies that fedora 6 is unsupported and the last update was on Dec 2007 and that about half of the software repos do not exist anymore (livina for fedora ... 4,5,6,7 are NO MORE )
and that if you need to install things on fedora 6 you will need to build it from the source .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.