Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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 read this post and decided I wanted to try this. I booted of a win98 cd and ran "fdisk /mbr", when I rebooted I got a no os found message.
I booted off the RH9 CDROM1 and went into linux rescue.
At the prompt I typed:
chroot /mnt/sysimage
It appears everything is there but if I go to the /boot and run "ls" nothing is there.
Run "mount" and it appears /dev/sda1 was not mounted to /boot
OO btw the parts are:
/dev/sda1 /boot
/dev/sda2 /
/dev/sda3 swap
I then ran "mount /dev/sda1 boot" from /
Now I have a boot and lost&found folder below /boot.
below the /boot/boot/grub folder appears to be everything.
I then tried to run "grub-install --root-directory=/boot /dev/sda1"
Now when I boot up instead of a "No operating system found" error I just get a "grub>" prompt and it says the vesion above and says hit tab for a list of commands...
Anybody tell me what I missed?
Originally posted by blackx I read this post [...]
I then tried to run "grub-install --root-directory=/boot /dev/sda1"
[...]
Anybody tell me what I missed?
I you have read the post you shold have find out that it should be:
grub-install --root-directory=/ dev/sda1
I rebooted to rescue mode, chrooted the /mnt/sysimage over to / so I had my normal environment.
I ran "grub-install --root-directory=/ /dev/sda1" but when I rebooted it just went to a "grub>" prompt. I figured it might had something to do with me running the command so much or possibly deleting something else. I reloaded RH9 again the same way.. I went to a terminal window inside of KDE and ran the mount command:
/dev/sda2 on / type ext3
none on /proc type proc
usbdevfs on /proc/bus/usb type usbdevfs
/dev/sda1 on /boot type ext3
none on /dev/pts type devpts
none on /dev/shm type tmpfs
I then ran vi on
/etc/grub.conf
/boot/grub/grub.conf
and got the same info:
default=0
timeout=10
splasimage(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8smp)
root (hd0,0)
kernel /vmlinuz-2.4.20-8smp ro root=Label=/
initd /initrd-2.4.20-8smp.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=Label=/
initd /initrd-2.4.20-8.img
Then I ran "vi /etc/fstab"
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts grid=5,mode=620
none /proc proc defaults
none /dev/shm tmpfs defaults
/dev/sda3 /swap swap defaults
/dev/cdrom /mnt/cdrom < typical info>
o 0 0
/dev/fd0 /mnt/floppy <typical info>
OOOOOKKK with all that in mind if I want to practice fixing the boot loader I should be able to run fdisk /mbr on the drive, boot off the RH9 cd1, go into rescue mode which will mount my environment to /mnt/sysimage, run "chroot /mnt/sysimage". Then all that is left is running the grub-install command correct?
grub-install --root-directory=/ /dev/sda1
or
grub-install --root-directory=/ /dev/sda
Mainly I am trying to play with fixing grub via rescue mode so any other tips would be much apperciated also...
Thanks for dealing w/ my limited linux knowledge.. hopefully this will change quickly....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.