Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 need to reinstall grub on my system. How do I do this? I am using Mandriva linux 2006 on KDE. My /boot/grub folder only contains "mdv-grub_splash.xpm.gz" and "menu.lst.example". Here is a link to the larger problem at hand, though reinstalling grub is the current issue.
The best thing to do is to reinstall the kernel. If you reinstall the kernel, then all supporting files will be installed. You could also try to configure the bootloader from the Mandriva control center and see if that generates the right files.
Check which version you are using by doing "uname -a" in a terminal. Download the kernel from a Mandriva mirror and reinstall it using "rpm -Uvh --nodeps" as root.
Linux localhost 2.6.12-12mdksmp #1 SMP Fri Sep 9 17:43:23 CEST 2005 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz unknown GNU/Linux
Then, I went into the Mandriva Linux Control Center/Software Packages Installation and installed "kernel-i586-up-1GB-2.6.12.12mdk-1-1mdk". Then i checked the contents of /boot/grub which remained the same.
After looking under installed packages in the Control Center, I now see the package I installed and "kernel-smp-2.6.12.12mdk-1-1mdk". Did I install the wrong one. Should I uninstall both and reinstall the original one? Should everything be fixed?
[root@localhost michael]# grub-install
install_device not specified.
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>.
Apparently I need to point grub-install to something, but I don't know what.
[root@localhost michael]# grub-install /boot/grub
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>.
I also tried this, but didn't follow it too well.
Code:
GRUB-INSTALL(8) FSF GRUB-INSTALL(8)
NAME
grub-install - install GRUB on your drive
SYNOPSIS
grub-install [OPTION] install_device
DESCRIPTION
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.
REPORTING BUGS
Report bugs to <bug-grub@gnu.org>.
SEE ALSO
The full documentation for grub-install is maintained as a Texinfo man-
ual. If the info and grub-install programs are properly installed at
your site, the command
--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.
REPORTING BUGS
Report bugs to <bug-grub@gnu.org>.
SEE ALSO
The full documentation for grub-install is maintained as a Texinfo man-
ual. If the info and grub-install programs are properly installed at
your site, the command
--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.
REPORTING BUGS
Report bugs to <bug-grub@gnu.org>.
SEE ALSO
The full documentation for grub-install is maintained as a Texinfo man-
ual. If the info and grub-install programs are properly installed at
your site, the command
info grub-install
should give you access to the complete manual.
grub-install (GNU GRUB 0.97) May 2005 GRUB-INSTALL(8)
As a result I tried this:
Code:
[root@localhost michael]# info grub-install
bash: info: command not found
I tried it on various parts of my drive with the same error:
Code:
[root@localhost michael]# grub-install /dev/sda
The file /boot/grub/stage1 not read correctly.
[root@localhost michael]# grub-install /dev/sda5
The file /boot/grub/stage1 not read correctly.
[root@localhost michael]# grub-install /dev/hda
/dev/hda: Not found or not a block device.
[root@localhost michael]# grub-install /dev/sda6
The file /boot/grub/stage1 not read correctly.
[root@localhost michael]# grub-install /dev/hda6
/dev/hda6: Not found or not a block device.
[root@localhost michael]# grub-install /dev/sda3
/dev/sda3: Not found or not a block device.
[root@localhost michael]# grub-install /dev/sda1
The file /boot/grub/stage1 not read correctly.
[root@localhost michael]# grub-install /dev/sda
The file /boot/grub/stage1 not read correctly.
[root@localhost michael]# grub-install /dev/sda5
The file /boot/grub/stage1 not read correctly.
[root@localhost ~]# rpm -Uvh --nodeps
rpm: no packages given for install
You did not stipulate which package to install. The right way is
Code:
# rpm -Uvh --nodeps kernel-version.rpm
kernel-version.rpm would be the version of the kernel you have downloaded and are going to install.
Anyway it seems like grub is not installed properly. I would uninstall it using rpmdrake and then reinstall it. After that reinstall your kernel so that it generates the right /boot/grub/menu.lst and other supporting files.
this is steps wefollow...
1. Boot your system using first CD in boot prompt type "linux rescue"
2. after getting one popup window just type "chroot /mnt/sysimage"
3. and lastly you get prompt..and then type "grub-install/dev/hda"(before that yousure about hard diskis connected to mastrer or slave)
4. and them reboot your system
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.