LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing grub without a distro (https://www.linuxquestions.org/questions/linux-newbie-8/installing-grub-without-a-distro-344998/)

squimmy 07-20-2005 09:18 AM

Installing grub without a distro
 
Is there any way in which I can install grub to hda5 (reiserfs) without actually installing linux? On hda, I also have an installation of Windows at hda1.

I want the config files for grub to be installed at hda5, and grub itself at the MBR.

Is this possible through a live cd? I have Mepis and Knoppix.

Thanks.

rose_bud4201 07-20-2005 09:43 AM

I don't see why it wouldn't be possible. Boot with one of your LiveCDs, edit the grub.conf file (see my question below), and do /sbin/grub-install /dev/hda. Once it's installed, it should work by itself (but you won't be able to change anything w/o that liveCD again, and your grub.conf file won't be preserved (it being a LiveCD and all). You'll have to completely recreate all changes every time you want to change something.

Edit: re-read your question. I suppose that you could format /dev/hda5 and mount it in knoppix, then copy your grub.conf file on it.

What do you want it to boot, though? If windows is your only OS, why not just keep Windows' boot manager?

titanium_geek 07-20-2005 10:11 AM

yeah, it will totaly work with knoppix. give it a go.

titanium_geek

squimmy 07-20-2005 11:11 AM

So I should boot into knoppix, format and mount hda5. Then

grub-install /dev/hda/

then copy the grub files to hda5? but where do I get the config files in the first place from? And how will grub know to look for it's config files at hda, not any other partition?

Thanks.

rose_bud4201 07-20-2005 11:16 AM

Once you install it, I don't think it should need the config file anymore. If it does....you'll be out of luck (in which case I suggest using lilo instead. That doesn't need its config file after it's installed.)
The purpose of having the config file on /dev/hda5 isn't all that clear to me, either...you might as well keep it on a floppy. The only reason for backing it up like that would be to save yourself from having to completely redo all changes every time you need to edit the config.
The config file is /etc/grub.conf - you'll be using the one on your Knoppix distro, and modifing it to suit whatever your needs are.

titanium_geek 07-20-2005 11:34 AM

To format hda5, when knoppix first "turns on" and gives you a prompt, type knoppix 2 now, type cfdisk and that should be fairly intuitive. if it balks, then type cfdisk /dev/hda.

I really have no idea why you would want to do what you are telling us, but yeah. google for "installing grub with knoppix"

titanium_geek

squimmy 07-20-2005 12:24 PM

Okay, I'll spill the beans. I have 2 hard drives. hda and hdb. One of the main reasons why I even bought hdb was to install linux on it. Yet every time i install a linux distro on there, the grub messes up. forcing me to reinstall the windows boot loader every time.

when i install grub, it will work for a few reboots just fine. booting both linux and windows. but soon it will come up with either error 18 or go to "loading grub stage 1.5" before dropping me to a command prompt. not showing me a list of OS's. I think the problem is that is cannot read the config files on the drive. so i am trying to install a grub onto hda,then install a linux distro on hdb, and then edit the grub conf file to allow for the new os. i am trying to install grub on hda because windows is on this drive and its bootloader has never once failed me. I created a 100 meg riserfs partition (hda5) to install it onto. then i realised that i have no clue how to install grub without installing the hole os onto hda, hence this thread.

So i will need a config file for grub to edit.

rose_bud4201 07-20-2005 12:32 PM

Use the /etc/grub.conf file from Knoppix, or whatever distro you're using to do this on. You'll definitely need to modify it to reflect your system config, though. Google for grub.conf to get an idea of the syntax.

titanium_geek 07-20-2005 01:28 PM

There is no reason why putting grub on the hda and linux on the hdb should be a problem. I would suggest messing around with grub on a floppy first, to get an idea of how it works and howto boot windows. then install it on hda.

titanium_geek


All times are GMT -5. The time now is 11:27 AM.