View previous topic :: View next topic |
Author |
Message |
Justin-Time n00b
Joined: 01 Nov 2004 Posts: 22
|
Posted: Tue Nov 02, 2004 12:23 pm Post subject: Stupid mistake reinstall grub via livecd |
|
|
Hi,
I have installed gentoo and it works like a charm. The only thing I did wrong was that I deleted the partition from my windowsXP. So I made a new partion and installed windows XP there.
Well now is my grub ofcourse overwritten....
Now I am wondering what is the proper way to reinstall grub?
I was thinking of booting with the minimal live cd (amd64) mounting my boot and root and the chrooting into it and then rerun grub-install?
Or am I missing something? |
|
Back to top |
|
|
Extintor Tux's lil' helper
Joined: 09 Oct 2004 Posts: 113 Location: Stockholm, Sweden
|
|
Back to top |
|
|
Justin-Time n00b
Joined: 01 Nov 2004 Posts: 22
|
Posted: Tue Nov 02, 2004 1:43 pm Post subject: |
|
|
hmm... did not work.
I did:
- booted with minimal amd64 live cd (2004.2)
- modprobe ide-disk (to get my disk)
mkdir /mnt/gentoo/boot
mount /dev/hdb4 /mnt/gentoo
mount /dev/hdb1 /mnt/gentoo/boot
chroot /mnt/gentoo /bin/bash
then i did a grub-install --root-directory=/boot /dev/hdb
And I got a error about /proc/usb :S
Does anybody know what i did wrong? |
|
Back to top |
|
|
Justin-Time n00b
Joined: 01 Nov 2004 Posts: 22
|
Posted: Tue Nov 02, 2004 7:20 pm Post subject: |
|
|
Is there maybe some documentation about how to handle a situation like this? I can't find it. |
|
Back to top |
|
|
polle Veteran
Joined: 28 Feb 2003 Posts: 1498 Location: Belgium
|
Posted: Tue Nov 02, 2004 7:23 pm Post subject: |
|
|
where do you want install grub? I suppose in the MBR of hdb, not? |
|
Back to top |
|
|
Justin-Time n00b
Joined: 01 Nov 2004 Posts: 22
|
Posted: Tue Nov 02, 2004 9:12 pm Post subject: |
|
|
polle wrote: | where do you want install grub? I suppose in the MBR of hdb, not? |
Yes, in the MBR of hdb (hda does not exist) The configuration of GRUB is also good because it has worked for me before I installed Windows XP....
Any ideas? |
|
Back to top |
|
|
Justin-Time n00b
Joined: 01 Nov 2004 Posts: 22
|
Posted: Wed Nov 03, 2004 7:58 am Post subject: |
|
|
Well it still does not work.... The error I get is:
[code]
df: `/proc/bus/usb/`"No such file or directory
df: `/proc/bus/usb/`"No such file or directory
Could not find device for /boot/boot: Not found or not a block device |
|
Back to top |
|
|
jhfry n00b
Joined: 03 Nov 2004 Posts: 15
|
Posted: Wed Nov 03, 2004 8:03 am Post subject: |
|
|
From the install guide... doing it manually is just as easy as using the grub --install... and you can be sure it's running the way you want
:::
Alternative: Setting up GRUB using manual instructions
To start configuring GRUB, you type in grub. You'll be presented with the grub> grub command-line prompt. Now, you need to type in the right commands to install the GRUB boot record onto your hard drive.
Code Listing 8: Starting the GRUB shell
# grub
Note: If your system does not have any floppy drives, add the --no-floppy option to the above command to prevent grub from probing the (non-existing) floppy drives.
In the example configuration we want to install GRUB so that it reads its information from the boot-partition /dev/hda1, and installs the GRUB boot record on the hard drive's MBR (master boot record) so that the first thing we see when we turn on the computer is the GRUB prompt. Of course, if you haven't followed the example configuration during the installation, change the commands accordingly.
The tab completion mechanism of GRUB can be used from within GRUB. For instance, if you type in "root (" followed by a TAB, you will be presented with a list of devices (such as hd0). If you type in "root (hd0," followed by a TAB, you will receive a list of available partitions to choose from (such as hd0,0).
By using the tab completion, setting up GRUB should be not that hard. Now go on, configure GRUB, shall we?
Code Listing 9: Installing GRUB in the MBR
grub> root (hd0,0) (Specify where your /boot partition resides)
grub> setup (hd0) (Install GRUB in the MBR)
grub> quit (Exit the GRUB shell)
Note: If you want to install GRUB in a certain partition instead of the MBR, you have to alter the setup command so it points to the right partition. For instance, if you want GRUB installed in /dev/hda3, then the command becomes setup (hd0,2). Few users however want to do this. |
|
Back to top |
|
|
Justin-Time n00b
Joined: 01 Nov 2004 Posts: 22
|
Posted: Wed Nov 03, 2004 8:48 am Post subject: |
|
|
Thanks for the copy and paste from the handbook but I allready read it. I have fixed it myself now. I forgot to mount the /proc before I chrooted into the system. It's all fine now thanks. |
|
Back to top |
|
|
|