You are not logged in.

#1 2016-09-16 10:20:23

Draiken
Member
Registered: 2016-09-16
Posts: 5

Can't boot into arch after changing GRUB from UEFI to BIOS

Hi there!

Well, here's my story:
Have a working Ubuntu installation but it's very outdated. So I decided to use Arch that I already used on my laptop and grew fond of.
I proceeded to install arch with UEFI boot mode and it worked great. Unfortunately I need to boot into my windows sometimes and after reading the arch wiki, I discovered I couldn't boot into windows installed on BIOS mode directly from UEFI
Since the only solution was to also boot arch from BIOS, I decided to change my boot to it.

I unmounted /boot, used gparted to set the grub_bios flag (not sure if that's the name, but it's close) and created an ext4 filesystem on the partition.
After booting with the USB stick, used pacstrap to install the base system with both / and /boot mounted (which generates the linux image, I don't know how to generate it any other way).

Finally changed my fstab to mount the correct disk since the UUID changed, installed grub with target i386-pc and generated the grub config on /boot/grub/grub.cnf

Now I boot into my new disk and I can see a flicker of an error in the screen, but since I have multiple SSDs, the boot window moves directly into the next disk, which is my Ubuntu installation, covering the error.

That's pretty much it. I don't know how to debug the GRUB menu since it fails and automatically moves to the next disk, I've tried re-formatting the partition and reproducing the steps more than once (yeah, probably the definition of insanity) and I have ran out of ideas.

Any help would be appreciated.
Thanks!

Offline

#2 2016-09-22 14:35:01

alxndr13
Member
Registered: 2016-09-22
Posts: 13

Re: Can't boot into arch after changing GRUB from UEFI to BIOS

In your BIOS you should be able to exclude every other SSD from the boot sequence. Maybe then it halts and you are able to debug the grub menu..

Offline

#3 2016-09-23 19:02:34

Draiken
Member
Registered: 2016-09-16
Posts: 5

Re: Can't boot into arch after changing GRUB from UEFI to BIOS

I used the pause/esc trick to get the message:

no video mode activated

Googling this error I only get some font issue with Ubuntu... even tried their solution to no avail.
I have no idea how to fix this... I've even tried un-commenting the

GRUB_TERMINAL_OUTPUT=console

and the error persists sad

This is my generated grub.cfg:

#
# 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_gpt
insmod ext2
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  17299838-6b90-41c4-be9a-65dc77177689
else
  search --no-floppy --fs-uuid --set=root 17299838-6b90-41c4-be9a-65dc77177689
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1024x768x32
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
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 ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-17299838-6b90-41c4-be9a-65dc77177689' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  122abc63-6206-4a06-a8f8-3c7853f8552b
	else
	  search --no-floppy --fs-uuid --set=root 122abc63-6206-4a06-a8f8-3c7853f8552b
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=17299838-6b90-41c4-be9a-65dc77177689 rw  quiet
	echo	'Loading initial ramdisk ...'
	initrd  /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-17299838-6b90-41c4-be9a-65dc77177689' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-17299838-6b90-41c4-be9a-65dc77177689' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  122abc63-6206-4a06-a8f8-3c7853f8552b
		else
		  search --no-floppy --fs-uuid --set=root 122abc63-6206-4a06-a8f8-3c7853f8552b
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=17299838-6b90-41c4-be9a-65dc77177689 rw  quiet
		echo	'Loading initial ramdisk ...'
		initrd  /initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-17299838-6b90-41c4-be9a-65dc77177689' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  122abc63-6206-4a06-a8f8-3c7853f8552b
		else
		  search --no-floppy --fs-uuid --set=root 122abc63-6206-4a06-a8f8-3c7853f8552b
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=17299838-6b90-41c4-be9a-65dc77177689 rw  quiet
		echo	'Loading initial ramdisk ...'
		initrd  /initramfs-linux-fallback.img
	}
	menuentry 'Arch Linux, with Linux linux (recovery mode)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-recovery-17299838-6b90-41c4-be9a-65dc77177689' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  122abc63-6206-4a06-a8f8-3c7853f8552b
		else
		  search --no-floppy --fs-uuid --set=root 122abc63-6206-4a06-a8f8-3c7853f8552b
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=17299838-6b90-41c4-be9a-65dc77177689 rw single 
		echo	'Loading initial ramdisk ...'
		initrd  /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 ###
menuentry 'Ubuntu 14.04.4 LTS (14.04) (on /dev/sdc1)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ce88fa41-383e-4966-af1b-f78e0b15eecc' {
	insmod part_msdos
	insmod ext2
	set root='hd2,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
	else
	  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
	fi
	linux /boot/vmlinuz-3.13.0-88-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro quiet splash $vt_handoff
	initrd /boot/initrd.img-3.13.0-88-generic
}
submenu 'Advanced options for Ubuntu 14.04.4 LTS (14.04) (on /dev/sdc1)' $menuentry_id_option 'osprober-gnulinux-advanced-ce88fa41-383e-4966-af1b-f78e0b15eecc' {
	menuentry 'Ubuntu (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-88-generic--ce88fa41-383e-4966-af1b-f78e0b15eecc' {
		insmod part_msdos
		insmod ext2
		set root='hd2,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
		else
		  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
		fi
		linux /boot/vmlinuz-3.13.0-88-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.13.0-88-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-88-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-88-generic--ce88fa41-383e-4966-af1b-f78e0b15eecc' {
		insmod part_msdos
		insmod ext2
		set root='hd2,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
		else
		  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
		fi
		linux /boot/vmlinuz-3.13.0-88-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.13.0-88-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-88-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-88-generic--ce88fa41-383e-4966-af1b-f78e0b15eecc' {
		insmod part_msdos
		insmod ext2
		set root='hd2,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
		else
		  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
		fi
		linux /boot/vmlinuz-3.13.0-88-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro recovery nomodeset
		initrd /boot/initrd.img-3.13.0-88-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-86-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-86-generic--ce88fa41-383e-4966-af1b-f78e0b15eecc' {
		insmod part_msdos
		insmod ext2
		set root='hd2,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
		else
		  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
		fi
		linux /boot/vmlinuz-3.13.0-86-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.13.0-86-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-86-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-86-generic--ce88fa41-383e-4966-af1b-f78e0b15eecc' {
		insmod part_msdos
		insmod ext2
		set root='hd2,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
		else
		  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
		fi
		linux /boot/vmlinuz-3.13.0-86-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro recovery nomodeset
		initrd /boot/initrd.img-3.13.0-86-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-32-generic--ce88fa41-383e-4966-af1b-f78e0b15eecc' {
		insmod part_msdos
		insmod ext2
		set root='hd2,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
		else
		  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
		fi
		linux /boot/vmlinuz-3.13.0-32-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.13.0-32-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-32-generic--ce88fa41-383e-4966-af1b-f78e0b15eecc' {
		insmod part_msdos
		insmod ext2
		set root='hd2,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  ce88fa41-383e-4966-af1b-f78e0b15eecc
		else
		  search --no-floppy --fs-uuid --set=root ce88fa41-383e-4966-af1b-f78e0b15eecc
		fi
		linux /boot/vmlinuz-3.13.0-32-generic root=UUID=ce88fa41-383e-4966-af1b-f78e0b15eecc ro recovery nomodeset
		initrd /boot/initrd.img-3.13.0-32-generic
	}
}

menuentry 'Windows 8 (loader) (on /dev/sdc3)' --class windows --class os $menuentry_id_option 'osprober-chain-064059B84059AF65' {
	insmod part_msdos
	insmod ntfs
	set root='hd2,msdos3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos3 --hint-efi=hd2,msdos3 --hint-baremetal=ahci2,msdos3  064059B84059AF65
	else
	  search --no-floppy --fs-uuid --set=root 064059B84059AF65
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
menuentry 'Windows 7 (loader) (on /dev/sdd1)' --class windows --class os $menuentry_id_option 'osprober-chain-96C6CBA6C6CB8549' {
	insmod part_msdos
	insmod ntfs
	set root='hd3,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  96C6CBA6C6CB8549
	else
	  search --no-floppy --fs-uuid --set=root 96C6CBA6C6CB8549
	fi
	parttool ${root} hidden-
	chainloader +1
}
### 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 ###

If I can't get this working I'll have to switch distros... and I really don't want that sad

Offline

#4 2016-09-24 09:51:17

alxndr13
Member
Registered: 2016-09-22
Posts: 13

Re: Can't boot into arch after changing GRUB from UEFI to BIOS

https://bbs.archlinux.org/viewtopic.php?id=90569 did you found this thread? theres someone on the arch forums who had a slightly different message smile

Offline

#5 2016-09-24 18:57:10

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Can't boot into arch after changing GRUB from UEFI to BIOS

Draiken wrote:

I unmounted /boot, used gparted to set the grub_bios flag (not sure if that's the name, but it's close) and created an ext4 filesystem on the partition.

A BIOS Boot Partition should *not* have a filesystem and only needs to be ~60KiB in size, the convention is to use sectors 32-2047 (these are left empty in a correctly aligned drive) for this partition.

Also, I would recommend using `gdisk` rather than `gparted` as the interface is much clearer (IMO).

What is the current disposition of your drive(s)?

# parted -l
Draiken wrote:

installed grub with target i386-pc and generated the grub config on /boot/grub/grub.cnf

Please post the exact commands used (along with any output) rather than vague descriptions of the commands used.

Finally, note that non-UEFI booting from a GPT disk is firmware-dependent and may not work at all, a traditional "MBR-style" partition table is recommended for non-UEFI systems.

Offline

Board footer

Powered by FluxBB