You are not logged in.
Pages: 1
I'm trying to restore Grub after a Windows reinstall. I didn't give it a second thought 'cause I remember restoring Grub and Lilo to the MBR lots of times.
In slack I just chrooted the disk and grub-install /dev/hda would do the trick. But it didn't work this time, with Arch.
I tried the Slackware install disk, mounting the partition and mount --bind the /dev and /proc dirs to the mounted part (don't remember ever doing that before but ok). Chrooting and finally grub-install /dev/hda (or hd0,1) but it tells me the discs don't have a BIOS whatever. Adding --recheck to grub-install doesn't work, it takes forever (I let it go for about 5 minutes).
So I figure it's Arch's weird device scheme /dev/discs/di*. But the Arch install disc doesn't seem to be able to mount --bind (invalid option or something). I also can't boot to the partition, either the kernel doesn't support reiserfs or the procedure is broken. Sorry I can't be more specific but I'm not rebooting from this crappy OS untill I know the answer.
Thanks in advance for any help you can give me.
Offline
So I figure it's Arch's weird device scheme /dev/discs/di*.
That's devfs file system. I assume you're using the 0.7 install disc. From 0.7.1 udev is used on the install cd.
My normal way of reinstalling grub is:
- boot the install cd with normal parameters (like when you're going to do an install
- mount your devices to /mnt
- start the installer --> /arch/setup
- choose to install grub, it reads the menu.lst from your mounted partition
- install grub and end the installation
- reboot into your archlinux
Offline
Chrooting and finally grub-install /dev/hda (or hd0,1) but it tells me the discs don't have a BIOS whatever. Adding --recheck to grub-install doesn't work, it takes forever (I let it go for about 5 minutes).
This should work better:
# install-grub /dev/hda
If that fails you can always do it this way:
# grub
grub> root (hd0,1) --> your root partition
grub> setup (hd0) --> the MBR
grub> quit
/path/to/Truth
Offline
Haiyadragon wrote:So I figure it's Arch's weird device scheme /dev/discs/di*.
That's devfs file system. I assume you're using the 0.7 install disc. From 0.7.1 udev is used on the install cd.
My normal way of reinstalling grub is:
- boot the install cd with normal parameters (like when you're going to do an install - mount your devices to /mnt - start the installer --> /arch/setup - choose to install grub, it reads the menu.lst from your mounted partition - install grub and end the installation - reboot into your archlinux
You were right. I was using 0.7. Using Noodle and install_grub it was done in no time. Thanks guys.
But mount --bind still didn't work. I had to use the mount binary from the partition Any idea why? I didn't try the /arch/setup method (because the other one worked).
Offline
I believe the correct way for that should be
mount -o bind /dev/ mnt/dev
That should work I guess
Offline
I believe the correct way for that should be
mount -o bind /dev/ mnt/dev
That should work I guess
Nice
Offline
i'm trying to restore linux. my hd is hda. i get this:
kurumin@kurumin:/ramdisk/home/kurumin$ sudo chroot /mnt/hda2/
^[[Abash-3.1# install-grub /dev/hda
Install Device: (hd0) /dev/hda
Boot Device: (hd0,1) /dev/hda2
Continue? [Y/n] Y
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,1)
Error 21: Selected disk does not exist
grub> setup (hd0)
Error 12: Invalid device requested
grub> quit
/sbin/install-grub: line 138: /dev/null: Permissão negada
Grub installation finished.
bash-3.1#
Offline
i'm trying to restore linux. my hd is hda. i get this:
Error 21: Selected disk does not exist
grub> setup (hd0)
After this topic came up initially I tested the preferred method of restoring grub on my box using a chroot session just as you did, and received the same error message that you have posted. Since that time I've tried it on several other occasions and always got the identical error. But if I simply booted into Arch and used the install-grub command it completed the process as expected.
In short, to date I've never been able to restore grub on my Arch system using chroot. I've tried it from another Linux partition on my disk, from a liveCD and from the Arch InstallCD. I will say that I'm using the grub-gfx package and not the default grub version that comes with Arch.
/path/to/Truth
Offline
just a thought I can run lilo under chroot as shown in wiki ... would that work for grub...?
Mr Green I like Landuke!
Offline
Firstly, note that grub-install and install-grub are different scripts!
I have had some success using something along the lines of the following:
#!/bin/sh
# Install grub to MBR
# INSTALL is where your Arch system is mounted
# DEVICE can be /dev/hda or (hd0) style
# If you have a separate boot partition that must also be
# mounted correctly!
# e.g. for Arch on /dev/hda2
DEVICE=/dev/hda
INSTALL=/mnt/install
mount ${DEVICE}2 ${INSTALL}
#
mount --bind /proc ${INSTALL}/proc
mount --bind /sys ${INSTALL}/sys
mount --bind /dev ${INSTALL}/dev
cat /proc/mounts | grep ${INSTALL} | sed "s|${INSTALL}|/|" |
sed "s|//|/|" >${INSTALL}/etc/mtab
chroot ${INSTALL} /sbin/grub-install --no-floppy ${DEVICE}
: >${INSTALL}/etc/mtab
umount ${INSTALL}/dev
umount ${INSTALL}/sys
umount ${INSTALL}/proc
umount ${INSTALL}
larch: http://larch.berlios.de
Offline
The simplest solution I found is to start your system using the Super Grub CD (which can detect grub.cfg) and then in your system execute:
# grub-mkconfig -o /boot/grub/grub.cfg
which restored my previous Grub configuration.
Offline
Old 2006 post is old.
GRUB Legacy support has been dropped from Arch Linux since last year: https://www.archlinux.org/news/grub-leg … -supported
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
This topic is about grub-legacy (back then it was simply grub). This is why we frown upon bumping old threads. Closing.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Pages: 1