How to install a Linux system without affecting previous GRUB?

Installing an Ubuntu-System on a separate partition via a booted Ubu-Live-System is (usually) done with ubiquity, the installer.

The usual way to run ubiquity is to double-klick on the icon on the Live-Desktop (an XDG-Starter). But ubiquity has some cmd-line-opts, and to make use of them, you must either edit-and-save that XDG-Starter, change the line:

Exec=ubiquity -b

or run ubiquity in terminal:

ubiquity -b

Option -b means: no-boot-loader-installation

The new boot-entry in the already-there grub.cfg of the already-there-Linux should read:

menuentry "New-Ubu" {
    linux /vmlinuz
    initrd /initrd.img

=== Once you got New-Ubu started this way ===

(hd0,2 is just an example, the partition 2 on first HDD, the below lines as well), you may type in a terminal:

sudo grub-install --boot-directory=/boot/ --force /dev/sda2

the warning about embedding can be ignored

and hereafter

sudo update-grub

what should re-create /boot/grub/grub.cfg of the CURRENT running New-Ubu. Now since the New-Ubu system is bootable "itself", you can later (to boot New-Ubu again)

  • EITHER chainload (not recommended: the ignored warning above may get justified after e2fsck on the New-Ubu root-fs ),
  • OR load (the now created) configfile /boot/grub/grub.cfg of the New-Ubu-root-fs (/dev/sda2)

to do so, you must replace the above quoted menu-entry in the /boot/grub/grub.cfg of the already-there-Linux as follows:

menuentry "New-Ubu" {
    configfile (hd0,2)/boot/grub/grub.cfg

This also reflects the needed kernel-opts (KVM-gfx-mode related stuff on boot up) that are implicitly written by update-grub, and can solve problems that may occur when booting New-Ubu by the former-mentioned menu-item (what uses actually symlinks in the root-dir, with no kernel-opts ...)

P.S.: There is an issue with 32/64 Bit Variants of Linux-Releases and appropriate installed Bootloaders. It is recommended to stick 100% to either 32 or 64 Bit.

Honey is Funny! Further more, I like Bugs Bunny. wqwqwqwqwqwqwqq ;)