LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-02-2007, 08:46 AM   #1
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Rep: Reputation: 15
windows keeps erasing boot flag


I read one topic about this problem and solution was something
like adding notice to windows that my linux paritition is active.
But in storage management i'm not able to set it active...
what shell i do?
Grub is installed, but windows changes flag to own parition so
grub can't say even word
 
Old 03-02-2007, 09:50 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Linux does not use the "boot" or "active" flag. Set it on the Windows partition only.
 
Old 03-02-2007, 10:25 AM   #3
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Original Poster
Rep: Reputation: 15
WHy does it boots then?
I can't set anything active
 
Old 03-04-2007, 08:09 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
You can use any partition manager to set the active flag: fdisk, GParted (comes on a stand-alone live CD), QTParted (comes with many distros, including the Knoppix live CD)

The Linux bootloader (grub or lilo) sends the system to a specified partition--it does not care about the boot flag
 
Old 03-06-2007, 09:50 AM   #5
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Original Poster
Rep: Reputation: 15
even thought i put boot flag on linux, when i rise windows and reboot system it automaticaly goes to windows..
if i go to linux first and reboot the computer grub rises normaly.
 
Old 03-06-2007, 10:52 AM   #6
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 69
Quote:
Originally Posted by pixellany
Linux does not use the "boot" or "active" flag. Set it on the Windows partition only.
Unless linux’s bootloader is not in the MBR…
 
Old 03-06-2007, 11:31 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by osor
Unless linux’s bootloader is not in the MBR…
Are you saying that--if grub is in a partition boot sector and that partition is chain-loaded--that the active flag is required?
 
Old 03-06-2007, 11:36 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by zowey
even thought i put boot flag on linux, when i rise windows and reboot system it automaticaly goes to windows..
if i go to linux first and reboot the computer grub rises normaly.
I cannot visualize what you are doing. The computer will go the hard drive which the BIOS identifies as #1, and it will look in the mbr for boot code. ti does not matter how the active flags are set.

Windows does apparently need an active flag, but I am not sure at what stage of the process it matters.

What are you doing to "go to Linux first"?

Running from Linux, Please post the output of: (do these as root)

Code:
fdisk -l
cat /boot/grub/menu.lst
 
Old 03-06-2007, 02:20 PM   #9
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 69
Quote:
Originally Posted by pixellany
Are you saying that--if grub is in a partition boot sector and that partition is chain-loaded--that the active flag is required?
I’m saying if grub is on a primary partition’s volume boot sector, and the MBR has only the standard MS MBR code, and the aforementioned grub is desired to be chainloaded from the MBR, the corresponding partition should have the “active” flag set in the MBR’s partition table.
 
Old 03-06-2007, 02:24 PM   #10
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 69
Quote:
Originally Posted by pixellany
The computer will go the hard drive which the BIOS identifies as #1, and it will look in the mbr for boot code.
After it looks in the MBR for boot code, it will execute that code. If that code is standard PC MBR code (as opposed to grub or lilo code), that program will chainload the boot sector of the partition marked as active.
 
Old 03-06-2007, 02:35 PM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by osor
After it looks in the MBR for boot code, it will execute that code. If that code is standard PC MBR code (as opposed to grub or lilo code), that program will chainload the boot sector of the partition marked as active.
This would be a way of using the Windows mbr code to dual-boot Linux, n'est-ce pas?
Have you tried it? (I have never seen it mentioned in the bazillion of posts on dual-booting)


PS: Zowey; We have not forgotten you--we're just having a side discussion while waiting for some more info from you......

Last edited by pixellany; 03-06-2007 at 02:36 PM.
 
Old 03-06-2007, 04:34 PM   #12
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 69
Quote:
Originally Posted by pixellany
This would be a way of using the Windows mbr code to dual-boot Linux, n'est-ce pas?
Have you tried it? (I have never seen it mentioned in the bazillion of posts on dual-booting)
Yes I have (it has been).
 
Old 03-17-2007, 04:10 AM   #13
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Original Poster
Rep: Reputation: 15
i suppose that i should set grub in MBR.
strange, this time it works. I've just reinstalled grub and it works.

Last edited by zowey; 03-17-2007 at 04:28 AM.
 
Old 03-17-2007, 09:21 AM   #14
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by zowey
i suppose that i should set grub in MBR.
strange, this time it works. I've just reinstalled grub and it works.
Hooray!!!

WIN-WIN: You solved your issue, and we learned something about the boot flag from Osor--I need to go play with this...
 
  


Reply

Tags
boot, erase, flag, windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting XP resets boot flag to its partition gavinbeatty Linux - General 6 12-26-2006 07:04 PM
erasing windows heffo_j Ubuntu 7 10-07-2006 09:04 PM
dual boot - Grub won't boot Windows on /windows/D partition biosol Suse/Novell 9 04-09-2006 08:14 PM
How do I dual boot Linux and Windows XP from Windows boot file andyri Linux - Newbie 4 08-04-2004 10:09 PM
erasing windows partition zetsui Linux - General 5 06-15-2003 02:13 PM


All times are GMT -5. The time now is 10:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration