You are not logged in.

#1 2022-08-29 21:09:40

faeve
Member
Registered: 2022-06-10
Posts: 12

Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

Im trying to Dual Boot Windows/Arch Grub/MBR

What im wanting:

Dual boot Windows/Arch using Grub/MBR

Problem:

Grub boot menu doesnt show Arch.
os-prober/grub-mkconfig is unable to locate Arch.

What Ive tried:

There is an EFI partition, but I wasnt able to install the system using EFI but was able to with MBR.

Im wondering if my partition layout is bad. (Since Arch and swap are in an extended partition) or if its something else.

Device          Boot             Start              End             Sectors         Size              Id Type
>>  /dev/sda1                      2048               718847        716800          350M            7 HPFS/NTFS/exFAT       
    /dev/sda2                        718848           412383955   411665108     196.3G         7 HPFS/NTFS/exFAT
    /dev/sda3       *                412385280     413433855   1048576         512M           ef EFI (FAT-12/16/32)
    /dev/sda4                        413435902     625141759    211705858     100.9G        5 Extended
    ├─/dev/sda5                  413435904     621053951    207618048    99G             83 Linux
    └─/dev/sda6                  621056000     625141759    4085760       1.9G            82 Linux swap / Solaris

Configs:

$nano /etc/default/grub

# GRUB boot loader configuration
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

Commands:

$grub-mkconfig

# 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,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  13a85e19-8b31-47a0-a167-d69fe73cee38
else
  search --no-floppy --fs-uuid --set=root 13a85e19-8b31-47a0-a167-d69fe73cee38
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=C
  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 ###
### 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 ###
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Found Windows 10 on /dev/sda1
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-AC72DD3E72DD0E48' {
	insmod part_msdos
	insmod ntfs
	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  AC72DD3E72DD0E48
	else
	  search --no-floppy --fs-uuid --set=root AC72DD3E72DD0E48
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
Adding boot menu entry for UEFI Firmware Settings ...
fwsetup --is-supported
if [ "$grub_platform" = "efi" -a "$?" = 0 ]; then
	menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
		fwsetup
	}
fi
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###
$os-prober
/dev/sda1:Windows 10:Windows:chain

Any help would be greatly appreciated im getting to the point of bashing my head against my screen into a bloody pulp.

Thank you for your time

Last edited by faeve (2022-08-30 20:08:16)

Offline

#2 2022-08-29 21:17:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,263

Re: Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

os-prober does not have to detect the operating system that is actively managing the GRUB that is being installed. For that to happen properly your /boot containing the kernel images just needs to have been present and containing kernels when you ran the initial grub-install command, which grub-install command did you run exactly and with which mount setup.

Did you install a kernel in the first place?

Also please wrap command outputs in code tags

FWIW with your system "properly" set up the partitions mounted like you think they are correct and chrooted into the installed system, what are your outputs for

mount
pacman -Q linux
ls -l /boot

Last edited by V1del (2022-08-29 21:19:06)

Offline

#3 2022-08-29 21:47:35

faeve
Member
Registered: 2022-06-10
Posts: 12

Re: Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

Grub Install:

$sudo pacman -S grub
$grub-install --target=i386-pc /dev/sda

Kernal Install:

$mount /dev/sda5 /mnt
$swapon /dev/sda6
$pacstrap /mnt base linux linux-firmware

Requested Outputs:

$mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3961752k,nr_inodes=990438,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
tmp on /tmp type tmpfs (rw,nosuid,nodev,inode64)
run on /etc/resolv.conf type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
$pacman -Q linux
linux 5.19.5.arch1-1
$ls -l /boot
total 0

Last edited by faeve (2022-08-30 14:23:14)

Offline

#4 2022-08-30 06:30:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,492

Re: Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

In what context did you run "mount" and "ls -l /boot" ? The install iso?
The mount output looks incomplete in any context and the empty boot suggests that no kernel was installed on the root partition, so I assume you mounted sda3 into /boot when installing arch…

Online

#5 2022-08-30 17:18:01

faeve
Member
Registered: 2022-06-10
Posts: 12

Re: Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

Im sorry if I misunderstand anything your asking.

I used this partition format off of the ArchWiki Install guide
                                   BIOS with MBR
Mount point    Partition                    Partition type    Suggested size
[SWAP]            /dev/swap_partition    Linux swap    More than 512 MiB
/mnt                    /dev/root_partition    Linux            Remainder of the device

---------------------------------------------
[SWAP]           /dev/sda6
/mnt                /dev/sda5

I didnt use sda3 since I wasnt using EFI

My steps (I think is what you mean by context) were for installing

$mkfs.ext4 /dev/sda5
$mkswap /dev/sda6

$mount /dev/sda5 /mnt
$swapon /dev/sda6

$pacstrap /mnt base linux linux-firmware

Im not sure if this is relevant, but this is where grub was installed

$grub-install --target=i386-pc /dev/sda

Offline

#6 2022-08-30 17:31:03

faeve
Member
Registered: 2022-06-10
Posts: 12

Re: Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

UPDATE:

I have no idea what I did but its a result of aimless fiddiling

Grub now recognizes Arch on boot

GNU GRUB
Arch Linux Advanced options for Arch Linux
Windows 10 (on /dev/sda1)

However I now get these errors after loading
(Cant copy/paste so Ill try and be thorough)

Starting version 251.4-1-arch
/dev/sda5: clean 38698/6488064 files, 985591/25952256 blocks
[ TIME ] Time out waiting for device /dev/disk/by-uuid//B85B-8287
[DEPEND] Dependency failed for /boot
[DEPEND] Dependency failed for Local File Systems
You are in emergency mode, After logging in, type "journalctl -xb" to view system logs
Give root password for mainenance

Im able to do stuff in maintenance but Im not sure what else to look, besides all the steps Iv already tried.

I would give the

journalctl -xb

But I dont have anyway of posting it and It would and theres 1419 lines of code and taking pictures would probably not look so great.
I cant start the sshd service in this mode otherwise Id do that.

Last edited by faeve (2022-08-30 18:03:56)

Offline

#7 2022-08-30 18:40:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,263

Re: Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

your fstab is broken and trying to mount a disk that either doesn't exist or doesn't exist in the way you mapped it.

Offline

#8 2022-08-30 20:07:36

faeve
Member
Registered: 2022-06-10
Posts: 12

Re: Dual Boot Windows/Arch w/Grub MBR - Grub Problems (SOLVED)

It must have been that.

I decided to just reinstall everything and everything went smooth without error and is fully functioning how I wanted it. I must have messed that up at some point.

Thank you for your time.

I’ll mark as Solved

Offline

Board footer

Powered by FluxBB