*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently installed PC-BSD on a spare hard drive, and during the installation, I chose not to touch the MBR, since I had Debian/GRUB installed on my main drive. After everything finished, and I rebooted, my only option was to boot PC-BSD, and GRUB never comes up. Is there a way I can add Debian, which is on hdb (slave) to the PC-BSD loader, or vice versa?
Also, I reinstalled PC-BSD, and I told it to modify the MBR, hoping it would fix things, and it's still the same. I also originally thought GRUB was installed on the MBR, but I think it's actually just on the Debian drive. If someone could shed light on all this, I'd really appreciate it.
Last edited by Crushing Belial; 12-02-2005 at 02:03 AM.
You could boot your system using a live cd like knoppix, chroot to your Debian root partition and reinstall grub to the mbr. You can add an grub entry for PC-BSD which looks something like below,
Originally posted by reddazz You could boot your system using a live cd like knoppix, chroot to your Debian root partition and reinstall grub to the mbr. You can add an grub entry for PC-BSD which looks something like below,
Originally posted by Crushing Belial How can I easily reinstall GRUB to the MBR?
I already gave you a hint in my initial post. Boot your system using a live cd such as knoppix or mepis, switch to root and then chroot to your Debian root partition and then do "gub-install /dev/hda".
Originally posted by reddazz I already gave you a hint in my initial post. Boot your system using a live cd such as knoppix or mepis, switch to root and then chroot to your Debian root partition and then do "gub-install /dev/hda".
Code:
Kanotix:/# grub-install /mnt/hdb1
Format of install_device not recognized.
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.
-h, --help print this message and exit
-v, --version print the version information and exit
--root-directory=DIR install GRUB images under the directory DIR
instead of the root directory
--grub-shell=FILE use FILE as the grub shell
--no-floppy do not probe any floppy drive
--force-lba force GRUB to use LBA mode even for a buggy
BIOS
--recheck probe a device map even if it already exists
INSTALL_DEVICE can be a GRUB device name or a system device filename.
grub-install copies GRUB images into the DIR/boot directory specfied by
--root-directory, and uses the grub shell to install grub into the boot
sector.
Report bugs to <bug-grub@gnu.org>.
Kanotix:/#
What am I missing?
Last edited by Crushing Belial; 12-02-2005 at 04:19 AM.
You're trying to install GRUB to a mountpoint. Try again using /dev/hda, as Reddazz told you - that's where the MBR is located. Make sure you don't ignore the chroot step.
Originally posted by mugstar You're trying to install GRUB to a mountpoint. Try again using /dev/hda, as Reddazz told you - that's where the MBR is located. Make sure you don't ignore the chroot step.
Code:
knoppix@2[knoppix]$ su
root@2[knoppix]# chroot /mnt/hdb1
Kanotix:/# grub-install /dev/hda
/sbin/grub-install: line 485: /dev/null: Permission denied
/sbin/grub-install: line 487: /dev/null: Permission denied
/sbin/grub-install: line 485: /dev/null: Permission denied
/sbin/grub-install: line 487: /dev/null: Permission denied
/sbin/grub-install: line 485: /dev/null: Permission denied
/sbin/grub-install: line 487: /dev/null: Permission denied
/sbin/grub-install: line 485: /dev/null: Permission denied
/sbin/grub-install: line 487: /dev/null: Permission denied
/sbin/grub-install: line 485: /dev/null: Permission denied
/sbin/grub-install: line 487: /dev/null: Permission denied
The file /boot/grub/stage1 not read correctly.
Kanotix:/#
Originally posted by reddazz Have you tried switching to root using "su -" instead of "su". Also try another live cd, I have done the same procedure using knoppix.
You can do it another way if grub-install proves stubborn.
After chroot to Debian you can invoke a Grub shell by typing
grub
root (hd0,1) <----------------I am ssuming your Debian in hda2, make adjustment yourself if it isn't.
setup (hd0) <----------------tell Grub to replicate Grub from the above root partition into the whole disk, which is the MBR
exit
reboot
PCBSD should be a booting choice in your Debian if you have implemented the reddaz's suggestion in #2 post, except I think hd1 should be hd0 unless you install everything in the second disk. Grub always count from 0.
Since you claimed to have denied PCBSD access to the MBR and this should have forced PCDBSD to install its boot loader inside it root partition. Therefore it can be chainloaded out in Grub by these 2 lines
You can do it another way if grub-install proves stubborn.
After chroot to Debian you can invoke a Grub shell by typing
grub
root (hd0,1) <----------------I am ssuming your Debian in hda2, make adjustment yourself if it isn't.
setup (hd0) <----------------tell Grub to replicate Grub from the above root partition into the whole disk, which is the MBR
exit
reboot
PCBSD should be a booting choice in your Debian if you have implemented the reddaz's suggestion in #2 post, except I think hd1 should be hd0 unless you install everything in the second disk. Grub always count from 0.
Since you claimed to have denied PCBSD access to the MBR and this should have forced PCDBSD to install its boot loader inside it root partition. Therefore it can be chainloaded out in Grub by these 2 lines
title PSBSD in hda1
chainloader (hd0,0)+1
or Lilo by these 2 lines
other=/dev/hda1
label=PCBSD
Code:
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 (hd1,0)
Error 21: Selected disk does not exist
grub>
root (hd1,0) doesn't work. I checked the GRUB menu list, and that's what it has, so I don't understand why it's not working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.