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.
Hey,
I recently reinstalled Windows XP on the same partition as it was before with RedHat 9.0 on the other. However, now when I restart my computer, it skips the bootloader and boots right into Windows XP. Does anyone know how I can get the bootloader to come up again everytime I restart without having to reinstalled RedHat? Thanks in advance.
The problem is that the Windows XP install over-wrote your boot sector. To replace it so that grub launches instead of the XP boot loader, you need to do the following.
Put your linux install CD into the drive and boot from it. At the boot prompt type:
linux rescue
When you get a command prompt, type:
% chroot /mnt/sysimage
Now type:
% /sbin/grub-install /dev/hda
Note: /dev/hda is probably correct, but you may need to change /dev/hda to whatever drive you boot from. Consult the following guide:
It said I was unable to change the root directory after that first command. I can boot into RedHat fine with a boot floppy disk. Is there a easier way to do it from RedHat? Thanks for your help.
It said I was unable to change the root directory after that first command. I can boot into RedHat fine with a boot floppy disk. Is there a easier way to do it from RedHat? Thanks for your help.
Get to a command line, and type "grub-install /dev/hda" like forrestt said, replacing hda with the appropriate device.
I have a similar problem, but I don't have a floppy drive or a rescue disk. I booted up from knoppix, and can access my hard disk partitions, but i can't get grub to install back on the mbr. Here's what happens:
root@ttyp0[/]# chroot /mnt/hda4 grub-install /dev/hda
/dev/hda does not have any corresponding BIOS drive
I think it might be because I booted from knoppix so /mnt/hda4/proc is empty, whereas /proc/ is full of stuff (i presume from the knoppix boot process)
The command needs to be separated (Not sure if you did this correctly and typed it differently in the post, or if you didn't do it correctly). It should be:
However, hda might not be correct. See my above post regarding drive assignments. If you do:
root@ttyp0[/]# ls /mnt/hda4
do you see your system? If you do, then hda is correct. If you do not, then you need to determine where your system is really located.
Another thing you might want to try is to copy all of the grub stuff from your real systems /etc to /etc on the knoppix system. After it is all copied, then run the grub-install command and see if that works. I have never done it that way before, but it might work. Post back and let me know how things are working.
and look for the line that lists /mnt/hda4. is the device that is mounted there /dev/hda4 or something else? If it is something else, replace that with the /dev/hda in the grub-install command, but leave off the 4. If it is /dev/hda4, then write back and I'll see if I can come up with something else.
/dev/root on / type ext2 (rw)
/dev/cdrom on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw, size=611168k)
usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
automount(pid403) on /mnt/auto type autofs (rw, fd=4,pgrp=403,minproto=2,maxproto=4)
/dev/hda4 on /mnt/hda4 type reiserfs (rw, nosuid, nodev)
/dev/hda1 on /mnt/hda1 type ext2 (rw, nosuid,nodev)
Is grub configured to load into the mbr or the first partition? If it is in the partition, then the problem might be the nodev option for /dev/hda1 (although I'm not super familiar with that option). Try remounting it without the nodev option
root@ttyp0[/]# umount /dev/hda1
root@ttyp0[/]# mount /dev/hda1 /mnt/hda1
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.