Click to See Complete Forum and Search --> : No grub?


korn4266
07-13-2004, 11:37 PM
I have had to reinstall my windows xp installation recently and now i don't have a grub screen. I can only get to linux with my boot disk. I am using fedora core 1. I have already tried using the grub-install /dev/hda and it tells me that that isn't a command. How do i fix it? I also can't read my Windows xp drive from linux. Is there a way to access my windows drive with read only mode?


I have already searched the fourms about my grub problem and no luck finding anything that helped.

saikee
07-14-2004, 06:36 AM
FC2 obeys the command grub-install in my case.

I suggest to have another go and log in as a root user. Think it may be a privileaged operation because you are asking Linux to write on MBR traditionally occupied by Windows. If you had a Grub screen before then it cannot have been loaded with the other bootloader Lilo. It should be OK as I lost the booting many times and got it back this way.

The last resort is to use the FC1 installation CD if you must, as the long loading time for a Red Hat system is quite torturing comparing with other distros.


You can read Windows NTFS partition by mounting it on the FC1 filing system. First you need to creat the directory first and the mount it second. something along the line

mkdir /mnt/my_widows
mount -t ntfs /dev/hda1 /mnt/my_windows

assuming your Windows is residing in the first partition of the first drive.

stumbles
07-14-2004, 08:45 AM
Originally posted by korn4266
I have had to reinstall my windows xp installation recently and now i don't have a grub screen. I can only get to linux with my boot disk. I am using fedora core 1. I have already tried using the grub-install /dev/hda and it tells me that that isn't a command. How do i fix it? I also can't read my Windows xp drive from linux. Is there a way to access my windows drive with read only mode?


I have already searched the fourms about my grub problem and no luck finding anything that helped.


IIRC the correct command syntax for grub-install is;

root@localhost - # grub-install hd0


Assuming you want grub to modify the MBR of /dev/hda.

saikee
07-14-2004, 09:36 AM
stumbles,

I am aware of that Grub could be slightly different in each distro.

Is there any difference between

grub-intsall /dev/hda

and

grub-install hd0

or can they both work?

The first one has been advocated in "Linux in a nutshell" from memory and has worked for me in FC2. As the command is issued in Linux and not in Grub command prompt the /dev/hda would appear logical, would this not? I would be at a loss because the normal /dev/hda is usable in all root commands suddenly has to change to hd0.

There is a confusion that according to some write-ups Grub doesn't know how the hard drive is called in Linux (my FC2 calls it hda but in Suse it is hde!) and has its own convention of naming it (hd0,0) in Grub prompt. Thus in command prompt I can boot FC2 or Suse by referring them to (hd0,2) or (hd0,6) respectively in my case.

stumbles
07-14-2004, 10:20 AM
Before going into a diatribe, did you try my suggestion?

korn4266
07-14-2004, 04:40 PM
Well I used root to install grub using the grub-install /dev/hda1 command and it worked.


I also tried to mount my windows drive like saikee said and i didn't work it just gave me the message
mount: fs type ntfs not supported be kernel.

Should i update my kernel to the newest 2.6 version or can you guys help me out from there?

saikee
07-14-2004, 08:56 PM
I am not entirely sure the kernel 2.6 issue myself. I checked the kernelversion with Knoppix and Mandrake which are both 2.4 but I could read Windows files there. FC2 on the other hand has 2.6 and it seems to have a problem with it.

korn4266
07-14-2004, 11:11 PM
My kernel version that came with FC1 is only 2.4.22-1.2115.nptl. So i don't have 2.6. So shouldn't it work?

paj12
07-14-2004, 11:43 PM
No grub? You must be hungry. :p

Anytime you run a Windows install, it does the equivalent of an "fdisk /mbr", so always have a boot disk on hand to get into Linux and get your bootloader back on the MBR.

NTFS support is something that needs to be compiled into the kernel. A lot of mainstream distros don't comes with NTFS enabled in the kernel because it's extremely experimental and read-only. They don't want to catch crap from customers that lost data trying to deal with NTFS partitions.

The ideal situation would be to install Windows on a FAT partition. In lieu of that, however, you could create a small FAT partition to share data between Windows and Linux. In any case, you should avoid dealing with NTFS directly from Linux.

Hope this helps.

korn4266
07-15-2004, 12:20 AM
Well all my harddrives have stuff on them that i can't get rid of...so then i need a way of creating a partition that can handle around 30gbs or i need another harddrive to go with the 3 i have now. I think i might can barrow a drive from my uncle to move some stuff to linux or buy one from him.:D

On a drive with the fat32 fs would i loose data if i use read and write?

paj12
07-15-2004, 12:29 AM
Not at all. Reading and writing to FAT32 is fully supported no matter what kernel you have.

korn4266
07-15-2004, 12:31 AM
Ok thanks for all the help everyone...i really appreciate all the help and everything...grub is back to working....now got to find another harddrive or format one with the fat32 fs.

korn4266
07-15-2004, 03:14 AM
Well i'm back to another problem...I just formatted a harddrive with fat32 and when i try to mount it i get the error message

mount: fs type fat32 not supported by kernel.

Then when I go to control center to check my kernel settings i get the error message:

The kernel configuration could not be read due to the following error:

/usr/src/linux-2.4/drivers/net/wan/Config.in, line 84:

then
^ parse error

Either your kernel sources contain invalid configuration rules or you just found a bug in the KDE kernel configurator.

I don't know what to do about this. How do I fix it? I know that Linux is recognizing the new harddrive but all those error are keeping me from using it. Help please.

saikee
07-15-2004, 04:44 AM
Strangely I have the same problem on some distros refusing to read FAT32 files saying the file systems not supported.

I bypass the problem by going into a distro that does as I am too green to mess around with the kernel at this stage.

My suggestion is to load a few more distros if you can. It is the same situation with hardware too and therefore it is more to do with how the kernel and the distro was compiled. No need to waste time unless you have the skill to fix the kernel yourself.

You can use the third party software to resize the partitions to get empty spaces back. Linux has QTparted available in Knoppix but I haven't managed to make it work yet. However the Windows-based Partition Majic can shrink the basic Linux Ext2 partitions but not the fancy ones. It originally reported the Linux partition were fixed sized but after a few days running the Linux the partitions become possible to resize.

The problem of resizing is once you create an additional partition in the hard disk the Linux could lose track to find its way back. I had 10 partitions before and managed to add another one between hda3 and hda4. The consequence is that all partitions beyond hda4 have been shift by one (hda4 becomes hda5 etc) and none of the distro can be booted from the original menu. I can to use grub to load each one back to amend the changes of the hard disk address. I am still in the process of fixing my distros relying on just a Grub boot floppy and one bootable distro to do the salvaging work. So there are consequences. I haven't managed within Linux to resize and add a partition yet but I would imagine the consequence won't be much different.

The tree-type file structure in Linux work like a magic to me but it has to be based on a mounting point so it pays to plan your partitions ahead before mounting any of them.

korn4266
07-15-2004, 10:18 PM
Well I want to try everything before looking for another distro. If that means recompiling the kernel then i'm willing to try it. I've done it before but that was in mandrake. So I think I'll try that...i have already downloaded the new kernel...version 2.6.7 so i think i might try it. But grub is messing up again this time...when i install it with grub-install /dev/hda1 when i reboot I try select my windows OS but it just keeps bringing me back to the grub boot screen and all i can get to is my fedora OS. Anyone know why?

paj12
07-16-2004, 12:17 AM
That's really wierd that your stock kernel doesn't have FAT32 support. Enabling in your kernel is easy. It's a simple checkbox if you use "make xconfig". The problem is getting everything else right so your computer actually works.

korn4266
07-16-2004, 12:25 AM
Well i can't use make xconfig in a terminal at all it doesn't work so if you know how to help me correct my problem in my other reply about not being able to edit kernel settings in control center then i could fix it.

paj12
07-16-2004, 11:29 PM
Personally, I've never used the kernel thingy in Control Center. If you've got ncurses, you could do make menuconfig. You could also do make config if you're really running a minimal system.

korn4266
07-17-2004, 12:11 AM
I fixed it by getting a new harddrive and making it a vfat fs. I was using the wrong command to mount it. I was using: mount -t fat32 /dev/hde1 /mnt/my_windows and the correct way was mount -t vfat /dev/hde1 /mnt/my_windows. Now i just got to fix grub. Read my other post about the grub problem if you will help me.

paj12
07-17-2004, 12:59 AM
Yeah. Sorry I didn't notice that before in your post. vfat is FAT32. msdos is FAT16.
grub-install /dev/hdX
Where hdX is your hard drive with Linux on it. I don't see any reason why this shouldn't work.

Once grub's working, boot up in Windows. Then transfer everything from you NTFS drive to your FAT32 drive. You should be able to read from and write to this data easily from Linux.

korn4266
07-18-2004, 12:40 AM
I think you might have missed my post about my new grub problem. When I install grub I use grub-install /dev/hda1 but when i reboot and try to boot my windows drive from the grub screen all it does is keeps loading the grub screen.


I already fixed my fat32 problem.

paj12
07-18-2004, 12:46 AM
Maybe your /etc/grub.conf is not pointing to the right partition for Windows.

You could also try LILO. It's a lot easier to set up, IMHO.

korn4266
07-18-2004, 12:50 AM
I was never given a choice of lilo or grub with fc1. This is probably a stupid question but where do I get lilo and how do I install it?

paj12
07-18-2004, 12:51 AM
Wait. I think i got it. You should have typed:
grub-install /dev/hda
Instead of:
grub-install /dev/hda1
Here's a site I found that's shows how to fix this:
http://www.sims.berkeley.edu/~jhall/grub_install_hda1.html

korn4266
07-18-2004, 12:56 AM
Ok thanks i'll try that after while. I'll post back with results.