LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub Install causing problems (https://www.linuxquestions.org/questions/linux-newbie-8/grub-install-causing-problems-767112/)

arun4will 11-05-2009 12:30 PM

Grub Install causing problems
 
Hi All,

I recently wrongly installed Grub in HDA1 where my Windows XP C:\ drive was installed.Using grub-install /dev/had1 command using Linux Rescue.

Grub got installed properly,but I'm not able to boot windows as C: as
Grub installed in it. When I try to fix this problem by Windows Installable CD by going to recovery Wizard, it is not possible as Windows is not detecting that drive.I tried mounting NTFS drive in Windows to recover my data, but still i was not able to mount C: even in Linux.

[root@localhost ~]# mount -t ntfs /dev/hda1 /mnt/win/
mount: wrong fs type, bad option, bad superblock on /dev/hda1,
missing codepage or other error
In some cases us
eful info is found in syslog - try
dmesg | tail or so[/B]

I'm getting the above problem.

I have some important data in C:. Please help me to recover my C: data atleast.

thanks
ArunPrabhu.V

ammorais 11-05-2009 12:58 PM

Try to install gparted and try to fix trough there. It's a nice gui tool that list your partitions, and you can try to fix it from there.

clayb226 11-05-2009 05:06 PM

What does the /boot/grub/grub.conf file say that windows is trying to boot to, or is it not even in there? Can you do a "fdisk -l" (I think this is the command) and see the partition listed as ntfs? Which distro are you using, many distros do not support mounting ntfs right out of the box. I run CentOS and had to install 4 packages to get it to work right. The packages were fuse and fuse-ntfs-3g with "yum install fuse fuse-ntfs-3g", and dkms and dkms-fuse with "yum install dkms dkms-fuse". If you are running kernel 2.6.18-164 or newer I think that the fuse kernel module is included in the kernel itself, so you do not need to install the dkms and dkms-fuse modules. you also need to make sure the kernel devel packages are installed. Then you can mount it with "mount -t ntfs-3g /dev/hda1 /mnt/win/" in theory. The only way I have ever done it is by editing the fstab file. and using the mount command.

arun4will 11-09-2009 03:31 AM

thanks for the feedback..but...
 
Hi..

I will try Gparted first. But to clarify..

I'm using Kernel 2.6.21.1. I compiled the kernel with NTFS option enabled.I'm able to mount other NTFS drives.Only the C: in HDA1 is having this problem.
The reason for that problem is I worngly installed GRUB in that disk space.So, the first 512K is occupied by GRUB.
If I do a FDISK i can still see that /dev/hda1 is NTFS partition with * representing Boot device where GRUB is installed.I think the data in that drive is still in place.

Please help me to find the solution.

Thanks
Arun

arun4will 11-09-2009 03:33 AM

fstab
 
Could you tell me how to edit the FSTAB file?

JamesChamberlain 11-09-2009 04:44 AM

Quote:

Originally Posted by arun4will (Post 3750049)
Could you tell me how to edit the FSTAB file?

/etc/fstab.conf is edited as below:

/dev/sda1 /boot ext3 defaults,acl,usrquota 1 2

Where:

/dev/sda1 = Partition
/boot = Mount point
ext3 = Filesystem type
defaults,acl,usrquota = Options for the filesystem - defaults are fine, i've just added acl and usrquotas there for example.
1 = Backup related info, 1 is fine
2 = Priority for partition to be checked by fsck on boot.

Larry Webb 11-09-2009 05:30 AM

Try using Super Grub to repair your mbr and it will help you boot your windows partition.


Larry


All times are GMT -5. The time now is 02:44 AM.