why does a new installation have to overwrite my bootloader?

Message
Author
User avatar
Buck Fankers
Posts: 744
Joined: Sat Mar 10, 2018 9:06 pm

Re: why does a new installation have to overwrite my bootloader?

#11 Post by Buck Fankers »

asqwerth wrote: Thu Feb 28, 2019 2:16 pm On your grub menu screen, this will appear below the normal grub entries generated by Manjaro. Whether you update-grub or not, this will appear and will point to the MX root partition where you installed MX's bootloader/grub.
OK, that is simple enough, I will do this, thank you again!

User avatar
fehlix
Developer
Posts: 10378
Joined: Wed Apr 11, 2018 5:09 pm

Re: why does a new installation have to overwrite my bootloader?

#12 Post by fehlix »

Buck Fankers wrote: Thu Feb 28, 2019 1:47 pm May I do a quick ninja question please :happy:
On BIOS-legacy-boot computer I have Manjaro. I will add another SSD and I will install MX on it, which will be my main computer but I will keep Manjaro (sda) as backup plan :-) I've already learned it is still the same as in the past and it is better to just have Manjaro's boot loader in charge.

My question is, what is the most beginner friendly & headache free way of installing MX to run dual boot, do I:
1 - simple skip installing (MX) boot altogether and after MX install, I pick up MX through Manjaro's grub update?
2 - or should I put grub on second SSD (sdb) where MX will be? If so, I'm assuming it should go to root partition.

If I understand correctly, either I go with 1 or 2, I end up with logging into Manjaro first and update grub, to be able to see and load MX, correct?
Hope to preovide a simple and quick anwser:
Do install MX Linux and do select MBR for Grub installation. The Manjaro entries with the Grub menu do not working yet, as current Grub version available in Debian cannot cope with arch/manjaro special of a separate intel microcode-file .
I would now add a menu entry for chainloading manjaro Grub menu.
Best show me this command output:

Code: Select all

lsblk -f
For BIOS-boot mode I would add this Manjaro - Boot entry to the file /boot/grub/custom.cfg
within the MX Linux install:
( Note: You need to replace MANRARO_UUID and MANJARO_ROOT below accorfing
the output of "lsblk -l"):

Code: Select all

# ----------------------------------
# Manjaro boot entry 
# manually made by fehlix for "Buck Fankers"
# save as / or append to /boot/grub/custom.cfg
# ----------------------------------
menuentry 'GRUB Menu: Manjaro Linux' {
  set MANRARO_UUID='XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXX'
  set MANJARO_ROOT='hdX,msdosX'

  insmod part_msdos
  insmod ext2
  set keep_my_root="$root"
  set mroot=($MANJARO_ROOT)
  set muuid="$MANRARO_UUID"
  set root=($mroot)
  
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios="$mroot"  $muuid
  else
    search --no-floppy --fs-uuid --set=root $muuid
  fi
  if [ -f /boot/grub/i386-pc/core.img ]; then
    set OS_boot_config='/boot/grub/grub.cfg'
    multiboot /boot/grub/i386-pc/core.img
  elif [ -f /boot/grub/grub.cfg ]; then
    configfile /boot/grub/grub.cfg
    set root=($keep_my_root)
    set prefix=($root)/boot/grub
  fi

}
# ----------------------------------
To automatically ignore the wrongly generated menu entries for manajro,
you can either disable to show any menu entry for any other OS's by
disabling other_os scanning completely or disable only for manjaro.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Buck Fankers
Posts: 744
Joined: Sat Mar 10, 2018 9:06 pm

Re: why does a new installation have to overwrite my bootloader?

#13 Post by Buck Fankers »

fehlix wrote: Thu Feb 28, 2019 2:50 pm Do install MX Linux and do select MBR for Grub installation. The Manjaro entries with the Grub menu do not working yet, as current Grub version available in Debian cannot cope with arch/manjaro special of a separate intel microcode-file .
Just to clarify, you suggest during MX install to install Grub (or grubloader or whatever it is called :-) ) to Manjaro's MBR, correct? (to sda)
fehlix wrote: Thu Feb 28, 2019 2:50 pm I would now add a menu entry for chainloading manjaro Grub menu.
OK, I understand this part, per your past info, /boot/grub/custom.cfg is safe custom boot entry, that in case of some error in it, is being ignored, hence will not affect the booting, I like this ;-)
fehlix wrote: Thu Feb 28, 2019 2:50 pm Best show me this command output:

Code: Select all

lsblk -f
Up, forgot I have also a spinner (sdb) for data in that computer, so MX will go to third disk, (sdc) not installed yet.
Also, I need to reinstall Manjaro, some things are not working as they should, and at my first, initial install, I created boot partition not understanding I didn't need it for bios/legacy install:

Code: Select all

NAME   FSTYPE LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                      
├─sda1 ext4   /      09eb7cb0-283e-441b-a37c-fad70a138bff     22G    56% /
├─sda2 ext2   /boot  e2a3d174-8569-4e7a-b890-09264742b5d4  814.3M    14% /boot
└─sda3 ext4   /home  4e7fc4b2-2dc5-474f-8ffa-6f56f32bb3a9   97.9G    29% /home
sdb                                                                      
├─sdb1 ext4   backup 7ae4cabb-8e46-409c-bd3c-e04aa424a1fc  826.9G    33% /media/backup
└─sdb2 vfat   FAT    A026-F23D                             490.7G     1% /media/fat

User avatar
fehlix
Developer
Posts: 10378
Joined: Wed Apr 11, 2018 5:09 pm

Re: why does a new installation have to overwrite my bootloader?

#14 Post by fehlix »

Buck Fankers wrote: Thu Feb 28, 2019 3:36 pm
fehlix wrote: Thu Feb 28, 2019 2:50 pm Do install MX Linux and do select MBR for Grub installation. The Manjaro entries with the Grub menu do not working yet, as current Grub version available in Debian cannot cope with arch/manjaro special of a separate intel microcode-file .
Just to clarify, you suggest during MX install to install Grub (or grubloader or whatever it is called :-) ) to Manjaro's MBR, correct? (to sda)
Well, you need not to reinstall your existing MX Linux. Just "grub-install" from within running MX Linux
and select the target MBR of the Drive you boot from. If that's the currently /dev/sda then,
simple run from the commadn line this:

Code: Select all

sudo grub-install /dev/sda
Or choose MX Boot repair, to reinstall grub into MBR of /dev/sda.
Buck Fankers wrote: Thu Feb 28, 2019 3:36 pm Up, forgot I have also a spinner (sdb) for data in that computer, so MX will go to third disk, (sdc) not installed yet.
Also, I need to reinstall Manjaro, some things are not working as they should, and at my first, initial install, I created boot partition not understanding I didn't need it for bios/legacy install:

Code: Select all

NAME   FSTYPE LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                      
├─sda1 ext4   /      09eb7cb0-283e-441b-a37c-fad70a138bff     22G    56% /
├─sda2 ext2   /boot  e2a3d174-8569-4e7a-b890-09264742b5d4  814.3M    14% /boot
└─sda3 ext4   /home  4e7fc4b2-2dc5-474f-8ffa-6f56f32bb3a9   97.9G    29% /home
sdb                                                                      
├─sdb1 ext4   backup 7ae4cabb-8e46-409c-bd3c-e04aa424a1fc  826.9G    33% /media/backup
└─sdb2 vfat   FAT    A026-F23D                             490.7G     1% /media/fat
Right during reinstall of manjaro you might select to put manjaro's grub-loader into PBR of /dev/sda1.
Or if not possible just install into MBR of /dev/sda . Reboot got to MX Linux and re-install grub-install /dev/sda
from within MX Linux.
Manjaro's UUID of /dev/sda1 might change, so better use the UUID after the re-installation of majaro.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Buck Fankers
Posts: 744
Joined: Sat Mar 10, 2018 9:06 pm

Re: why does a new installation have to overwrite my bootloader?

#15 Post by Buck Fankers »

Ups, messed up quotes, now it should be correct
fehlix wrote: Thu Feb 28, 2019 2:50 pm To automatically ignore the wrongly generated menu entries for manajro,
you can either disable to show any menu entry for any other OS's by
disabling other_os scanning completely or disable only for manjaro.
This part, I'm not sure I even understand and I wouldn't know how to do.

Recently Manjaro introduced some boot changes, how & how much to display at boot, and this is partial reason I'm starting to steer away, Manjaro is just starting to feel too complicated to me, year ago was simpler.
Last edited by Buck Fankers on Thu Feb 28, 2019 4:00 pm, edited 1 time in total.

User avatar
Buck Fankers
Posts: 744
Joined: Sat Mar 10, 2018 9:06 pm

Re: why does a new installation have to overwrite my bootloader?

#16 Post by Buck Fankers »

fehlix wrote: Thu Feb 28, 2019 3:48 pm Well, you need not to reinstall your existing MX Linux. Just "grub-install" from within running MX Linux
and select the target MBR of the Drive you boot from. If that's the currently /dev/sda then,
simple run from the commadn line this:
Sorry to bug you so much, just so we are on the same page:

1 - right now, there is only Manjaro on it, on sda and data on sdb, there is no MX on that computer yet.
2 - next I will add new SSD (sdc) and I will install MX on it.
3 - my question is, during MX install, where do I point MX bootloader to go?
4 - when I get MX all set up I was going to reinstall Manjaro.

But now I'm wondering, would it be better to first:
a - re install Manjaro on it's ssd first
b - then install MX on it's ssd (again, same question as above, where goes bootloader from MX install?)
c - then create custom boot.cfg?

User avatar
fehlix
Developer
Posts: 10378
Joined: Wed Apr 11, 2018 5:09 pm

Re: why does a new installation have to overwrite my bootloader?

#17 Post by fehlix »

Buck Fankers wrote: Thu Feb 28, 2019 3:58 pm
fehlix wrote: Thu Feb 28, 2019 3:48 pm Well, you need not to reinstall your existing MX Linux. Just "grub-install" from within running MX Linux
and select the target MBR of the Drive you boot from. If that's the currently /dev/sda then,
simple run from the commadn line this:
Sorry to bug you so much, just so we are on the same page:

1 - right now, there is only Manjaro on it, on sda and data on sdb, there is no MX on that computer yet.
2 - next I will add new SSD (sdc) and I will install MX on it.
3 - my question is, during MX install, where do I point MX bootloader to go?
4 - when I get MX all set up I was going to reinstall Manjaro.

But now I'm wondering, would it be better to first:
a - re install Manjaro on it's ssd first
b - then install MX on it's ssd (again, same question as above, where goes bootloader from MX install?)
c - then create custom boot.cfg?
After the 2nd install to the custom.cfg to boot into the other os's.
The sequence of install's does not matter, as with the chainload custom-cfg entry you can always boot into the other os's grub loader/menu .
I do actual go even a step further and have one common/shared custom.cfg holding for all installed OS's similar entries saved with within one "data" partition.
You might after all is checked and working do also disabale os_prober to get rid of generated menu entries
by adding into /etc/default/grub this:

Code: Select all

GRUB_DISABLE_OS_PROBER=true
and regenerated the grub.cfg menu:

Code: Select all

sudo update-grub
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Buck Fankers
Posts: 744
Joined: Sat Mar 10, 2018 9:06 pm

Re: why does a new installation have to overwrite my bootloader?

#18 Post by Buck Fankers »

fehlix wrote: Thu Feb 28, 2019 4:39 pm After the 2nd install to the custom.cfg to boot into the other os's.
The sequence of install's does not matter, as with the chainload custom-cfg entry you can always boot into the other os's grub loader/menu .
I do actual go even a step further and have one common/shared custom.cfg holding for all installed OS's similar entries saved with within one "data" partition.
You might after all is checked and working do also disabale os_prober to get rid of generated menu entries
by adding into /etc/default/grub this:

Code: Select all

GRUB_DISABLE_OS_PROBER=true
and regenerated the grub.cfg menu:

Code: Select all

sudo update-grub
:puppy:
OK, great, thank you!

User avatar
asqwerth
Developer
Posts: 7231
Joined: Sun May 27, 2007 5:37 am

Re: why does a new installation have to overwrite my bootloader?

#19 Post by asqwerth »

fehlix wrote: Thu Feb 28, 2019 2:50 pm ...[snip]
For BIOS-boot mode I would add this Manjaro - Boot entry to the file /boot/grub/custom.cfg
within the MX Linux install:
( Note: You need to replace MANRARO_UUID and MANJARO_ROOT below accorfing
the output of "lsblk -l"):

Code: Select all

# ----------------------------------
# Manjaro boot entry 
# manually made by fehlix for "Buck Fankers"
# save as / or append to /boot/grub/custom.cfg
# ----------------------------------
menuentry 'GRUB Menu: Manjaro Linux' {
  set MANRARO_UUID='XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXX'
  set MANJARO_ROOT='hdX,msdosX'

  insmod part_msdos
  insmod ext2
  set keep_my_root="$root"
  set mroot=($MANJARO_ROOT)
  set muuid="$MANRARO_UUID"
  set root=($mroot)
  
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios="$mroot"  $muuid
  else
    search --no-floppy --fs-uuid --set=root $muuid
  fi
  if [ -f /boot/grub/i386-pc/core.img ]; then
    set OS_boot_config='/boot/grub/grub.cfg'
    multiboot /boot/grub/i386-pc/core.img
  elif [ -f /boot/grub/grub.cfg ]; then
    configfile /boot/grub/grub.cfg
    set root=($keep_my_root)
    set prefix=($root)/boot/grub
  fi

}
# ----------------------------------
...
Fehlix, I have some questions.

Regarding this part:

Code: Select all

  if [ -f /boot/grub/i386-pc/core.img ]; then
    set OS_boot_config='/boot/grub/grub.cfg'
    multiboot /boot/grub/i386-pc/core.img
What does "set OS_boot_config" do, when you are ultimately booting from /boot/grub/i386-pc/core.img?

Scripting is generally beyond me, so I don't have full understanding of all the IF-THEN-ELSE lines.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

Post Reply

Return to “General”