LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 12-23-2006, 08:00 AM   #1
biscristi
Member
 
Registered: Mar 2004
Distribution: Gentoo
Posts: 51

Rep: Reputation: 15
grub makeactive problem


Hy everyone.

My problem seems somewhat strange to me. Some time ago i was using triple boot between windows osx and linux with grub installation on the first partition of the hard disk (a small 100mb partition). Everything worked fine, and grub configuration for the osx operation system was something like:

title osx
root (hd0,3)
chainloader +1
makeactive

ok ... so far so good. the makeactive command didn't actually make the 4-th partition in this case, active, as grub still loaded every restart. if it were to make that partition active osx should have started directly .. no grub. problem is i don't quite understand this behavior ...

now i reinstalled grub, same settings, and once grub starts up and i boot into osx, after restarting it boots up osx directly, thus the osx partition is made active. and this is something i do not want ... i want every time the computer starts, grub to start.

i'm sorry, i know i'm not explaining this very clearly, but i hope you got the point ... what am i doing wrong with this ?

ps. if i comment out the makeactive part, the os does not load ... some unknown partition error.
 
Old 12-23-2006, 09:42 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
What is Windows OSX?? MAC OSX, maybe?

Two points:
making a partition active has no meaning with Linux--Windows, yes. OSX--i dont know.
making a partition active will not affect how grub starts up

Please supply the complete configuration--what partitions, where is the grub config file. etc. Post output of fdisk -l (run as root from Linux)
 
Old 12-23-2006, 09:58 AM   #3
jeelliso
Member
 
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250

Rep: Reputation: 30
Quote:
What is Windows OSX??
He said he was booting with Windows , OSX , and Linux.

You should check your partition tables. My guess is that the OSX partition is "bootable" meaning that it boots to this partition (this is how Windows works too). Pixellany is right, fdisk is what you need. Here is what my "fdisk -l" looks like:
Code:
blackbart:~ # fdisk -l

Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          66      530113+  83  Linux
/dev/hda2              67         197     1052257+  82  Linux swap / Solaris
/dev/hda3             198        1111     7341705   83  Linux
/dev/hda4            1112        4864    30145972+  83  Linux
Notice that my /dev/hda1 has a "*" in the boot column. This means that is is enabled to be booted directly. Make sure your Grub partition is the only partition with this boot flag. This should fix your problem (assuming Grub is working correctly).

Good Luck,
~Justin
 
Old 12-23-2006, 10:54 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Oh......Windows, OSX, and Linux (commas are really handy)

Not sure what you are saying about active flags. I thought GRUB would boot to a partition regardless of the flag. If GRUB is in the mbr, you can't bypass it and get to a partition directly. n'est-ce pas??
 
Old 12-23-2006, 11:44 AM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by pixellany
Oh......Windows, OSX, and Linux (commas are really handy)

Not sure what you are saying about active flags. I thought GRUB would boot to a partition regardless of the flag. If GRUB is in the mbr, you can't bypass it and get to a partition directly. n'est-ce pas??
The booting is started by the BIOS, not GRUB. Most (all?) BIOS will boot the "active" partition on the drive to which it has been pointed. If GRUB is in the MBR of the active partition, GRUB wil start, and, at that point, can boot any partition on any drive. But GRUB must first be started by the BIOS.
 
Old 12-23-2006, 12:19 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
That is not my understanding of how things work.

First, the MBR is--I believe--defined to be in the 1st sector on the drive (not in a partition). I also often see reference to the boot sector of a partition. This is--eg--where NTLDR lives. With Windows, the code in the MBR takes you to NTLDR in the Windows partition. similarly "chainloader" from GRUB takes you there also.

You can have grub in the MBR AND in a boot sector--then you would chainload from grub to grub

The bios goes to the 1st sector (mbr) looking for boot code. If nothing is there, no boot. (Does not matter how any partition is labelled or what code is there)

I just confirmed on my system that GRUB comes up the same regardless of how any partition boot flags are set.

Last edited by pixellany; 12-23-2006 at 12:23 PM.
 
Old 12-23-2006, 12:37 PM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Mae Culpa
 
Old 12-23-2006, 04:48 PM   #8
biscristi
Member
 
Registered: Mar 2004
Distribution: Gentoo
Posts: 51

Original Poster
Rep: Reputation: 15
Ok, sorry for the comma there ... just a typo. 3 OS-es, windows, osx, and linux.

partition table looks like this:

Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 14 112423+ 83 Linux
/dev/hdc2 15 2630 21013020 c W95 FAT32 (LBA)
/dev/hdc3 5242 19457 114190020 f W95 Ext'd (LBA)
/dev/hdc4 2631 5241 20972857+ af Unknown
/dev/hdc5 5242 7200 15735636 b W95 FAT32
/dev/hdc6 7201 16338 73400953+ b W95 FAT32
/dev/hdc7 16339 16472 1076323+ 82 Linux swap / Solaris
/dev/hdc8 16473 19457 23976981 83 Linux

Partition table entries are not in disk order


as you can see the bootable flag is set to the first partition on the drive, the one where grub is installed. when i try to boot osx with the makeactive line, the bootable flag is set to the 4-th partition, the one where osx is installed. this is something i don't get, beacuse without makeactive it won't boot, and with it it changes my active partition and the next time i restart it boots directly into osx ... which i don;t want. i know for sure it worked with these settings some time ago (not changing the bootable flag), the only thing that differed was partition sizes ... other than that it was the same. the first 3 partitions by the way are primary ... if this affects anything ...


ps. windows boots fine even without makeactive.

Last edited by biscristi; 12-23-2006 at 04:49 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB dual boot problem: Boot "other" (windows) just restarts GRUB! stevod333 Linux - Software 13 04-06-2006 05:26 AM
Problem with GRUB 0.95 thanhvn Linux - Software 5 12-04-2005 10:49 PM
Grub problem duffmckagan MEPIS 9 06-08-2005 03:35 AM
HDD problem, scancode problem and grub EJ_INSIDE Debian 2 07-15-2004 09:36 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration