You are not logged in.

#1 2018-03-20 19:24:39

arobe176
Member
Registered: 2018-03-20
Posts: 10

[SOLVED]Can't boot Ubuntu through Grub; dual boot

i originally had arch installed on my laptop with about 250G of memory left in case I ever wanted to do something with it. I decided to try to dual boot with Ubuntu 16 and I installed that on the remaining memory space, also creating a swap partition. I was able to boot into Ubuntu with no errors or anything but when I tried to boot into arch I got errors saying Kernel Panic and could not mount root, I don't remember the exact error, but I was able to find a solution on these forums so I tried implementing it:

Salkay wrote:
lsblk -f
mount /dev/sdb7 /mnt
mkdir /mnt/home
mount /dev/sdb8 /mnt/home
arch-chroot /mnt /bin/bash
grub-install --target=i386-pc --recheck --debug /dev/sdb
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot now

and now I can boot Arch just fine, but when grub launches at the startup it does not give me the option to boot into Ubuntu, Arch is my only option. Any help would be appreciated. This is also the first post I have tried posting so if I did something wrong or if you need more information let me know and I'll try to get it to you.
Thank you

Last edited by arobe176 (2018-03-20 22:58:45)

Offline

#2 2018-03-20 19:32:17

loqs
Member
Registered: 2014-03-06
Posts: 18,544

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

What have you installed or configured to generate the config entry for Ubuntu?

Offline

#3 2018-03-20 21:21:30

arobe176
Member
Registered: 2018-03-20
Posts: 10

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

That's probably my issue because I don't really understand what you mean. I don't think I've done anything for that. I didn't think I needed to because the grub for Ubuntu showed arch, it just wasn't working properly

Offline

#4 2018-03-20 21:37:34

arobe176
Member
Registered: 2018-03-20
Posts: 10

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

I just tried to follow the dual booting section of the GRUB page on the ArchWiki, and that did not help

Offline

#5 2018-03-20 21:37:48

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 67,396

Offline

#6 2018-03-20 21:40:41

arobe176
Member
Registered: 2018-03-20
Posts: 10

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

Running os-prober returns

sudo os-prober
/dev/sda6:Ubuntu 16.04.4 LTS (16.04):Ubuntu:linux

Offline

#7 2018-03-20 21:56:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 67,396

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

Offline

#8 2018-03-20 22:10:52

arobe176
Member
Registered: 2018-03-20
Posts: 10

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

pacman -S os-prober
os-prober
        /dev/sda6:Ubuntu 16.04.4 LTS (16.04):Ubuntu:linux
mount /dev/sda6 /mnt
grub-mkconfig
reboot

after running that, Ubuntu still did not show up in my selection for grub

Offline

#9 2018-03-20 22:13:15

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 67,396

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

Did you literally run "grub-mkconfig" ie. have it print the config to stdout?

Edit: if not, please post the exact command and provide the generated /boot/grub/grub.cfg
Also, classical error: don't forget to mount your /boot partition.

Last edited by seth (2018-03-20 22:14:25)

Offline

#10 2018-03-20 22:17:31

arobe176
Member
Registered: 2018-03-20
Posts: 10

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

yes, I literally ran "grub-mkconfig" here is the output

sudo grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  94842f70-d0bb-459a-83e8-1768ce50cc7e
else
  search --no-floppy --fs-uuid --set=root 94842f70-d0bb-459a-83e8-1768ce50cc7e
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-linux
Found initrd image(s) in /boot: intel-ucode.img initramfs-linux.img
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-94842f70-d0bb-459a-83e8-1768ce50cc7e' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  2cacb5e3-2d5b-47c1-a401-5354d780b7fe
	else
	  search --no-floppy --fs-uuid --set=root 2cacb5e3-2d5b-47c1-a401-5354d780b7fe
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=94842f70-d0bb-459a-83e8-1768ce50cc7e rw  quiet
	echo	'Loading initial ramdisk ...'
	initrd  /intel-ucode.img /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-94842f70-d0bb-459a-83e8-1768ce50cc7e' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-94842f70-d0bb-459a-83e8-1768ce50cc7e' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  2cacb5e3-2d5b-47c1-a401-5354d780b7fe
		else
		  search --no-floppy --fs-uuid --set=root 2cacb5e3-2d5b-47c1-a401-5354d780b7fe
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=94842f70-d0bb-459a-83e8-1768ce50cc7e rw  quiet
		echo	'Loading initial ramdisk ...'
		initrd  /intel-ucode.img /initramfs-linux.img
	}
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-94842f70-d0bb-459a-83e8-1768ce50cc7e' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  2cacb5e3-2d5b-47c1-a401-5354d780b7fe
		else
		  search --no-floppy --fs-uuid --set=root 2cacb5e3-2d5b-47c1-a401-5354d780b7fe
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=94842f70-d0bb-459a-83e8-1768ce50cc7e rw  quiet
		echo	'Loading initial ramdisk ...'
		initrd  /intel-ucode.img /initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
Found Ubuntu 16.04.4 LTS (16.04) on /dev/sda6
menuentry 'Ubuntu 16.04.4 LTS (16.04) (on /dev/sda6)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-afde7a89-1350-4e39-9de3-3aecd05ee531' {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos6'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
	else
	  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
	fi
	linux /boot/vmlinuz-4.13.0-37-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro quiet splash $vt_handoff
	initrd /boot/initrd.img-4.13.0-37-generic
}
submenu 'Advanced options for Ubuntu 16.04.4 LTS (16.04) (on /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-afde7a89-1350-4e39-9de3-3aecd05ee531' {
	menuentry 'Ubuntu (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.13.0-37-generic--afde7a89-1350-4e39-9de3-3aecd05ee531' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos6'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
		else
		  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
		fi
		linux /boot/vmlinuz-4.13.0-37-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-4.13.0-37-generic
	}
	menuentry 'Ubuntu, with Linux 4.13.0-37-generic (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.13.0-37-generic--afde7a89-1350-4e39-9de3-3aecd05ee531' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos6'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
		else
		  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
		fi
		linux /boot/vmlinuz-4.13.0-37-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-4.13.0-37-generic
	}
	menuentry 'Ubuntu, with Linux 4.13.0-37-generic (upstart) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.13.0-37-generic--afde7a89-1350-4e39-9de3-3aecd05ee531' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos6'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
		else
		  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
		fi
		linux /boot/vmlinuz-4.13.0-37-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro quiet splash $vt_handoff init=/sbin/upstart
		initrd /boot/initrd.img-4.13.0-37-generic
	}
	menuentry 'Ubuntu, with Linux 4.13.0-37-generic (recovery mode) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.13.0-37-generic--afde7a89-1350-4e39-9de3-3aecd05ee531' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos6'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
		else
		  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
		fi
		linux /boot/vmlinuz-4.13.0-37-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro recovery nomodeset
		initrd /boot/initrd.img-4.13.0-37-generic
	}
	menuentry 'Ubuntu, with Linux 4.13.0-36-generic (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.13.0-36-generic--afde7a89-1350-4e39-9de3-3aecd05ee531' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos6'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
		else
		  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
		fi
		linux /boot/vmlinuz-4.13.0-36-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-4.13.0-36-generic
	}
	menuentry 'Ubuntu, with Linux 4.13.0-36-generic (upstart) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.13.0-36-generic--afde7a89-1350-4e39-9de3-3aecd05ee531' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos6'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
		else
		  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
		fi
		linux /boot/vmlinuz-4.13.0-36-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro quiet splash $vt_handoff init=/sbin/upstart
		initrd /boot/initrd.img-4.13.0-36-generic
	}
	menuentry 'Ubuntu, with Linux 4.13.0-36-generic (recovery mode) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.13.0-36-generic--afde7a89-1350-4e39-9de3-3aecd05ee531' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos6'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  afde7a89-1350-4e39-9de3-3aecd05ee531
		else
		  search --no-floppy --fs-uuid --set=root afde7a89-1350-4e39-9de3-3aecd05ee531
		fi
		linux /boot/vmlinuz-4.13.0-36-generic root=UUID=afde7a89-1350-4e39-9de3-3aecd05ee531 ro recovery nomodeset
		initrd /boot/initrd.img-4.13.0-36-generic
	}
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done

Offline

#11 2018-03-20 22:20:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 67,396

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

Please spend about 5 seconds to think about my last post. Maybe also check the wiki again.
I assume you'll eventually figure it.

Offline

#12 2018-03-20 22:26:36

loqs
Member
Registered: 2014-03-06
Posts: 18,544

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

Where in the wiki page seth linked to particularly the section seth linked is the insruction to run

sudo grub-mkconfig

Offline

#13 2018-03-20 22:58:05

arobe176
Member
Registered: 2018-03-20
Posts: 10

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

Wow, thank you guys. Realized I forgot the -o /boot/grub/grub.cfg. Thanks again! It works now

Offline

#14 2018-03-21 17:43:14

ua4000
Member
Registered: 2015-10-14
Posts: 509

Re: [SOLVED]Can't boot Ubuntu through Grub; dual boot

And to solve the confusion: on Ubuntu the "os-prober" is already installed - on arch you need to explicit install the package.

Offline

Board footer

Powered by FluxBB