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'm going to be installing Windoze (because 3D graphics are still not there in Linux), but that will of course override the MBR. So how do I rewrite it? I just tried starting from the Fedora 11 DVD until it got into the 1st graphical screen, and then I tried to mount *any* of my Fedora partitions - I think it's made 5 of them (God knows why!!), but anyway,none of them would mount except /boot - kept saying "wrong fs type or superblock" etc. My plan was of course, to chroot my current Fedora partition, and then run grub-install, but of course I can't if the partition itself doesn't mount.
You should be able to run grub-install from the DVD. The important question is, what's in those other partitions? fdisk is your friend (but it'll turn on you the moment you make a mistake). Try(as root, in a terminal window)
Code:
fdisk -l /dev/sda
Once upon a time, I came upon the following, which I downloaded and keep with other misc documentation - my apologigies for not recording the author(s):
Quote:
Re: HOWTO: Restore GRUB (if your MBR is messed up)
Isn't it easier to do this:
1. Pop in the Live CD, boot from it until you reach the desktop.
2. Open a terminal window or switch to a tty.
3. Type "grub"
4. Type "root (hd0,6)", or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub).
5. Type "setup (hd0)", ot whatever your harddisk nr is.
6. Quit grub by typing "quit".
7. Reboot.
If you've installed GRUB into the Root Partition instead of the MBR, the commands are a little different. Here's are the instructions that I have for my system:
How to Restore the Grub Menu after a Re-Ghosting:
1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar.
2. Open a Terminal. Go SuperUser (that is, type "su"). Enter root passwords as necessary.
3. Type "grub" which makes a GRUB prompt appear.
4. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0,3)". Use whatever your computer spits out for the following lines.
5. Type "root (hd0,3)".
6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".
7. Type "quit".
8. Restart the system. Remove the bootable CD.
No - because Ubuntu Grub won't recognise my LVM Fedora partitions! I don't get this at all - this is Ubuntu 10.10 which I d/l'ed just about a month ago - surely this kernel is a *superset* of Fedora 11's? So how come it doesn't mount LVM partitions then??!!!
It would if you were in Ubuntu and mounted root partition of fedora.
Then do
"os-prober"
"updsate-grub"
sudo if you have it setup
I can't MOUNT Fedora's root partition:
ubuntu@ubuntu:~$ sudo mount -t ext4 /dev/sda3 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
And how do I find out which one the root partition IS? This is what FEdora did to my hard drive:
Device Boot Start End Blocks Id System
/dev/sda1 1 12748 102398278+ 7 HPFS/NTFS
/dev/sda2 12749 15358 20964825 5 Extended
/dev/sda3 15359 17968 20964825 83 Linux
/dev/sda4 17969 19457 11960392+ 83 Linux
/dev/sda5 * 12749 12774 204800 83 Linux
/dev/sda6 12774 15358 20759992+ 8e Linux LVM
By the way, mounting /dev/sda5 works fine! (that's the one with the kernel in it and stuff).
Last edited by resetreset; 01-23-2011 at 05:01 AM.
And how do I find out which one the root partition IS? This is what FEdora did to my hard drive:
Quote:
By the way, mounting /dev/sda5 works fine! (that's the one with the kernel in it and stuff).
If it boots on sda5 that's where your grub is.
It's also noted there by "*". Now all you have to do is mount again and repair your grub, the FEDORA way.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.