[opensuse-factory] How to dis/enable a bootloader?
Hi, Since i bought an eee-pc, i am again confronted with XP. Today i exchanged the original 16GB ssd, for a faster 64GB runcore ssd. Now i am able to dual or triple boot on a bigger drive. (sd card does not realy perform) As this os (xp) and i do not realy get along, i used Norton ghost to be able to backup my fully upgraded and tuned XP, to be able to restore the image without any fuss. The whole operation, complete with installing the xp-backup image, took me little less than half an hour. The case is that Ghost does not support bootloaders, but performs great. 1) Is there a way to easily disable/enable grub? As XP is the first on the drive, it would not be difficult to boot when the original mbr is reinstalled, as i allready tried that... (it is in the boot dir, and not in /var/lib/yast2/backup-boot_section/mbr, by the way, as in the release notes from 11.1 is stated...) or: 2) Where should grub be installed for the least trouble? And in case XP would stop booting, which can have many causes, but mostly a virus, i will have to reinstall the original mbr, and restore the backup. After that use an installation dvd/cd, to reinstall grub, or something like that. thnx for a useble answer.. M9. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Friday 20 March 2009 10:27:53 am Oddball wrote: ...
2) Where should grub be installed for the least trouble?
In boot sector of Linux partition, which is default. Partition must be primary and marked active, in other words bootable. After XP recovery from Ghost image, you can use recovery mode of openSUSE installation DVD to mark linux partition bootable again, if that information is lost, and all should work like before. BTW, Ghost should not have a problem with generic bootloader that is installed by default. -- Regards, Rajko -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Rajko M. schreef:
On Friday 20 March 2009 10:27:53 am Oddball wrote: ...
2) Where should grub be installed for the least trouble?
In boot sector of Linux partition, which is default. Partition must be primary and marked active, in other words bootable.
So if asked the question were to install grub, i should answer default...
After XP recovery from Ghost image, you can use recovery mode of openSUSE installation DVD to mark linux partition bootable again, if that information is lost, and all should work like before.
so i won't have to touch grub at all, only mark the partition bootable...
BTW, Ghost should not have a problem with generic bootloader that is installed by default.
What generic bootloader? Grub isn't the generic bootloader? In ghost manual explicitly explained: does not work with grub... I contacted symantec about that this afternoon in a live chat: no bootloader supported, they give me a refund for the programm, because i cannot use it with dual, triple or quadruple boot. M9. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Oddball schreef:
What generic bootloader? Grub isn't the generic bootloader?
M9.
Do you mean the windows bootloader? How to get that to work with a linux install? As windows does not see linux, how would it be able to boot it? Or you must show me a way to do so..? M9. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Oddball schreef:
Oddball schreef:
What generic bootloader? Grub isn't the generic bootloader?
M9.
Do you mean the windows bootloader? How to get that to work with a linux install? As windows does not see linux, how would it be able to boot it? Or you must show me a way to do so..?
M9.
/ found it: http://www.swerdna.net.au/linhowtoboot1.html/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On 2009/03/20 18:50 (GMT+0100) Oddball composed:
Do you mean the windows bootloader? How to get that to work with a linux install?
http://fm.no-ip.com/install-doz-after.html shows how I do it. -- "The plans of the diligent lead to profit as surely as haste leads to poverty." Proverbs 21:5 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Felix Miata schreef:
On 2009/03/20 18:50 (GMT+0100) Oddball composed:
Do you mean the windows bootloader? How to get that to work with a linux install?
http://fm.no-ip.com/install-doz-after.html shows how I do it.
and this: http://forums.opensuse.org/install-boot-login/ our own opensuse...;) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On 20-Mar-09, Oddball wrote:
Oddball schreef:
What generic bootloader? Grub isn't the generic bootloader?
M9.
Do you mean the windows bootloader? How to get that to work with a linux install? As windows does not see linux, how would it be able to boot it? Or you must show me a way to do so..?
Technically: Grub stores its own "stage 1" bootloader in the Master Boot Record (MBR, sector 0 on the disk). This then loads the "stage 2" from a fixed block, which usually is on the Linux partition (although a "stage 1.5" may come in between). The stage 2 code can load a menu from the Linux partition and display it, and then boots the system (load and start the Linux kernel, or load and start the bootloader code from a different partition, ...). For GRUB, the "location of the bootloader" that appears in YaST menus is the location of stage 2. Stage 1 is always in the MBR. Microsoft operating systems (DOS, all Windows, ...) have always used their own code in the MBR, which has not changed much over the years. This code simply loads the first block from the activated partition and runs the code in it, assuming that that is valid code from a bootloader. As the code of a variety of bootloaders can be started from the Microsoft MBR, it is sometimes called the "generic MBR". (GRUB can do the same, but needs to load its own stage 2 first.) The "generic MBR" is probably what you meant. To answer your other question: how to set up your dual/triple/... boot so that you can a) restore Windows and b) still boot when Linux is gone? There are at least two approaches: 1) As described on http://www.swerdna.net.au/linhowtoboot1.html/, you can just boot Linux from Windows, by letting Windows start the GRUB stage 1 that you transferred from the MBR to a file. With this method, you also need to restore the "generic/Microsoft MBR" and activate the Windows partition. In the text from the URL above, the MBR is "fixed" with Windows tools. Another possibility is to boot Linux (either simply boot the installed system, or start YaST from the installation DVD), then select YaST bootloader, click the "Other" button and then "Replace MBR with Generic Code". 2) Create a small Linux boot partition with YaST (25 - 100 MB), and do not delete this partition when Linux is deleted. This Linux boot partition contains everything GRUB needs (GRUB stage 2 and the GRUB menu). After Linux is gone, GRUB can still use this partition to boot Windows. I prefer this, as all I need to do is to make sure that I have a Linux boot partition. No fiddling with low-level tools or somesuch. Regards, -- Olaf Dabrunz (Olaf <at> dabrunz.com) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Dne pátek 20 Březen 2009 21:23:27 Olaf Dabrunz napsal(a):
On 20-Mar-09, Oddball wrote:
Oddball schreef:
What generic bootloader? Grub isn't the generic bootloader?
M9.
Do you mean the windows bootloader? How to get that to work with a linux install? As windows does not see linux, how would it be able to boot it? Or you must show me a way to do so..?
Technically:
Grub stores its own "stage 1" bootloader in the Master Boot Record (MBR, sector 0 on the disk). This then loads the "stage 2" from a fixed block, which usually is on the Linux partition (although a "stage 1.5" may come in between). The stage 2 code can load a menu from the Linux partition and display it, and then boots the system (load and start the Linux kernel, or load and start the bootloader code from a different partition, ...).
For GRUB, the "location of the bootloader" that appears in YaST menus is the location of stage 2. Stage 1 is always in the MBR.
This is not true. Stage 1 can be installed either to MBR or to any boot sector; it just has to be reachable by the code which resides in MBR (e.g. the MicroSoft one which is described below) or by another bootloader which chainloads GRUB's first stage. Jiri
Microsoft operating systems (DOS, all Windows, ...) have always used their own code in the MBR, which has not changed much over the years. This code simply loads the first block from the activated partition and runs the code in it, assuming that that is valid code from a bootloader.
As the code of a variety of bootloaders can be started from the Microsoft MBR, it is sometimes called the "generic MBR". (GRUB can do the same, but needs to load its own stage 2 first.)
The "generic MBR" is probably what you meant.
To answer your other question: how to set up your dual/triple/... boot so that you can a) restore Windows and b) still boot when Linux is gone?
There are at least two approaches:
1) As described on http://www.swerdna.net.au/linhowtoboot1.html/, you can just boot Linux from Windows, by letting Windows start the GRUB stage 1 that you transferred from the MBR to a file.
With this method, you also need to restore the "generic/Microsoft MBR" and activate the Windows partition. In the text from the URL above, the MBR is "fixed" with Windows tools. Another possibility is to boot Linux (either simply boot the installed system, or start YaST from the installation DVD), then select YaST bootloader, click the "Other" button and then "Replace MBR with Generic Code".
2) Create a small Linux boot partition with YaST (25 - 100 MB), and do not delete this partition when Linux is deleted.
This Linux boot partition contains everything GRUB needs (GRUB stage 2 and the GRUB menu). After Linux is gone, GRUB can still use this partition to boot Windows.
I prefer this, as all I need to do is to make sure that I have a Linux boot partition. No fiddling with low-level tools or somesuch.
Regards,
-- Olaf Dabrunz (Olaf <at> dabrunz.com)
-- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2009-03-20 at 18:30 +0100, Oddball wrote:
What generic bootloader? Grub isn't the generic bootloader? In ghost manual explicitly explained: does not work with grub... I contacted symantec about that this afternoon in a live chat: no bootloader supported, they give me a refund for the programm, because i cannot use it with dual, triple or quadruple boot.
No, grub is not a generic bootloader. A GB is one that simply looks which of the primary partitions is marked bootable, and boots that one, no questions asked, no menu, no options. The Dos/Windows partitioner installs just that, and Ghost I suppose does the same. YaST can also install one. Ghost is compatible, it just doesn't know about grub. You have to handle that part manually. The trick is to install grub in any primary partition; the one that contains /boot, mark that "bootable", and unmark the windows partition. Ie, only one is marked bootable; /boot can be either a separate partition or a directory inside /. Thus, the GB sees a partition (only one) marked bootable, loads the boot code, and boots that - and it happens to be grub. Grub starts, presents the menu, and you choose what OS to boot. How to disable grub? Simply mark the windows partition as bootable, and unmark the linux one. What happens if windows disables grub? Then redo the partition marks, using any partitioner tool you can use. Ie, mark linux as bootable. How to uninstall grub? As this usually means you do not want linux, simply format its partition (and mark windows as bootable). Or, install another bootloader on top (like lilo). - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknEJTMACgkQtTMYHG2NR9XWUACfZ4rXPLI3Kds+0P0luTJNeL69 L+cAoJer2U7UR0BsHihgU1MITwmKE1wZ =XgWi -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Friday 20 March 2009 12:30:06 pm Oddball wrote:
Rajko M. schreef:
On Friday 20 March 2009 10:27:53 am Oddball wrote: ...
2) Where should grub be installed for the least trouble?
In boot sector of Linux partition, which is default. Partition must be primary and marked active, in other words bootable.
So if asked the question were to install grub, i should answer default...
If asked, but default configuration doesn't ask anything.
After XP recovery from Ghost image, you can use recovery mode of openSUSE installation DVD to mark linux partition bootable again, if that information is lost, and all should work like before.
so i won't have to touch grub at all, only mark the partition bootable...
If recreation of Windows changed anything. I remember some 2 years ago recreating windows didn't change partitioning, like it was regular case some 5-6 years ago, when ghost image would cleanup whole disk.
BTW, Ghost should not have a problem with generic bootloader that is installed by default.
What generic bootloader? Grub isn't the generic bootloader?
You already have answers on that. Here is just sample in my MBR. I guess it is from FreeDOS, installed by YaST Bootloader. When you install openSUSE it will be installed in MBR, if don't change anything in Bootloader section of Installation Proposal. # dd if=/dev/sda of=mbrcode bs=512 count=1 # hexdump -C mbrcode 00000000 31 c0 8e d0 bc 00 7c 8e c0 8e d8 bf 1e 06 be 1e |1.....|.........| ...<skipped> 000000b0 7c 00 00 00 00 00 00 00 00 00 00 45 72 72 6f 72 ||..........Error| 000000c0 20 00 0d 0a 00 4e 6f 20 61 63 74 69 76 65 20 70 | ....No active p| 000000d0 61 72 74 69 74 69 6f 6e 00 44 69 73 6b 20 72 65 |artition.Disk re| 000000e0 61 64 20 65 72 72 6f 72 00 4e 6f 20 6f 70 65 72 |ad error.No oper| 000000f0 61 74 69 6e 67 20 73 79 73 74 65 6d 00 49 6e 76 |ating system.Inv| 00000100 61 6c 69 64 20 43 48 53 20 72 65 61 64 00 e8 03 |alid CHS read...| ...<skipped> GRUB boot record code will mention GRUB in strings. I don't have sample. Difference, when you use comand 'dd', is between /dev/sda that will give you MBR (master boot record) and /dev/sda1 that will give you partition boot record of first partition, and so on.
In ghost manual explicitly explained: does not work with grub... I contacted symantec about that this afternoon in a live chat: no bootloader supported, they give me a refund for the programm, because i cannot use it with dual, triple or quadruple boot.
I guess the current schema is the most compatible with different tools available on the market. It gives sometimes strange result that you have to hop trough 2 boot screens, but it is using whatever is in boot records, which is usually native boot loader, so you can boot whatever is installed (have you tried BSDs). -- Regards, Rajko -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Dne sobota 21 Březen 2009 01:12:25 Rajko M. napsal(a):
On Friday 20 March 2009 12:30:06 pm Oddball wrote:
Rajko M. schreef:
On Friday 20 March 2009 10:27:53 am Oddball wrote: ...
2) Where should grub be installed for the least trouble?
In boot sector of Linux partition, which is default. Partition must be primary and marked active, in other words bootable.
So if asked the question were to install grub, i should answer default...
If asked, but default configuration doesn't ask anything.
You can enter the bootloader configuration from the installation proposal and set where to install GRUB. The suggested one is the boot sector of the partition holding the /boot directory (which should be a primary partition and unless GRUB is chainloaded by another bootloader, it should be active and MBR should contain the generic code (e.g. the one normally shipped with Windows) which loads boot sector of the active partition. Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Monday 30 March 2009 06:12:09 am Jiri Srain wrote:
Dne sobota 21 Březen 2009 01:12:25 Rajko M. napsal(a):
On Friday 20 March 2009 12:30:06 pm Oddball wrote: ...
So if asked the question were to install grub, i should answer default...
If asked, but default configuration doesn't ask anything.
You can enter the bootloader configuration from the installation proposal and set where to install GRUB.
That is what Odball was doing, and that made a problem.
The suggested one is the boot sector of the partition holding the /boot directory (which should be a primary partition and unless GRUB is chainloaded by another bootloader, it should be active and MBR should contain the generic code (e.g. the one normally shipped with Windows) which loads boot sector of the active partition.
Jiri
Suggested is default included in proposal, so he has nothing to do, just press Next. -- Regards, Rajko -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (6)
-
Carlos E. R.
-
Felix Miata
-
Jiri Srain
-
Oddball
-
Olaf Dabrunz
-
Rajko M.