LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Editing boot file (https://www.linuxquestions.org/questions/linux-newbie-8/editing-boot-file-805926/)

Kap1234 05-04-2010 02:56 PM

Editing boot file
 
Hey all.
I have samsung laptop and there is a nasty program called samsung recovery solution that changes the active partition to Windows each time you enter it. The trouble is: I have 2 OSes, Opensuse and Windows 7, and Grub that is installed in my Extended partition, so each time I enter this recovery program active flag is changed and Windows is loaded instead of grub. I have noticed some boot files in that program's folder, so the question is how can I edit them in most convenient manner? I have kde 4.5.3 is there some sort of included program that would help?

MTK358 05-04-2010 03:15 PM

Maybe you should tell Samsung...

:confused:

alunduil 05-04-2010 03:20 PM

Is there a reason you didn't install GRUB to the MBR? Can you remove the bootable flag from windows and still have it boot? I've also noticed that sometimes you need the bootable flag on the extended partition and the boot partition that is in the extended partition.

Regards,

Alunduil

Kap1234 05-04-2010 03:52 PM

Quote:

Originally Posted by alunduil (Post 3957311)
Is there a reason you didn't install GRUB to the MBR? Can you remove the bootable flag from windows and still have it boot? I've also noticed that sometimes you need the bootable flag on the extended partition and the boot partition that is in the extended partition.

There were 2 reasons: It was auto defined when I had been installing linux, and the second reason is that I've heard Windows needs MBR for itself and I didn't want to encounter unnecessary errors, though I think windows 7 would do just fine with Grub in MBR. But now I'm quite sure that this samsung program will kill Grub if it's in MBR as it rewrites mbr each time you enter it. I think contacting samsung is useless for such things, my point is trying to edit those boot files, think they hold the answer but don't know for sure. So how to edit them? So i could read them just like i read grub config files?

alunduil 05-04-2010 04:06 PM

Have you thought about editing the windows bootloader to load Linux? I've seen instructions elsewhere but don't have a link off-hand. If you need help finding it let me know.

Regards,

Alunduil

P.S. Would be pretty awesome if Windows defaulted to loading Linux.

Kap1234 05-04-2010 05:46 PM

Quote:

Originally Posted by alunduil (Post 3957350)
Have you thought about editing the windows bootloader to load Linux? I've seen instructions elsewhere but don't have a link off-hand. If you need help finding it let me know.
Linux.

For that I would need to edit bootloader, thats what i ask of you, how can I do that? I think it's not possible to do this from Windows, because EasyBCD shows some sort of error, guess it's because this recovery program alters mbr so it's unreadable by most programs. SO is it possible to do it from linux?? with any program??

I have thought of another solution to my problem, much easier but i still can't make it work. What i actually need is to make active my extended partition when i select certain menu item in grub. Grub is installed on extended partition, but editing grub .lst and setting makeactive command for menu item bring black screen with Invalid device message. I guess grub doesn't like activating extended partition? ;( any ideas how to do this??

aus9 05-04-2010 08:42 PM

hi

there are a number of solutions each has some merit

1) You can make windows boot linux using windows to "chainload" to the image of the linux bootloader.

http://www.geocities.com/epark/linux...w2k-HOWTO.html

YMMV as not sure if you need to tweak it as w7 uses a slightly diff bootloader I suspect.

2) Use a live cd to install boot loader into MBR....may cause your recovery partition to think you have installed malware....I AM NOT JOKING which then rewrites (recovers) your old mbr

which leads to a decision by you on whether you really need disk space used by hidden recovery partititon?

only you can decide.....lots use a live cd to wipe the partitions ....all of them....build a new partition table
install windows into its precious c partition
install linux into another primary partition
maybe have swap partition



3) makeactive.....is a windows "type" command used by grub legacy or grub2.....its to cause a bootable flag in msdos partitions so windows can boot...if you use grub* as a bootloader

I have not tested W7 so not sure this is still required.

good luck


All times are GMT -5. The time now is 03:25 PM.