[opensuse] /boot and grub with several systems ?
Hi, I'd like to know how I can have a single /boot partition and just one grub to start OpenSUSE X and X-1, ubuntu and Win2000. OpenSUSE X would be the current release and OpenSUSE X-1 the one I used before. Usually I keep the last version when I updrade so I can look stuff up and have a working rescue system. Ubuntu would be to test their server release. Those 3 should share a /boot partition. Then Win2k for some work related applications. For now I've got a SUSE grub starting that can launch windows and fork to another grub in the ubuntu-partition. This wasn't actually planned but happend while installing this and that over time. It's just messed up. I'd not so much want to repair the current mess but like to do it right in the future. regards... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Andreas a écrit :
Those 3 should share a /boot partition.
ot a good idea, each distro may have it's own kernel and so ust have it's own /boot however you can have only one grub acces, only chose the more permanent one beware the default install usually overwrite the MBR jdd -- http://www.dodin.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 15 Feb 2008, Andreas wrote:
I'd like to know how I can have a single /boot partition and just one grub to start OpenSUSE X and X-1, ubuntu and Win2000.
OpenSUSE X would be the current release and OpenSUSE X-1 the one I used before. Usually I keep the last version when I updrade so I can look stuff up and have a working rescue system. Ubuntu would be to test their server release.
Those 3 should share a /boot partition.
I'd propose a different layout. Just create an extra partition for a primary bootloader with something like 100MB. Boot that bootloader from MBR and enter several chainloaders into menu.list that boot the respective systems root partitions. Any system should have its own bootloader installed into the root partition. For Win, it is just a chainloader anyways. This procedure has the advantage, that you still can update the kernel of each respective linux version without touching the primary grub bootloader. ------------ |primary | --------- |bootloader|----------|Windows| ----------- | --------- | | ------------ |----|Bootloader| | |X0 | | ------------ | | ------------ |----|Bootloader| | |X1 | | ------------ | | ------------ |----|Bootloader| | |ubuntu | | ------------ ...... You would have to go through two different bootloaders at boot time, but this is much easier than updating the kernel for different distributions in a single partition (especially if those may use different device names like sda and hda for the same disks). Berthold -- ------------------------------------------------------------------ Berthold Gunreben SUSE Linux GmbH -- Dokumentation mailto:bg@suse.de Maxfeldstr. 5 http://www.suse.de/ D-90409 Nuernberg, Germany SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Berthold Gunreben schreef: | I'd propose a different layout. Just create an extra partition for a | primary bootloader with something like 100MB. Boot that bootloader | from MBR and enter several chainloaders into menu.list that boot the | respective systems root partitions. | | Any system should have its own bootloader installed into the root | partition. For Win, it is just a chainloader anyways. This looks as a very good solution to me also... As i am suffering from the everlasting problem, that grub entries dissappear, every once and a while.... | | This procedure has the advantage, that you still can update the kernel | of each respective linux version without touching the primary grub | bootloader. | | ------------ | |primary | --------- | |bootloader|----------|Windows| | ----------- | --------- | | | | ------------ | |----|Bootloader| | | |X0 | | | ------------ | | | | ------------ | |----|Bootloader| | | |X1 | | | ------------ | | | | ------------ | |----|Bootloader| | | |ubuntu | | | ------------ | ...... | | You would have to go through two different bootloaders at boot time, | but this is much easier than updating the kernel for different | distributions in a single partition (especially if those may use | different device names like sda and hda for the same disks). Two bootloaders would not be a problem for me, but what when one installs a new os? It just starts booting the DVD or CD, and afterwards you create another entry in that 'masterbootloader? Now i have a seperate /boot, about 153MB, carrying all kernels and stuff... But than, if i understand your suggestion correctly, the /boot, stays in / of every seperate OS. While this allready present partition could be used to host a 'Master' bootloader? | | Berthold - -- Have a nice day, M9. Now, is the only time that exists. ~ OS: Linux 2.6.22.17-0.1-default x86_64 ~ Huidige gebruiker: monkey9@AMD64x2-sfn1 ~ Systeem: openSUSE 10.3 (x86_64) ~ KDE: 3.5.7 "release 72.6" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHtarrX5/X5X6LpDgRAv64AKCn+aQpdbXn8AHi5asBTjK7V1H5QwCffihX 69w+Vaci+/MX12qkgO4Y+QE= =/Gcv -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2008/02/15 16:08 (GMT+0100) M9. apparently typed:
Berthold Gunreben schreef:
| I'd propose a different layout. Just create an extra partition for a | primary bootloader with something like 100MB. Boot that bootloader | from MBR and enter several chainloaders into menu.list that boot the | respective systems root partitions.
| Any system should have its own bootloader installed into the root | partition. For Win, it is just a chainloader anyways.
This looks as a very good solution to me also... As i am suffering from the everlasting problem, that grub entries dissappear, every once and a while....
| This procedure has the advantage, that you still can update the kernel | of each respective linux version without touching the primary grub | bootloader.
| ------------ | |primary | --------- | |bootloader|----------|Windows| | ----------- | --------- | | | | ------------ | |----|Bootloader| | | |X0 | | | ------------ | | | | ------------ | |----|Bootloader| | | |X1 | | | ------------ | | | | ------------ | |----|Bootloader| | | |ubuntu | | | ------------ | ......
| You would have to go through two different bootloaders at boot time, | but this is much easier than updating the kernel for different | distributions in a single partition (especially if those may use | different device names like sda and hda for the same disks).
Two bootloaders would not be a problem for me, but what when one installs a new os? It just starts booting the DVD or CD, and afterwards you create another entry in that 'masterbootloader?
Why wait? Use an existing installation to create and format the target partition, update the master boot loader with a chainloader entry to the new target, then do the installation.
Now i have a seperate /boot, about 153MB, carrying all kernels and stuff... But than, if i understand your suggestion correctly, the /boot, stays in / of every seperate OS. While this allready present partition could be used to host a 'Master' bootloader?
Sure. On a new system, install normally, except create a separate partition for /boot. Once installation is complete, edit /etc/fstab so that the original /boot partition is mounted somewhere else, or not mounted at all. Afterwards, reinstall first grub to the root partition's /boot directory, then reinstall kernel or copy old /boot partition kernel/initrd contents to new /boot. From then on, the only changes to the original /boot are changes you make manually - no changes from installers or kernel rpms - and no way for your Grub boot manager to get screwed up except by you doing it yourself. The net result is little different from installing some other boot manager on its own partition. For protection against having a windoz reinstallation mess up your boot loader, make the original /boot a primary, set it active, and install grub on it and not on the MBR. Grub will continue to work without any fancy reinstallation just by resetting its partition active after doz has done its dirty work, something you can do with any number of simple tools, including doz's FDISK. Only 2 bits in the MBR sector need changing to switch active partitions from doz's to grub's. See also: http://en.opensuse.org/Bugs/grub -- "For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life." John 3:16 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://mrmazda.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Felix Miata schreef: | On 2008/02/15 16:08 (GMT+0100) M9. apparently typed: | |> Two bootloaders would not be a problem for me, but what when one |> installs a new os? |> It just starts booting the DVD or CD, and afterwards you create another |> entry in that 'masterbootloader? | | Why wait? Use an existing installation to create and format the target partition, update the master boot loader with a chainloader entry to the new target, then do the installation. | |> Now i have a seperate /boot, about 153MB, carrying all kernels and stuff... |> But than, if i understand your suggestion correctly, the /boot, stays in |> / of every seperate OS. |> While this allready present partition could be used to host a 'Master' |> bootloader? | | Sure. On a new system, install normally, except create a separate partition for /boot. Once installation is complete, edit /etc/fstab so that the original /boot partition is mounted somewhere else, or not mounted at all. Afterwards, reinstall first grub to the root partition's /boot directory, then reinstall kernel or copy old /boot partition kernel/initrd contents to new /boot. From then on, the only changes to the original /boot are changes you make manually - no changes from installers or | kernel rpms - and no way for your Grub boot manager to get screwed up except by you doing it yourself. The net result is little different from installing some other boot manager on its own partition. | | For protection against having a windoz reinstallation mess up your boot loader, make the original /boot a primary, set it active, and install grub on it and not on the MBR. Grub will continue to work without any fancy reinstallation just by resetting its partition active after doz has done its dirty work, something you can do with any number of simple tools, including doz's FDISK. Only 2 bits in the MBR sector need changing to switch active partitions from doz's to grub's. | | See also: http://en.opensuse.org/Bugs/grub Sorry, for the late response, i missed the post... - -- Have a nice day, M9. Now, is the only time that exists. ~ Besturingssysteem: Linux 2.6.22.17-0.1-default x86_64 ~ Current user: monkey9@AMD64x2-sfn1 ~ System: openSUSE 10.3 (x86_64) ~ KDE: 4.0.1 (KDE 4.0.1) "release 9.1" ~ OS: Linux 2.6.22.17-0.1-default x86_64 ~ Huidige gebruiker: monkey9@AMD64x2-sfn1 ~ Systeem: openSUSE 10.3 (x86_64) ~ KDE: 3.5.7 "release 72.6" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHvrbmX5/X5X6LpDgRAnEDAJwIGhiFSiUcmCT494OJ2cG5JKRU3QCgvg2W lYm41Gj0hbn2F7U6qEGOm3Q= =xipJ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 15 Feb 2008, M9. wrote:
Two bootloaders would not be a problem for me, but what when one installs a new os? It just starts booting the DVD or CD, and afterwards you create another entry in that 'masterbootloader?
Now i have a seperate /boot, about 153MB, carrying all kernels and stuff... But than, if i understand your suggestion correctly, the /boot, stays in / of every seperate OS. While this allready present partition could be used to host a 'Master' bootloader?
I don't know an automatic method to set this up. What I did was just the same as you did, creating an extra boot partition. You can go on from there like this: ******* WARNING ******* You should just expect that you will run into problems. I also do this explanation right from memory without testing (although last time I did this, it just worked). If your system does not boot, you still can use a rescue system to fix things. Also note that you MUST change all the (hd?,?) entries according to your system. *********************** 1. unmount /boot 2. mount /<boot partition> /mnt 3. edit /etc/fstab and remove the line with /boot (or comment it) 4. cp -a /mnt/* /boot 5. edit /etc/grub.conf and modify it in a way that it is installed into your root partition. For example, if your root partition is the second partition on the first harddisk, this would look like this: ---- setup --stage2=/boot/grub/stage2 (hd0,1) (hd0,1) quit ---- The first (hd0,1) is the pointer where to write the boot loader. 6. edit /boot/grub/menu.lst and add /boot at the beginning of all initrd and vmlinuz lines. For example, change kernel /vmlinuz-2.6.18.8-0.9-default ..... to kernel /boot/vmlinuz-2.6.18.8-0.9-default Also change the path to your gfxmenu (something like gfxmenu (hd0,0)/message to gfxmenu (hd0,1)/boot/message 7. run grub --batch < /etc/grub.conf 8. look at the output! Check that no real problem occured. 9. edit /mnt/grub/menu.lst and change the entries into something like title openSUSE 10.2 rootnoverify (hd0,0) chainloader (hd0,1)+1 10. remove all unnecessary files in your master grub. These are all like /mnt/vmlinu* /mnt/initrd* /mnt/config* /mnt/sym* . You must keep /mnt/message and /mnt/grub, and I also like to keep /mnt/backup_mbr 11. umount /mnt 12. reboot and hope :) 13. For the advanced user: You also might want to add again a kernel and a rescue system to the master grub partition. In that case, you still have a rescue system if no other partition is bootable anymore. If I find time, I will also add this to the wiki, or maybe if someone could just try and fix the problems before this goes to the wiki :). Berthold -- ------------------------------------------------------------------ Berthold Gunreben SUSE Linux GmbH -- Dokumentation mailto:bg@suse.de Maxfeldstr. 5 http://www.suse.de/ D-90409 Nuernberg, Germany SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Berthold Gunreben schreef: | On Fri, 15 Feb 2008, M9. wrote: | |> Two bootloaders would not be a problem for me, but what when one |> installs a new os? |> It just starts booting the DVD or CD, and afterwards you create another |> entry in that 'masterbootloader? |> |> Now i have a seperate /boot, about 153MB, carrying all kernels and stuff... |> But than, if i understand your suggestion correctly, the /boot, stays in |> / of every seperate OS. |> While this allready present partition could be used to host a 'Master' |> bootloader? | | I don't know an automatic method to set this up. What I did was just | the same as you did, creating an extra boot partition. You can go on | from there like this: | | ******* WARNING ******* | You should just expect that you will run into problems. I also do this | explanation right from memory without testing (although last time I | did this, it just worked). If your system does not boot, you still can | use a rescue system to fix things. Also note that you MUST change all | the (hd?,?) entries according to your system. | *********************** | | | 1. unmount /boot | 2. mount /<boot partition> /mnt | 3. edit /etc/fstab and remove the line with /boot (or comment it) | 4. cp -a /mnt/* /boot | 5. edit /etc/grub.conf and modify it in a way that it is installed | into your root partition. For example, if your root partition is the | second partition on the first harddisk, this would look like this: | ---- | setup --stage2=/boot/grub/stage2 (hd0,1) (hd0,1) | quit | ---- | The first (hd0,1) is the pointer where to write the boot loader. | 6. edit /boot/grub/menu.lst and add /boot at the beginning of all | initrd and vmlinuz lines. For example, change | kernel /vmlinuz-2.6.18.8-0.9-default ..... | to | kernel /boot/vmlinuz-2.6.18.8-0.9-default | Also change the path to your gfxmenu (something like | gfxmenu (hd0,0)/message | to | gfxmenu (hd0,1)/boot/message | 7. run grub --batch < /etc/grub.conf | 8. look at the output! Check that no real problem occured. | 9. edit /mnt/grub/menu.lst and change the entries into something like | title openSUSE 10.2 | rootnoverify (hd0,0) | chainloader (hd0,1)+1 | 10. remove all unnecessary files in your master grub. These are all | like /mnt/vmlinu* /mnt/initrd* /mnt/config* /mnt/sym* . You must keep | /mnt/message and /mnt/grub, and I also like to keep /mnt/backup_mbr | 11. umount /mnt | 12. reboot and hope :) | | 13. For the advanced user: You also might want to add again a kernel | and a rescue system to the master grub partition. In that case, you | still have a rescue system if no other partition is bootable anymore. | | If I find time, I will also add this to the wiki, or maybe if someone | could just try and fix the problems before this goes to the wiki :). | | Berthold Thnx for the reply, seems sane enough to work. I will try to do this, because i want to get rid of overwritten grubentries for once and for all. I do not know if i make it today.... | | | -- | ------------------------------------------------------------------ | Berthold Gunreben SUSE Linux GmbH -- Dokumentation | mailto:bg@suse.de Maxfeldstr. 5 | http://www.suse.de/ D-90409 Nuernberg, Germany | SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) - -- Have a nice day, M9. Now, is the only time that exists. ~ Besturingssysteem: Linux 2.6.22.17-0.1-default x86_64 ~ Current user: monkey9@AMD64x2-sfn1 ~ System: openSUSE 10.3 (x86_64) ~ KDE: 4.0.1 (KDE 4.0.1) "release 9.1" ~ OS: Linux 2.6.22.17-0.1-default x86_64 ~ Huidige gebruiker: monkey9@AMD64x2-sfn1 ~ Systeem: openSUSE 10.3 (x86_64) ~ KDE: 3.5.7 "release 72.6" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHvre4X5/X5X6LpDgRAj8qAJ964oPy5MaN8b4siubYo1y1ZjbHewCcCMtw ZcmaOsR0TsWNUB7ZmG41ygY= =RnZV -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Andreas
-
Berthold Gunreben
-
Felix Miata
-
jdd
-
M9.