Booting XP resets boot flag to its partition
My laptop has a very good open-source multimedia player that needs its own custom MBR. I need to use a special key to boot to the multimedia player - so a normal boot just goes straight to the partition with the boot flag set.
So to use linux, I install bootloader (grub) to a partition, and have its boot flag set.
Current setup is
So currently, I need to boot a recovery CD/USB key and use parted to reset the boot flag.
The way I see it, there are 2 solutions:
* find a scriptable way to reset the boot flag to partition 2 on boot of windows so that it can be run automatically at startup. (I'd even accept a non-scriptable way, as long as it doesn't involve a boot floppy with fdisk as that's worse than using a linux recovery CD)
* find a way to get windows to stop acting like it owns by disk!! Can it be told to not reset the boot flag?
Been using linux for 4 years but I know quite little about partition management for windows etc. This not being a windows forum but I figured some other dual-booter may have solved this problem before ;-) . Any suggestion or redirects welcome.
linux does not care about the boot flag. You can use windows bootloader to start linux:
Hmmm, not a preferred solution. 2 bootloaders? I know linux does not NEED to be the boot flag set on its partition in order to boot. But I want a SINGLE bootloader (grub), installed on a linux partition that has its boot flag set. (By single bootloader, I mean single interactive bootloader of course ;-) )
It seems the tutorial you link to is a way around doing what I'm talking about. Is the reason for this that my second suggestion in the original post is impossible?
Easier than you think
(1) While in XP to set Linux partition active
Right click "My Computer", then left click "Manage", then "Storage" then "Disk Management". In there higlight the Linux partition and click "Mark partition as active". On a reboot the Linux will fire up.
(1) While in Linux to make XP bootable
Method A - Using cfdisk - Click terminal and issue command (assuming you disk is hda)
Method B - Using Grub - (This is avilable only in Linux that has Grub) invoke a Grub shell in terminal and issue command
On a reboot XP will fire up.
Having said the above I must say I share MichaelK view that we expect Linux to boot without the active flag switched on. Linux doesn't use the damn thing. Have you tried to boot it without the booting flag.
It has to be a damn stupid boot loader that can't boot a Linux with the help of the booting flag. I believe it is a 3rd party boot loader controlling XP's boot loader and Grub in your PC.
Lilo and Grub differ from the MS systems by declaring which partition to be booted up front. Booting flag or not has absolutely no consequence.
OK, misunderstanding of the situation I think. I'll try be more clear.
So, I want to dual-boot but writing to the MBR isn't an option as there's a very good, open-source, linux-based media player that has it's own crazy bootloader* in there already (and I'd like to keep it).
This leaves one option: install grub to some other location.
So put grub on some external media like a USB key or a CD (using a laptop with no floppy) maybe?
- Nada, too much hassle - don't want some stupid pseudo-dongle just to boot linux... I almost ALWAYS boot linux - hassle hassle hassle.
So put grub somewhere else... like the root of a partition (as I'm not using anything un-über-grub-friendly like XFS/JFS, I can do this easily).
- Yes, this sounds lovely! Just set this said linux partition to be "checked" first by setting its boot flag! :) - except windows will reset which partition is "checked" first every time I boot it :( . How? It resets the boot flag to its own partition. >:-@
Any other places to put grub? I don't know any... you might but I'm stumped.
So this leaves... "the problem". Windows resets the boot flag. How to rectify it:
1. Stop windows from changing it in the first place - No idea how. *I'M* ignorant enough to not know if it's windows that's even doing it or my crazy media player thingy.
2. Get windows to change it back after it resets it - No idea how to do this *IN WINDOWS*. I can use linux and parted and do it in one command
So, anyone know how to stop windows from resetting the boot flag or of a command line interface program (that isn't interactive) for windows that can reset it?
I'm using XP pro and Debian etch/testing on a Fujitsu-Siemens Amilo M 3438G for the curious.
* It actually used grub and I can even post the menu.lst that it uses [below] but I've tried adding the boot choice it specifies to a grub *I* install to the MBR and it doesn't work. Weird that it works in the first place, reading an NTFS partition like that but then again I don't know much about bootloaders :) Still strange seeing as I thought grub needed read-access even more than LILO needs because you don't quite INSTALL it quite as HARD. Gosh, I should stop when I say I know hardly anything about what I'm talking about!
Oh and here's what my grub on the debian partition has in its menu.lst for windows
1. MBR: Media-player's bootloader*. Selects option based on what key I press to boot: "Multimedia" or "On"
Suppose I press "On"
2. Boot partition: ordinarily, that's linux, so we get grub as I've it installed there. Whenever I boot windows via this grub, boot flag is reset to windows. Windows being partition 1 and linux partition 2 may be something to do with it, I don't know.
So, yes, in a way there's a third party bootloader. BUT, pressing "On" hands it all over to the boot flag game. Windows doesn't like this game.
Out of interest, here's the menu.lst for the media player in MBR:
|All times are GMT -5. The time now is 10:32 AM.|