Mailinglist Archive: opensuse (3572 mails)
| < Previous | Next > |
Re: [opensuse] /boot and grub with several systems ?
- From: Berthold Gunreben <bg@xxxxxxx>
- Date: Fri, 22 Feb 2008 12:35:21 +0100 (CET)
- Message-id: <Pine.LNX.4.64.0802221214510.633@xxxxxxxxxxxx>
On Fri, 15 Feb 2008, M9. wrote:
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@xxxxxxx 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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
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@xxxxxxx 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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |