LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Grub cannot boot XP partition that was created/modified by ntfs-3g (http://www.linuxquestions.org/questions/linux-general-1/grub-cannot-boot-xp-partition-that-was-created-modified-by-ntfs-3g-689847/)

krisheyrman 12-11-2008 11:10 AM

Grub cannot boot XP partition that was created/modified by ntfs-3g
 
Hello

I have a composite problem that I really do not know where else to turn to.

My system -- a Dell D820 Latitude -- runs Fedora FC6 99% of the time.
I reduced the original Windows XP partition in size and kept it on
my partition /dev/sda2; I could mount it with ntfs-3g and occasionally
booted it with grub. I backed it up, together with my Linux partitions,
with rdiff-backup. Whenever I booted XP, it started to install funny
things from the Internet. (I know preciously little about Windows.)
One day the XP did not start up cleanly, and I decided to restore the
XP partition to a date that I knew it was working properly. That did
not help, so I did in Linux:

mkntfs /dev/sda2
mount -t ntfs-3g -o defaults,umask=0000 /dev/sda2 /media/xp
rdiff-backup --restore-as-of DATE RDIFF-DIR /media/xp
umount /dev/sda2

I noticed, checking the XP file system with

ntfsinfo -m /dev/sda2

something different about the MFT Zone Start, which used to be 806866 and was now 0.
Was there something hidden on the NTFS partition that I did not know about?
After the operation, XP would not boot any more. The grub configuration is

default=0
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.22.14-72.fc6)
root (hd0,4)
kernel /vmlinuz-2.6.22.14-72.fc6 ro root=LABEL=/ rhgb quiet combined_mode=libata
initrd /initrd-2.6.22.14-72.fc6.img timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.22.14-72.fc6)
root (hd0,4)
kernel /vmlinuz-2.6.22.14-72.fc6 ro root=LABEL=/ rhgb quiet combined_mode=libata
initrd /initrd-2.6.22.14-72.fc6.img
title xp
rootnoverify (hd0,1)
chainloader +1

Grub just says

rootnoverify (hd0,1)
chainloader +1

and shows a black screen. Obviously something is wrong with the XP
partition. Can anybody give a hint to what it could be? In Linux, it
lists like this (omitting non-essential files)

4fdf775e9560397835cc76e834b054cb ntldr
AUTOEXEC.BAT hiberfil.sys pagefile.sys
Bootfont.bin home
boot.ini i386 Program Files
INFCACHE.1
CONFIG.SYS IO.SYS RECYCLER
dell MSDOS.SYS System Volume Information
dell.sdr MSOCache tmp
Documents and Settings WINDOWS
drivers NTDETECT.COM

Even though this is not a Linux problem, I hope somebody on this list can help me.

Hern_28 12-11-2008 12:15 PM

System Rescue.
 
Have you tried to rescue the windows install with the windows disk, will have to re-install grub afterwards.

syg00 12-11-2008 12:39 PM

The ntfsprogs folks used to warn about backup/restore and moving (bootable partition particularly) of NTFS. Being a M$oft proprietary f/s it's a can of worms - they provide tools to assist, but they are of the clone variety.
Personally I would never rely on an rsync style backup of a non-POSIX f/s.

I don't like your chances of making this work - but I've never even thought of testing this.

igu 12-11-2008 02:18 PM

rdiff-backup can't do system, only file level backup. You should have used ntfsclone to save the entire Windows partition. That creates a completely exact volume copy. I never had problem with it in the last five years and I use it quite actively.

Linux Testdisk and/or Windows BOOTFIX may help you which can reinstall the bootsector which you didn't save.

krisheyrman 12-13-2008 04:33 AM

Status
 
I tried testdisk. It found the partition boot sector OK and 'fixed' the MBT, but it did not help. I now found a Hiren bootcd with many windows repair utilities, but I am threading wearily, not wanting to damage my linux partitions. Suggestions are still welcome.

ErV 12-13-2008 05:16 AM

Quote:

Originally Posted by krisheyrman (Post 3371867)
and I decided to restore the
XP partition to a date that I knew it was working properly.

How exactly did you restore it? AFAIK the only correct way to save/restore ntfs partition is with ntfsclone. I've been using this for quite some time and never had a problem. For example, if you saved files from partition instead of image of partition, I think you won't be able to easily restore windows system (I can honestly say that this means you are pretty screwed). You should try recovering system with recovery mode from windows CD.

Also, if this is true:
Quote:

Originally Posted by igu (Post 3372069)
rdiff-backup can't do system, only file level backup.

This means:
1) Your windows partiton has no boot loader. You won't be able to boot it at all. Try windows recovery mode, or the steps "igu" recommended.
2) All file permissions on ntfs partition are gone (ntfs-3g doesn't support windows permissions). You might get a lot of trouble even if you'll be able to restore system. For example, your windows system might become even more vulnerable than it were by default (because everything will be readable/writeable by everyone). In this situation I'd seriously consider installing windows from scratch.

krisheyrman 12-16-2008 02:32 AM

Yes, it seems i am screwed and will have to kiss this windows partition goodbye. I can live with that.

Thanks for all the good advice, though.

ErV 12-16-2008 03:22 AM

Quote:

Originally Posted by krisheyrman (Post 3377066)
Yes, it seems i am screwed and will have to kiss this windows partition goodbye. I can live with that.

Thanks for all the good advice, though.

You can try to reinstall windows, and then restore data preserved by filesystem-level backup (by overwriting parts of fresh windows installation). Be careful not to overwrite ntldr. Your permissions will be gone, of course, but you'll be able to restore at least some of your data.

QuakerJ 12-22-2008 06:50 AM

It used to be the case way back with Fedora Core 4 and XP not booting after the Fedora core installation, that it was necessary to go to the BIOS and toggle the HD addressing from LBA to AUTO or vice versa. You might like to try that. It won't screw up what you have there.

Junior Hacker 12-25-2008 03:42 AM

Quote:

something different about the MFT Zone Start, which used to be 806866 and was now 0.
The quote above tells the story. It's toast.
The First Master File Table is usually around the middle of the partition, "0" pretty much means there is no MFT anymore. Without a MFT, there are no files reachable by the file system.


All times are GMT -5. The time now is 11:10 PM.