Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-04-2004, 10:00 AM
|
#1
|
LQ Newbie
Registered: Nov 2004
Posts: 8
Rep:
|
Install boot loader in ROOT partition problem
Hello everyone,
I'm a little bit confused with this whole "dual-booting story" and i would really appreciate your help.
First of all, i don't want to install the boot loader on MBR. So i decided to load it on the root
partition of Linux. I'm using Mandrake 10.1 and i have one partition for Windows and 3 for linux ( /, /home, /swap).
Just after i installed the boot loader on the root partition i rebooted and there it was the GRUB console. No menus, no OS to boot, no nothing.
Well OK, i knew that there would be no menus. But i expected too that the MBR would have stayed intact and Windows would load without problem and without being aware of the linux presence. What is really happening underneath;
Did the boot loader mess with the MBR or not; What is really happenning ;
Please enlighten me 
|
|
|
12-04-2004, 01:03 PM
|
#2
|
Member
Registered: Apr 2003
Distribution: Fedora Core 4
Posts: 34
Rep:
|
Sounds like Grub was actually installed on the MBR although you didn't intend to. You might as well make the best of the situation and use it.
Try this at the grub console to boot Windows:
root (hd0,0)
makeactive
chainloader +1
boot
To boot linux:
root (<your_linux_partition>)
kernel /boot/vmlinuz
boot
If that worked for both OS's, you can configure grub.conf to have a boot menu. Post back if you need help doing that.
Good luck.
|
|
|
12-04-2004, 01:25 PM
|
#3
|
LQ Newbie
Registered: Nov 2004
Posts: 8
Original Poster
Rep:
|
Thanks for your answer!!
I'm not sure if you can write all these commands in the GRUB console environment.
I'm talking about the "GRUB>" prompt where you press TAB for the list of available commands.
Anyway, i've fixed the MBR using the "fixmbr" from the Windows XP recovery console.
My main QUESTION is the following :
Was this the proper behaviour and why???
I installed the boot loader (whichever that was) in the first sector of the ROOT partition and yet the MBR got messed up. That's what i think cause, windows wouldn't boot any more. I expected Windows to load without a problem...
Quote:
Originally posted by triet
Sounds like Grub was actually installed on the MBR although you didn't intend to. You might as well make the best of the situation and use it.
Try this at the grub console to boot Windows:
root (hd0,0)
makeactive
chainloader +1
boot
To boot linux:
root (<your_linux_partition>)
kernel /boot/vmlinuz
boot
If that worked for both OS's, you can configure grub.conf to have a boot menu. Post back if you need help doing that.
Good luck.
|
|
|
|
12-04-2004, 01:41 PM
|
#4
|
Member
Registered: Apr 2003
Distribution: Fedora Core 4
Posts: 34
Rep:
|
Each of those lines is a separate command actually.
To answer your question: No, it's not normal behaviour. If you didn't set Mandrake installation to install Grub on MBR then it should have left it alone. That's what i do on my system. I leave the MBR in the hand of Windows. I configure Windows boot loader to load up Grub which i put somewhere else and configured to load up all my Linux distros.
|
|
|
12-04-2004, 01:51 PM
|
#5
|
LQ Newbie
Registered: Nov 2004
Posts: 8
Original Poster
Rep:
|
Yes, you are right about the commands. My mistake
That's what i want to do. Leave the MBR for windows to handle 
I would be grateful if you could give me more info on that.
Where do you place the boot loader??
I've read a tutorial about creating a "linux.bin" for example using the "dd" command in order to place it in C:\ and let windows thereafter handle the boot process. I assume that you do something similar.
Is a /boot partition needed or not?
Thanks again triet for your answers
|
|
|
12-04-2004, 02:21 PM
|
#6
|
Member
Registered: Apr 2003
Distribution: Fedora Core 4
Posts: 34
Rep:
|
You're welcome.
Yes, that's what i did: using dd to write the Grub boot sector to a linux.bin file then making an entry in boot.ini to load it up.
On newer systems, you don't really need a separate /boot partition. The only 2 required partitions are swap and root (/). On older systems, if your root partition is beyond the first 1024 cylinders (~8.5 GB) of the hard drive then you need a separate /boot partition located within the first 1024 cylinders. Old BIOS can't boot a partition beyond the first 1024 cylinders that's why.
Did you keep your linux partitions? What's the layout of your partitions (primary? extended? logical?)?
|
|
|
12-04-2004, 02:39 PM
|
#7
|
LQ Newbie
Registered: Nov 2004
Posts: 8
Original Poster
Rep:
|
I am aware of the 1024 cylinder limit but i didn't know that because this limit is broken the /boot partition is obsolete. Nice to know that
First of all i'm using a SATA drive. There are two partitions dedicated to Windows.
One primary which hosts the Windows installation and one extended which hosts 4 logical partitions in the following order. The one is NTFS and the other three are for Linux ( /, /home, /swap). I'm not sure if it matters (i think not) but both C:\ and D:\ are NTFS formatted.
I know that i may encounter problems in the future and that i can't write on NTFS from within Linux. Anyway suppose that i convert them to FAT32 to make my life easier....
|
|
|
12-04-2004, 06:42 PM
|
#8
|
LQ Newbie
Registered: Nov 2004
Posts: 8
Original Poster
Rep:
|
I've done my research in the web and i've come with 2 possible explanations. Please, correct me if i'm wrong.
1) I've installed the bootloader on logical partition which isn't bootable.
2) I have to make active the ROOT partition.
What do you think????
|
|
|
12-05-2004, 04:20 AM
|
#9
|
Member
Registered: Apr 2003
Distribution: Fedora Core 4
Posts: 34
Rep:
|
I'm afraid those two are not the right reasons. Grub is easy. It can boot up any partition and it doesn't have to be active. Based on your descriptions, this is your layout:
/dev/hda
/dev/hda1
/dev/hda2
/dev/hda5 (NTFS)
/dev/hda6 (/)
/dev/hda7 (/home)
/dev/hda8 (swap)
You might want to consider adding a FAT32 partition somewhere to share files between the 2 OS's.
You want to install Grub at the start of the root (/) partition which is /dev/hda6. Exactly step by step how to do it is a bit different depends on the distro. I use Fedora Core 3 so i don't know how it goes in Mandrake, but here are the general steps:
1. You need to boot into linux. Insert your Mandrake CD and boot from it. When you are prompted for boot options, type:
linux rescue
This'll take you to rescue mode. The menu here offers several options. Select the one that takes you to the console.
2. From the command line, install grub to /dev/hda6 by:
# grub-install /dev/hda6
3. Write the boot sector into a linux.bin file:
# dd if=/dev/hda6 of=linux.bin bs=512 count=1
4. Insert a floppy. Copy linux.bin to the floppy:
# mount /dev/fd0 /mnt/floppy (or mount it to wherever of your choice)
# cp linux.bin /mnt/floppy/
5. Boot into Windows. Copy linux.bin from the floppy to your C:\. Add the 2 blue lines to your C:\boot.ini file (careful with this file. A typo could prevent you from boot up your Windows. So have your Windows CD ready for a rescue):
[boot loader]
timeout=-1
default=c:\linux.bin
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn
c:\linux.bin="Linux"
6. Now try rebooting and you should be presented with a menu with options to boot to Windows or "Linux." Selecting Linux would activate Grub. Since you already installed Grub before, menu.lst should have been configured for you already. You should see a linux boot menu. If that's not the case and you're thrown to grub command line, do this to boot linux:
root (hd0,5)
kernel /boot/vmlinuz
boot
After getting into Linux, configure a menu.lst for a boot menu so you won't have to type those commands everytime.
|
|
|
All times are GMT -5. The time now is 03:44 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|