Author Topic: MBR and new kernels for other distros  (Read 1311 times)

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 399
MBR and new kernels for other distros
« on: March 29, 2012, 07:10:18 AM »
Hi friends,

my main distro is PCLOS, but time ago I did some partitions and installed CB#! and Lubntu.

Some times I run this distros, only for fun, but when I restore MRB after an update it doesn't add the new kernels for this distros.

How can I solve it?

Thanks.
   

Offline monsee

  • Full Member
  • ***
  • Posts: 110
Re: MBR and new kernels for other distros
« Reply #1 on: March 29, 2012, 10:59:51 AM »
Can you tell us in which Partition are your Lubuntu and your CB# (I don't know CB# at all... Maybe it's CrunchBang?)
Are the Logical partition, maybe?

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: MBR and new kernels for other distros
« Reply #2 on: March 29, 2012, 11:03:38 AM »
Quote
when I restore MRB after an update

I do not understand what you mean by this.

Update which distro?

Why restore the MBR?
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4037
Re: MBR and new kernels for other distros
« Reply #3 on: March 29, 2012, 01:14:30 PM »
Those other distros look as if they might use grub2. In that case they can't be booted directly from the same menu as pclos, which uses 'legacy grub'. You will need to install either legacy grub on the MBR using the /boot/grub/menu.lst from pclos, or the grub2 using a configuration file from one of the others.

You will then have to install the other version of grub on the partition(s) of the distro that uses it and chain-load it.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: MBR and new kernels for other distros
« Reply #4 on: March 29, 2012, 01:53:50 PM »
Those other distros look as if they might use grub2. In that case they can't be booted directly from the same menu as pclos, which uses 'legacy grub'. You will need to install either legacy grub on the MBR using the /boot/grub/menu.lst from pclos, or the grub2 using a configuration file from one of the others.

You will then have to install the other version of grub on the partition(s) of the distro that uses it and chain-load it.


Actually, they can be booted directly from the PCLinuxOS menu.lst, they just need a boot stanza copied from the grub2 config file, with the (hdN,n) edited to use the legacy grub counting method.

The alternative is a boot stanza like this;

title *buntu
root (hdN,n)
kernel /boot/grub/core.img


Replace the N with the drive number, and n with the partition number, as legacy grub sees it, both start counting at 0.
« Last Edit: March 29, 2012, 01:55:31 PM by Old-Polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 399
Re: MBR and new kernels for other distros
« Reply #5 on: March 29, 2012, 02:35:25 PM »
Quote
when I restore MRB after an update

I do not understand what you mean by this.

Update which distro?

Why restore the MBR?

I can boot Crunchbang and Lubuntu perfectly from the PCLOS Grub. I restore the MBR hoping find the new kernels in Lubuntu and CB, but always boot the oldest.
   

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 399
Re: MBR and new kernels for other distros
« Reply #6 on: March 29, 2012, 02:48:37 PM »
Quote
Can you tell us in which Partition are your Lubuntu and your CB# (I don't know CB# at all... Maybe it's CrunchBang?)

Crunchbang (hd0,6)
Lubuntu (hdo,7)

Quote
Are the Logical partition, maybe?

I don't know, maybe.
   

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: MBR and new kernels for other distros
« Reply #7 on: March 29, 2012, 02:51:24 PM »
Quote
when I restore MRB after an update

I do not understand what you mean by this.

Update which distro?

Why restore the MBR?

I can boot Crunchbang and Lubuntu perfectly from the PCLOS Grub. I restore the MBR hoping find the new kernels in Lubuntu and CB, but always boot the oldest.

The information you require should be contained in the distros grub config file on the distros partition.
With that info you should be able to edit the boot/grub/menu.lst file in PCLOS to boot the distro with the new kernels.
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 399
Re: MBR and new kernels for other distros
« Reply #8 on: March 29, 2012, 02:54:42 PM »
This is the menu.lst

Code: [Select]
timeout 7
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=a8bb12dc-64d4-456e-91e4-008c5fd7073f quiet vmalloc=256M acpi=on resume=UUID=84134108-a6e2-4a4a-8c1b-2e4fb6a4661a splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=a8bb12dc-64d4-456e-91e4-008c5fd7073f quiet vmalloc=256M acpi=on resume=UUID=84134108-a6e2-4a4a-8c1b-2e4fb6a4661a
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=a8bb12dc-64d4-456e-91e4-008c5fd7073f quiet failsafe vmalloc=256M acpi=on
initrd (hd0,0)/boot/initrd.img

title Debian GNU/Linux (6.0.4) (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-3.2.0-0.bpo.1-686-pae root=/dev/sda7
initrd /boot/initrd.img-3.2.0-0.bpo.1-686-pae
savedefault
boot


title Ubuntu 11.10 (11.10) (on /dev/sda8)
root (hd0,7)
kernel /boot/vmlinuz-3.0.0-12-generic root=/dev/sda8
initrd /boot/initrd.img-3.0.0-12-generic
savedefault
boot


Should I edit it and change the old kernel for the new one?
   

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: MBR and new kernels for other distros
« Reply #9 on: March 29, 2012, 03:21:12 PM »
This is the menu.lst

Code: [Select]
timeout 7
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=a8bb12dc-64d4-456e-91e4-008c5fd7073f quiet vmalloc=256M acpi=on resume=UUID=84134108-a6e2-4a4a-8c1b-2e4fb6a4661a splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=a8bb12dc-64d4-456e-91e4-008c5fd7073f quiet vmalloc=256M acpi=on resume=UUID=84134108-a6e2-4a4a-8c1b-2e4fb6a4661a
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=a8bb12dc-64d4-456e-91e4-008c5fd7073f quiet failsafe vmalloc=256M acpi=on
initrd (hd0,0)/boot/initrd.img

title Debian GNU/Linux (6.0.4) (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-3.2.0-0.bpo.1-686-pae root=/dev/sda7
initrd /boot/initrd.img-3.2.0-0.bpo.1-686-pae
savedefault
boot


title another distro alot (alot) (on /dev/sda8)
root (hd0,7)
kernel /boot/vmlinuz-3.0.0-12-generic root=/dev/sda8
initrd /boot/initrd.img-3.0.0-12-generic
savedefault
boot


Should I edit it and change the old kernel for the new one?

I would suggest you duplicate the entry and edit the duplicate to show the new kernel (vmlinuz & initrd) .....  you can then test your entry without destroying anything.

You need to edit that menu.lst file as root.

« Last Edit: March 29, 2012, 03:23:07 PM by Just18 »
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 399
Re: MBR and new kernels for other distros
« Reply #10 on: March 30, 2012, 07:17:23 AM »
Quote
I would suggest you duplicate the entry and edit the duplicate to show the new kernel (vmlinuz & initrd) .....  you can then test your entry without destroying anything.

Hi Just18,

I did and work fine! Thanks!


Two questions:

- Why PCLOS don't recognized the new kernels automatically?
- Have I to add the new kernels every time the others distros update them?

   

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: MBR and new kernels for other distros
« Reply #11 on: March 30, 2012, 07:23:36 AM »
Quote
I would suggest you duplicate the entry and edit the duplicate to show the new kernel (vmlinuz & initrd) .....  you can then test your entry without destroying anything.

Hi Just18,

I did and work fine! Thanks!

Good, glad to hear it  :D

Quote
Two questions:

- Why PCLOS don't recognized the new kernels automatically?

Because it does not check for other distro except when being installed.

I suspect that using 'redo-mbr'  in PCLinuxOS might pick up the extra entries in the other distros ....  but I don't have need to use that utility and don't have any other (Grub2) distros installed here, so cannot confirm.


Quote
- Have I to add the new kernels every time the others distros update them?

I would ......  but as above maybe the utility would do it too ....  I don't know  ;)
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Aleph

  • Sr. Member
  • ****
  • Posts: 399
Re: MBR and new kernels for other distros
« Reply #12 on: March 31, 2012, 02:27:31 AM »
Quote
I suspect that using 'redo-mbr'  in PCLinuxOS might pick up the extra entries in the other distros

What is 'redo-mbr'? I did 'restore mbr' but doesn't work for find new kernels in other distros...
   

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: MBR and new kernels for other distros
« Reply #13 on: March 31, 2012, 03:05:10 AM »
"restore-mbr" .......  apparently, according to Synaptic, this is the gnome version of  "redo-mbr"

An alternative method is to install Grub from each of the other distro to the boot sector of that distro's partition, and use a chainloader entry in PCLOS Grub to call each distro's full Grub entry.

In that way any change in the other distro's Grub configuration file will be available automatically.

The negative side of that is the selection is a two stage process ......  first to select the distro, and the second to select which boot entry to use for that distro.
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline longtom

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3339
  • Satellite Station Africa
Re: MBR and new kernels for other distros
« Reply #14 on: March 31, 2012, 03:15:08 AM »
Where is that post from O-P where he explains very nicely, in some detail and colourful how to get grub into the MBR forever and how to use it without having all this trouble ....

trotting off in search of ....
Regards longtom

PCLinuxOS KDE 32bit
Intel Core 2 Duo E2200 / 2.2 GHz
2GB Ram
Nvidia GT610