I have a machine that used to dual-boot Ubuntu (16.04 currently) and Windows 7, with Ubuntu's GRUB as boot loader. Now I just added Arch Linux as third OS, following the official installation instructions. I did not install GRUB from Arch because I wanted to use the one controlled by Ubuntu. The instructions contained a command mkinitcpio -p linux that probably generated some boot files which I ran as described.Now when I try to boot Ubuntu from GRUB through its default entry, I get this unpleasant error (sorry for the screen photo):As the output of uname -a shows, it's trying to boot the Arch kernel, but /dev/sda6 is the Ubuntu root partition.I have to navigate to Advanced options for Ubuntu and select one of the Ubuntu, with Linux 4.4.0-* entries to be able to load Ubuntu, I couldn't find an entry that would correctly load Arch though.Running sudo update-grub from Ubuntu (update-grub is a stub for running grub-mkconfig -o /boot/grub/grub.cfg to generate a grub2 config file.) does not change anything. The grub-customizer tool was also useless in fixing this so far.What causes this confusion of GRUB and how do I fix it so that each Linux version boots with the correct kernel and from the correct partition?It looks like I stupidly installed Arch with Ubuntu's /boot mounted, so it probably placed its boot files in there.I'm fine with erasing all the Arch related stuff to get Ubuntu's boot loader straight again and do a clean install of Arch later. Updates (thanks to @terdon for his support in the Ask Ubuntu chat):Here is my /boot/grub/grub.cfg.All Linux entries seem to point at my /dev/sda6 partition, which is Ubuntu's root:$ grep ' linux /' /boot/grub/grub.cfg    linux /vmlinuz-linux root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro        linux /vmlinuz-linux root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro        linux /vmlinuz-linux root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro        linux /vmlinuz-linux root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro init=/sbin/upstart        linux /vmlinuz-linux root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro recovery nomodeset        linux /vmlinuz-4.4.0-21-generic root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro        linux /vmlinuz-4.4.0-21-generic root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro init=/sbin/upstart        linux /vmlinuz-4.4.0-21-generic root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro recovery nomodeset        linux /vmlinuz-4.2.0-35-generic root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro        linux /vmlinuz-4.2.0-35-generic root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro init=/sbin/upstart        linux /vmlinuz-4.2.0-35-generic root=UUID=eee18451-b607-4875-8a88-c9cb6c6544c8 ro recovery nomodesetI tried to update GRUB config from Ubuntu:$ sudo grub-mkconfig -o /boot/grub/grub.cfg Generating grub configuration file ...dpkg: warning: version 'linux' has bad syntax: version number does not start with a digitFound linux image: /boot/vmlinuz-linuxFound initrd image: /boot/initramfs-linux.imgFound linux image: /boot/vmlinuz-4.4.0-21-genericFound initrd image: /boot/initrd.img-4.4.0-21-genericFound linux image: /boot/vmlinuz-4.2.0-35-genericFound initrd image: /boot/initrd.img-4.2.0-35-genericFound memtest86+ image: /memtest86+.elfFound memtest86+ image: /memtest86+.binFound Windows 7 (loader) on /dev/sda1Found Arch on /dev/sda8doneI tried to reinstall GRUB to the MBR from Ubuntu:$ sudo grub-install /dev/sdaInstalling for i386-pc platform.Installation finished. No error reported.$ sudo grub-install --recheck /dev/sdaInstalling for i386-pc platform.Installation finished. No error reported.Those are the installed Ubuntu kernel packages by the way, I did try to dpkg-reconfigure all of them, but without any effect on the issue:$ dpkg -l linux-image* | grep ^iiii  linux-image-4.2.0-35-generic       4.2.0-35.40  amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMPii  linux-image-4.4.0-21-generic       4.4.0-21.37  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMPii  linux-image-extra-4.2.0-35-generic 4.2.0-35.40  amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMPii  linux-image-extra-4.4.0-21-generic 4.4.0-21.37  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMPI also tried to regenerate the Ubuntu initramfs:$ sudo update-initramfs -u -k allupdate-initramfs: Generating /boot/initrd.img-4.4.0-21-genericupdate-initramfs: Generating /boot/initrd.img-4.2.0-35-genericMy partition layout:Checked from the Ubuntu system. The labels should explain themselves.$ lsblk -f /dev/sdaNAME    FSTYPE LABEL       UUID                                 MOUNTPOINTsda                                                             sda1  ntfs   win7-boot   90DCF3A5DCF3842E                     /win/bootsda2  ntfs   windows7    482C7A572C7A3FCC                     /win/csda3  ext4   grub-boot   6dbb8633-dadd-4b5e-8d85-b0895fde9dfb /bootsda5  ext4   images      81dc42c4-a161-4ccd-b704-6e5c09298943 /imagessda6  ext4   ubuntu-1604 eee18451-b607-4875-8a88-c9cb6c6544c8 /sda7  ext4   ubuntu-home 485b3ef1-7216-4053-b25c-f656d529e8e6 /homesda8  ext4   arch-root   8d281a0c-969c-44cf-ba6a-1d3c7b4be7ec sda9  ext4   arch-home   32522902-a53d-44c8-90f2-6bbf14c40f1f sda10 swap   linux-swap  8b05bd9b-bc42-46f6-8c18-50711a3c48b9 [SWAP]My GRUB menu structure:Advanced options for Ubuntu:Advanced options for Arch:My /boot directory:$ ls -la /boottotal 118480drwxr-xr-x  4 root root     4096 Apr 24 20:50 .drwxr-xr-x 28 root root     4096 Apr 24 19:44 ..-rw-r--r--  1 root root  1313029 Mr 16 01:45 abi-4.2.0-35-generic-rw-r--r--  1 root root  1239577 Apr 19 00:21 abi-4.4.0-21-generic-rw-r--r--  1 root root   184888 Mr 16 01:45 config-4.2.0-35-generic-rw-r--r--  1 root root   189412 Apr 19 00:21 config-4.4.0-21-genericdrwxr-xr-x  6 root root     4096 Apr 26 19:58 grub-rw-r--r--  1 root root 18598360 Apr 24 20:59 initramfs-linux-fallback.img-rw-r--r--  1 root root  3516429 Apr 24 20:59 initramfs-linux.img-rw-r--r--  1 root root 33642388 Apr 24 18:31 initrd.img-4.2.0-35-generic-rw-r--r--  1 root root 36143341 Apr 24 19:51 initrd.img-4.4.0-21-genericdrwx------  2 root root    16384 Okt 28 17:43 lost+found-rw-r--r--  1 root root   182704 Jan 28 13:44 memtest86+.bin-rw-r--r--  1 root root   184380 Jan 28 13:44 memtest86+.elf-rw-r--r--  1 root root   184840 Jan 28 13:44 memtest86+_multiboot.bin-rw-------  1 root root  3745312 Mr 16 01:45 System.map-4.2.0-35-generic-rw-------  1 root root  3853719 Apr 19 00:21 System.map-4.4.0-21-generic-rw-------  1 root root  6829104 Mr 16 01:45 vmlinuz-4.2.0-35-generic-rw-------  1 root root  7013968 Apr 19 00:21 vmlinuz-4.4.0-21-generic-rw-r--r--  1 root root  4435552 Apr 14 19:20 vmlinuz-linuxThe 4.4.0 and 4.2.0 kernels should be Ubuntu, Arch should have a 4.5.0 kernel. But how do I find out which file without kernel version in its name belongs to what?My Ubuntu root directory (directories excluded):$ ls -la / | grep ^[^d]total 124lrwxrwxrwx   1 root      root         32 Apr 24 19:44 initrd.img -> boot/initrd.img-4.4.0-21-genericlrwxrwxrwx   1 root      root         32 Apr  5 17:45 initrd.img.old -> boot/initrd.img-4.2.0-35-genericlrwxrwxrwx   1 root      root         29 Apr 24 19:44 vmlinuz -> boot/vmlinuz-4.4.0-21-genericlrwxrwxrwx   1 root      root         29 Apr  5 17:45 vmlinuz.old -> boot/vmlinuz-4.2.0-35-genericMy Arch root directory does not contain any files or links.
GRUB confuses kernels/initramfs of Ubuntu and Arch Linux installation
ubuntu;arch linux;grub2;dual boot;initramfs
I finally solved it by nuking the Arch partition and its boot files in my Ubuntu's /boot directory from orbit. Ubuntu is fine again now, all remaining GRUB entries are working again.Here's a list of what I did:Delete Arch's initramfs files:sudo rm /boot/initramfs-linux*Delete Arch's vmlinuz file:sudo rm vmlinuz-linuxFormat the Arch partition (/dev/sda8) using GPartedUpdate GRUB's configuration:sudo update-grubReboot and enjoy!