Calling grub from install CD?

Brian Chadwick brianchad at westnet.com.au
Mon Aug 14 22:35:40 UTC 2006


Steven Pasternak wrote:
> Mark wrote:
>>>> Is there a way to somehow get into grub right from the install CD?
>>>>       
>>> Yes, but what are you hoping to do?
>>>     
>>
>> I messed up the boot record or something and was hoping to boot into 
>> my system in order to run grub-install.
>> I tried to run it from the rescue disc, but got an error saying it 
>> could not find /usr/sbin/grub - for whatever weird reason (the
>> file is there).
>> So I thought I could get into my regular system that way and then run 
>> grub-install.
>>
>>  
>>  
>>>> Can I enter a specific command at the initial install CD       
>>> prompt - the
>>>    
>>>> one where I usually enter "linux askmethod" or "linux rescue"?
>>>>       
>>> You can go into the rescue mode and, then, play with GRUB to install to
>>> a hard drive (e.g. to get a system to boot that's not working right).
>>>
>>> But if you're hoping to just get into GRUB to boot something, and not
>>> reconfigure a GRUB installation, I don't know how you'd go about doing
>>> that with the CD.  I've done that with floppies, years ago, after a 
>>> hard
>>> drive shuffle upset a multi-boot system.
>>>     
>>
>> Initially, I told the installer to install the boot loader in the 
>> first partition rather than the MBR.
>> After the installation, booting failed and it dropped me off at the 
>> grub prompt.
>> I manuall initiated the boot process from there and got into the 
>> system to run grub-install. After that everything was fine.
>>
>> Now I have to do something similar, but I can not get into the 
>> initial grub prompt. So I'm trying to get in there again...
>>
>> Thanks,
>>
>> MARK
>>
>>
>>   
> I've had to do this many times. Here is how I do it:
> Boot a live cd (knoppix, etc.)
> open a terminal and mount your root partition (eg. /dev/hda1 at 
> /media/hda1)
> mount your boot partition, /var, /usr, and anything else important (if 
> not on root)
> cd to your root and follow exactly:
> mount -t proc proc $PWD/proc
> mount -t sysfs sysfs $PWD/sys
> mount -t tmpfs tmpfs $PWD/dev
> mkdir dev/pts
> mount -t devpts devpts $PWD/dev/pts
> chroot $PWD /bin/bash
> /sbin/udevstart
>
> Now you can run grub-install like you are on your normal system. 
> Remember to unmount all of the partitions before you shut down, or you 
> will be griped at by knoppix (or whatever you prefer).
> Hope this was any help!
> -Steven
>
The FC5 rescue disk lets you do all this




More information about the fedora-list mailing list