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 am fairly new to Linux. Im currently taking classes for Linux and have searched for this and cant find it.
I have XP installed on /dev/hdc1 and Fedora 6 on /dev/sda1. I installed grub to the XP partition, but my XP is acting up so i want to reinstall it. Problem is that grub is installed on this drive and i know that reinstalling windows would override the bootloader to get into Linux. I want to know step by step how to backup and reinstall grub to /dev/hdc1 after i have reinstalled XP. The instructions and answers im looking for are prolly right under my nose, but my nose cant see anything at the moment. Im sorry if this has been answered somewhere else, but i cant find it. Any help would be appreciated.
Thank you for your quick reply. Will this also work if XP and Fedora are installed on the same drive on my laptop and i want to do the same, just insert the correct partitions?
And can i just use a regular fc6 install disk or do i need to download a fc6 live cd? Thank you again.
Thank you for your quick reply. Will this also work if XP and Fedora are installed on the same drive on my laptop and i want to do the same, just insert the correct partitions?
And can i just use a regular fc6 install disk or do i need to download a fc6 live cd? Thank you again.
Copying and restoring the mbr is independent of what is on the drive. By definition, the mbr is on the 1st sector of the drive which the BIOS sees as #1.
Don't understand the question about the Fedora disk...You can do the dd thing from any Linux--eg what is already installed, live CD, etc.
Final nit: When you are talking about the mbr, there are no partitions involved.
Notice that Quakeboy02 used the first 446 bytes. Some howto's use 512 bytes. The first 446 bytes contain just the bootstrap loader code. So you would be backing up part of the MBR and not the entire MBR.
If XP uses the NTFS filesystem and you don't have NTFS write support in Linux, then you may want to copy the MBR backup image to a usb device instead and copy it to C:/ (/dev/hdc) when using XP before reinstalling.
I'm glad you made me look that up. I had though that the first 446 bytes contained only the boot code. But, apparently, it's even more complicated than that. But, if you backup the whole sector (512 bytes) be aware that that MBR is not transferable to any other disk, as it contains the partition table.
I do welcome any "constructive criticism" here, but if I remember correctly, there are some "reserved" bytes in the MBR, which is probably why Awesome uses 446 excluding the reserved bytes, which contain nothing.
Windows XP "assumes" it is the only operating system in existence in the Galaxy and can wipe your dual boot mbr.
I have found "Smart Boot Manager" to be useful to have around (Google for it). If Windows XP wipes your mbr on /dev/hdc1 the "Smart Boot Manager" should let you boot to Fedora 6 on /dev/sda1. Once booted, you should be able to reinstall grub as a dual boot system with:
Code:
grub-install /dev/sda
On the other hand, if you wish Windows XP to "fix" what Windows XP considers a corrupt mbr:
Code:
1. Boot from the Windows XP cdrom.
2. Run the "fixmbr" command.
Ok, just so im understanding right. If i reinstall windows on /dev/hdc, i can install "smart boot manager" and then boot to Fedora 6 on /dev/sda1. From there i install grub to /dev/sda, and if i wanted, instead install grub to /dev/hdc since i want it to boot from the first hard drive. I dont mean to be a PITA, i just got alot of conflicting info and want to get it right.
Ok, just so im understanding right. If i reinstall windows on /dev/hdc, i can install "smart boot manager" and then boot to Fedora 6 on /dev/sda1. From there i install grub to /dev/sda, and if i wanted, instead install grub to /dev/hdc since i want it to boot from the first hard drive. I dont mean to be a PITA, i just got alot of conflicting info and want to get it right.
"Smart Boot Manager" fits on a 3.5" floppy and is operating system independent. I find it useful just to have around. It allows you to boot from devices that otherwise not be bootable. If you have an internal 3.5" drive that can be selected as the boot device in the BIOS, you boot from the floppy and it allows you to boot from its menu, effectively bypassing a bad or unbootable mbr.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.