You are not logged in.

#1 2020-01-06 18:52:39

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Grub is not showing Arch Linux.

Hi!

I'm trying to install "archlinux-2020.01.01-x86_64.iso", but after install the system GRUB is not finding Arch, only Windows.

The output of fdisk -l (the "..." was edited by me):

fdisk -l
Disk /dev/sda: 465.78 Gib, ... bytes, ... sectors
Device        Boot    Start   End  Sectors  Size  Id   Type
/dev/sda1     *         ...      ...        ...         ...    7    HPFS/NTFS/extFat
/dev/sda2                ...      ...        ...         ...    7    HPFS/NTFS/extFat
/dev/sda3                ...      ...        ...         ...    5    Extended
/dev/sda5                ...      ...        ...         ...    83  Linux
/dev/sda6                ...      ...        ...         ...    7    HPFS/NTFS/extFat
/dev/sda7                ...      ...        ...         ...    82  Linux swap / Solaris

Disk /dev/sdb: 1.91 Gib, ...bytes, ... sectors (arch linux iso flashdrive)

fstab:

# <file system> <dir> <type> <options> <dump> <pass>
# dev/sda5
UUID=bfe1daba-d5c2-4966-9049-9f2ba83fc160  /  ext4  rw,relatime  0  1

# /dev/sda6
UUID=7c026ac2026ab0ce  /media/backup  ntfs  rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096  0 0

# /dev/sda2
UUID=14389dc0389da0f2  /media/windows  ntfs  rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096  0 0

# /dev/sda7
UUID=26930bb7-132f-4ab8-ab9e-bcd5e4d07d4  none  swap  defaults  0  0

After install "grub-bios" and "os-prober" I tried the following commands:

grub-install --target=i386-pc --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Generating grub configuration file...
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
Found Windows 7 on /dev/sda1
done

How can I fix this problem?

Last edited by claudiogc (2020-01-06 20:29:49)

Offline

#2 2020-01-06 19:13:51

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

Re: Grub is not showing Arch Linux.

Please use code tags rather than quote tags when posting terminal output.

I think we need more details about your installation procedure. And the full grub.cfg (or the output of the plain grub-mkconfig command).

Offline

#3 2020-01-06 20:28:49

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: Grub is not showing Arch Linux.

Well, regarding only the partitions I'm doing this:
(right after the flashdrive boot and I did not post the wifi configuration for instance and other things because is not important, I think)

mkswap /dev/sda7
swapon /dev/sda7

mkfs.ext4 /dev/sda5
mount /dev/sda5 /mnt

mkdir /mnt/media
mkdir /mnt/media/backup
mkdir /mnt/media/flashdrive
mkdir /mnt/media/windows

mount /dev/sda6 /mnt/media/backup
mount /dev/sda2 /mnt/media/windows

genfstab -U -p /mnt >> /mnt/etc/fstab

arch-chroot /mnt

pacman -S linux-headers mesa xf86-video-ati xf86-video-vesa dialog wpa_supplicant os-prober

mkinitcpio -p linux
grub-install --target=i386-pc --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

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_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos5' --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4693a935-7a96-4eca-b104-d976ab0b37a6
else
  search --no-floppy --fs-uuid --set=root 4693a935-7a96-4eca-b104-d976ab0b37a6
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=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 ###

### 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 'Windows 7 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-D0D68F9BD68F8108' {
	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-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  D0D68F9BD68F8108
	else
	  search --no-floppy --fs-uuid --set=root D0D68F9BD68F8108
	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.
#(2) Windows 7
menuentry "Windows 7" {
	set root=(hd0,1)
	chainloader (hd0,1)+1
}
### 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 ###

Last edited by claudiogc (2020-01-06 23:00:28)

Offline

#4 2020-01-06 20:39:30

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

Re: Grub is not showing Arch Linux.

Have you installed a kernel?

Offline

#5 2020-01-06 22:56:39

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: Grub is not showing Arch Linux.

I installed:

base base-devel grub-bios exfat-utils ntfs-3g linux-headers mesa xf86-video-ati xf86-video-vesa dialog wpa_supplicant os-prober

Offline

#6 2020-01-06 23:09:07

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Grub is not showing Arch Linux.

Offline

#7 2020-01-06 23:21:43

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: Grub is not showing Arch Linux.

No, I didn't install all with pacstrap, only:

pacstrap /mnt base base-devel grub-bios exfat-utils ntfs-3g

The others I did with pacman like in post #3.
As you can see in the original post /dev/sda1 is setted as bootable. I was wondering if I use cfdisk to set the /dev/sda5(Linux) as bootable too. Do I have to install all the system again after do this or is just save and exit?

Last edited by claudiogc (2020-01-06 23:25:49)

Offline

#8 2020-01-06 23:24:50

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Grub is not showing Arch Linux.

Read the link that 2ManyDogs posted again  - and actually read it this time.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2020-01-07 00:30:51

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: Grub is not showing Arch Linux.

You are right. I didn't install linux and linx-firmware.

Offline

#10 2020-01-07 14:44:30

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

Re: Grub is not showing Arch Linux.

If your problem is fixed then please prepend [SOLVED] to the title to help others who may encounter this issue.

Offline

Board footer

Powered by FluxBB