LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   boot (https://www.linuxquestions.org/questions/linux-newbie-8/boot-134321/)

leva 01-13-2004 09:11 AM

boot
 
Hi,
I had to reinstall Windows so now I have to install grub. The problem is that I can't even boot from cd properly. When I boot from RH9 cd 1 I type linux rescue. Than I have to select language and keyboard and finally I get prompt that looks like ''sh-2.05b#''. I don't know what kind of shell is this and I don't even know how to login as root.

My aim is to install grub with /sbin/grub_install/dev/hda

Thanks

homey 01-13-2004 09:32 AM

In Redhat rescue mode, just type: chroot /mnt/sysimage which should get you into the system. Then type:grub-install /dev/hda to get the grub back into the MBR

leva 01-13-2004 10:36 AM

I did what you said and it wrote that grub was installed successfully. When I start the system it doesn't ask me if I want win or linux. Instead there are some letters scattered around the screen and then windows start.

homey 01-13-2004 10:52 AM

Ok, maybe you should use the more involved method in this case...

1. Boot your machine from your boot media (cdrom1) and select linux rescue to install to the command prompt.

2. Redhat 8.0 displays a message “If you would like to make your system the root environment, run the command: chroot /mnt/sysimage”. Go ahead and do that.

3. At the prompt, type: rdev and make a note of the output. For example, if it looks like this... " /dev/hda2 / " . This indicates that the Redhat root partition is on the first drive and second partition. You need that info for the next step.

4. Get into the grub configuration utility with the command: grub.

·At the prompt grub> type the command: root (hd0,1) ; this will tell grub that the linux files it needs are on the first hard disk (hd0) and the second partition (1) of that drive. Change this to meet your configuration needs. For instance, if the linux files are on the second hard disk (hd1), first partition (0) of that drive then type root (hd1,0).

·If you selected the correct location (where linux is installed), you should see a message as follows.... Filesystem type is Ext2fs, partition type is 0x83.

.Then issue the following command: setup (hd0) ; this will install grub in the MBR of your first hard disk. You could change that to use the /boot partition if desired.

·Exit the grub utility with the command: quit

bigjohn 01-13-2004 10:55 AM

if you get the sh-2.05b# then it's started as root, unless you've changed things you get a # prompt for root and a $ prompt for user. The sh-2.05b# is a bash shell as far as I'm aware to start the window manager (depending on which one you use) just type kdm (for kde) or gdm (for gnome - don't quote me on the gnome one, but at a guess you would be trying to start the "g nome d esktop m anager - but kdm would be correct for kde)

regards

John

leva 01-13-2004 05:10 PM

Command: root (hd0,8) doesn't work (rdev reported /dev/hda9/). I typed then ''help root'' and got the following form of the command: root[DEVICE [HDBIAS]] but I still don't know how to formulate the command. I have RH9.

Thanks

PS What is the command for editor to see the contents of device.map script (like edit in windows)

drknow 01-13-2004 05:20 PM

umm not sure about the first part, but for the editing use vi <filename>. It is a text editor. press insert twice to go into replace mode. When you want to save press ESC and the type ":wq" to save and quit or type ":q!" to quit without saving.

Good luck man!

drknow 01-13-2004 05:25 PM

Hey, there is a better way to solve your problem (i think). Just reinstall red hat 9. That will let you reinstall your boot loader. I know your thinking that this would destroy your files, which brings me to my next part :). Make sure to check the "select packages to be installed" box. Then go and deselect everything except for the kernel you want to use. There should be 3 one for most people. One for people with a ton of memory(bigmem), and one for people with two processors (smp). Select the one you need and you should be all set.

drknow 01-13-2004 05:26 PM

ok just one more post :). Dont worry about the "(i think)" part of that last post. I am sure this will work. In fact Ive done it myself.

leva 01-14-2004 03:58 AM

Thanks drknow. I thought installing grub would be easier but I'll probably do what you suggested.

Homey: If you're still around I'd be glad if you could tell how hould I specify root command at grub prompt.


All times are GMT -5. The time now is 06:00 PM.