# Adding Arch Linux to FreeBSD Grub



## balanga (Feb 7, 2018)

I have a disk which has FreeBSD and Arch Linux installed. I have a Grub pkg installed under FreeBSD and FreeBSD boots up fine. Both systems are bootable but I can't get Arch Linux to boot from the Grub menu, I need to boot from a Grub USB stick. Arch Linux previously booted from its own grub menu and I copied its menuentry to FreeBSD but it doesn't work.

Can anyone suggest a menuentry for Arch Linux under FreeBSD?


----------



## Handsome Jack (Feb 7, 2018)

Maybe You can reinstall Arch's grub; it is much easyer to add FreeBSD menu entry to Linux grub.cfg .
That was my first thought. If You really wanna add a menuentry for Arch Linux under FreeBSD, Your current grub.cfg (from FreeBSD and Arch) will be helpful here.
(in case of reinstalling Arch's grub don't forget to make backup ...)


----------



## balanga (Feb 8, 2018)

Handsome Jack said:


> Maybe You can reinstall Arch's grub; it is much easyer to add FreeBSD menu entry to Linux grub.cfg .
> That was my first thought. If You really wanna add a menuentry for Arch Linux under FreeBSD, Your current grub.cfg (from FreeBSD and Arch) will be helpful here.
> (in case of reinstalling Arch's grub don't forget to make backup ...)



I much prefer having FreeBSD's grub - I was never able to successfully add FreeBSD to Arch's grub menu...

FreeBSD's grub.cfg:-

```
set timeout=5

set default 0

set menu_color_normal=white/black
set menu_color_highlight=white/red

menuentry "FreeBSD 11.1-RELEASE on S02p1" {
    set root=(hd0,msdos1,bsd1)
    kfreebsd /boot/loader
}

menuentry "mfsBSD - maintenance boot " {
    set root=(hd0,msdos1,bsd1)
#    set root=(hd0,gpt3)
    kfreebsd /boot/loader
}

menuentry "System setup" {
    fwsetup
}
menuentry "System shutdown" {
    echo "System shutting down..."
    halt
}
menuentry "System restart" {
    echo "System rebooting.."
    reboot
}
menuentry "System setup" {
    echo "System shutting down
    halt
}

menuentry 'Arch Linux -test' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
#    load_video
#    set gfxpayload=keep
    insmod gzio
    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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
#    else
#      search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
#    fi
    echo    'Loading Linux linux ...'
    linux    /boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initramfs-linux.img
}

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
    load_video
    set gfxpayload=keep
    insmod gzio
    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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
    else
      search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
    fi
    echo    'Loading Linux linux ...'
    linux    /boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initramfs-linux.img
```

Arch's 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,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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
else
  search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
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 ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
    load_video
    set gfxpayload=keep
    insmod gzio
    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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
    else
      search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
    fi
    echo    'Loading Linux linux ...'
    linux    /boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
    menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
        load_video
        set gfxpayload=keep
        insmod gzio
        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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
        else
          search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
        fi
        echo    'Loading Linux linux ...'
        linux    /boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/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-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
        load_video
        set gfxpayload=keep
        insmod gzio
        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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
        else
          search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
        fi
        echo    'Loading Linux linux ...'
        linux    /boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/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 ###
### 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 ###
```

I basically pasted Arch's grub.cfg into FreeBSD and tried a few changes, none of which worked. FreeBSD's entry for FreeBSD is nice and simple - two lines! Arch's menuentries seem overcomplicated, and I have no idea what is actually required.


----------



## Handsome Jack (Feb 8, 2018)

I have just added and tested FreeBSD menu entry to Arch grub.cfg, because I am more familiar with Linux; also I'll use Linux designations of disks.
So, there are specs for better understanding, also computer is NON-UEFI hardware based.
Disk 1: Arch Linux : MBR : sda1(ext4)= /boot , sda2(ext4)= /
Disk 2: Windows 10 - not relevant for this;
Disk 3: FreeBSD 11.1 : GPT : sdc1(freebsd-boot, 512kb ) , *sdc2(freebsd-ufs, 1GB bootfs )* , sdc3 (46GB GELI encrypted FreeBSD root) +3 more partitions, irelevant for this;

sdc2 is what we are interested;

```
(from linux terminal)
# blkid /dev/sdc2
/dev/sdc2: UUID="5a5b2ce7943baaa4" TYPE="ufs" PARTLABEL="bootfs" PARTUUID="4bed3b32-f912-11e7-a1b2-002421f2551e"
```

Manually added this to Arch's grub.cfg:

```
### 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.
menuentry 'FreeBSD' {
   insmod part_gpt
   insmod ufs2
   set root='(hd2,gpt2)'
   if [ x$feature_platform_search_hint = xy ]; then
         search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos2 --hint-efi=hd2,msdos2 --hint-baremetal=ahci2,msdos2  5a5b2ce7943baaa4
       else
         search --no-floppy --fs-uuid --set=root 5a5b2ce7943baaa4
   fi
   kfreebsd /boot/loader
   kfreebsd_loadenv /boot/device.hints
   set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada2p2
   set kFreeBSD.vfs.root.mountfrom.options=rw
}
### END /etc/grub.d/40_custom ###
```
And it works perfect. Of course You must modify that cfg to meet Your specifications.

I hope I'll not be crucified for using some Linux things here 

LATER I'LL TRY TO WORK ON "Adding Arch Linux to FreeBSD"


----------



## balanga (Feb 8, 2018)

I tried your additions but left out the *if -* *block * as I don't have any UUIDs - not sure if they are necessary...

I have FreeBSD installed on an MBR partition on a second disk (/dev/ada1s3) so root is set as 'hd1,msdos3' and this shows up if I run `ls` from a *grub>* prompt...

On selection I get:-

```
error: can't find command `kFreeBSD'.
error: can't find command `kFreeBSD_loadenv'.
```


----------



## Handsome Jack (Feb 8, 2018)

No UUID? If you run from, installed Linux, or some Linux live CD, command
`# blkid /dev/sdb3`
what will it say?


----------



## Handsome Jack (Feb 8, 2018)

OK, as I said I'll work on "Adding Arch Linux to FreeBSD grub2",
here is what I was doing last hour:
 / I used another comp, because there are some spare disks, handsome for testing purpose.
It is uefi-based, but I installed this fresh FreeBSD 11.1 as non-uefi, bios-based installation.

Arch Linux is there on NVME, and it is also bios-based (meaning non-uefi)
Nvme0 - Arch - with LUKS
Disk 1 - SSD - sda - Win10 (uefi) - irelevant
Disk 2 - SSD - sdb - FreeBSD (uefi, GELI)
Disk 3 - HDD - sdc - EXT4 Linux storage, backups
Disk 4 - HDD - sdd - NTFS storage

I erased Disk 4 and there installed FreeBSD (non-uefi) - used entire disk.
BTW, I was surprised because installation didn't offer GRUB2 as boot loader, but I think I mixed that (in my head) with TrueOS installer, which does offer it.
Then, after rebooting into that fresh installation on sdd / AKA ada3, I installed GRUB2:

```
# pkg install grub2
# grub-install /dev/ada3
# grub-mkconfig -o /boot/grub/grub.cfg
```
- there was error in cfg file, in front of every line there was one or two letters "t", but I figure that out, and edited and deleted those errors.

So there it was, fresh grub.cfg:

```
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /usr/local/etc/grub.d and settings from /usr/local/etc/default/grub
#

### BEGIN /usr/local/etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

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 loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=
  insmod gettext
fi
terminal_output gfxterm
set timeout=15
### END /usr/local/etc/grub.d/00_header ###

### BEGIN /usr/local/etc/grub.d/10_kfreebsd ###
menuentry 'FreeBSD' --class freebsd --class bsd --class os $menuentry_id_option 'kfreebsd-simple-5a7caccca417dff6' {
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  5a7caccca417dff6
else
  search --no-floppy --fs-uuid --set=root 5a7caccca417dff6
fi
   echo           'Loading kernel of FreeBSD kernel ...'
   kfreebsd       /boot/kernel/kernel
   kfreebsd_loadenv   /boot/device.hints
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  5a7caccca417dff6
else
  search --no-floppy --fs-uuid --set=root 5a7caccca417dff6
fi
   kfreebsd_module_elf   /boot/kernel/ufs.ko
   set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/5a7caccca417dff6
   set kFreeBSD.vfs.root.mountfrom.options=rw
}
submenu 'Advanced options for FreeBSD' $menuentry_id_option 'kfreebsd-advanced-5a7caccca417dff6' {
menuentry 'FreeBSD, with kFreeBSD kernel' --class freebsd --class bsd --class os $menuentry_id_option 'kfreebsd-kernel-advanced-5a7caccca417dff6' {
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  5a7caccca417dff6
else
  search --no-floppy --fs-uuid --set=root 5a7caccca417dff6
fi
   echo           'Loading kernel of FreeBSD kernel ...'
   kfreebsd       /boot/kernel/kernel
   kfreebsd_loadenv   /boot/device.hints
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  5a7caccca417dff6
else
  search --no-floppy --fs-uuid --set=root 5a7caccca417dff6
fi
   kfreebsd_module_elf   /boot/kernel/ufs.ko
   set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/5a7caccca417dff6
   set kFreeBSD.vfs.root.mountfrom.options=rw
}
menuentry 'FreeBSD, with kFreeBSD kernel (recovery mode)' --class freebsd --class bsd --class os $menuentry_id_option 'kfreebsd-kernel-recovery-5a7caccca417dff6' {
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  5a7caccca417dff6
else
  search --no-floppy --fs-uuid --set=root 5a7caccca417dff6
fi
   echo           'Loading kernel of FreeBSD kernel ...'
   kfreebsd       /boot/kernel/kernel -s
   kfreebsd_loadenv   /boot/device.hints
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  5a7caccca417dff6
else
  search --no-floppy --fs-uuid --set=root 5a7caccca417dff6
fi
   kfreebsd_module_elf   /boot/kernel/ufs.ko
   set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/5a7caccca417dff6
   set kFreeBSD.vfs.root.mountfrom.options=rw
}
}

### END /usr/local/etc/grub.d/10_kfreebsd ###

### BEGIN /usr/local/etc/grub.d/30_os-prober ###
### END /usr/local/etc/grub.d/30_os-prober ###

### BEGIN /usr/local/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 /usr/local/etc/grub.d/40_custom ###

### BEGIN /usr/local/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 /usr/local/etc/grub.d/41_custom ###
```

Then I (*manually*) inserted relevant Arch Linux part into FreeBSD's /boot/grub/grub.cfg:

```
### BEGIN /usr/local/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.
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-423334ef-0142-45fa-864f-afb675e580f1' {
   insmod gzio
   insmod part_msdos
   insmod ext2
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root  64101886-c909-49eb-8a1d-d8b833c9132b
   else
     search --no-floppy --fs-uuid --set=root 64101886-c909-49eb-8a1d-d8b833c9132b
   fi
   echo   'Loading Linux linux ...'
   linux   /vmlinuz-linux root=UUID=423334ef-0142-45fa-864f-afb675e580f1 rw cryptdevice=/dev/nvme0n1p2:cryptroot:allow-discards quiet
   echo   'Loading initial ramdisk ...'
   initrd  /initramfs-linux.img
}
### END /usr/local/etc/grub.d/40_custom ###
```

It may looks strange, but that is because of nvme device and LUKS encryption; You can easy modify cfg for your needs, the main thing is IT WORKS PERFECT!


----------



## balanga (Feb 9, 2018)

After messing up the mbr several times, I managed to include your Arch Linux section in FreeBSD's grub.cfg and it hangs while trying to boot Arch Linux. After selecting Arch Linux I see:-

```
Loading Linux linux ...
Loading initial ramdisk ...
```
 ...so not exactly sure how far things have got. 

Can I provide something like a verbose booting option to see if initramfs-linux.img is actually doing anything?


----------



## Handsome Jack (Feb 9, 2018)

Are those Loading... messages staying on screen, or screen goes blank?
Can you paste that current FreeBSD grub.cfg section of Arch menuentry?


----------



## balanga (Feb 9, 2018)

The screen does not go blank, the two lines just stay on the screen.

Here's my /boot/grub/grub.cfg:-

```
menuentry "FreeBSD 11.1-RELEASE on S02p1" {
    set root=(hd0,msdos1,bsd1)
    kfreebsd /boot/loader
}


menuentry 'Arch Linux -test' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
#<----->load_video
#<----->set gfxpayload=keep
<------>insmod gzio
<------>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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
#<----->else
#<----->  search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
#<----->fi
<------>echo<-->'Loading Linux linux ...'
<------>linux<->/boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw  quiet
<------>echo<-->'Loading initial ramdisk ...'
<------>initrd  /boot/initramfs-linux.img
}

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
<------>insmod gzio
<------>insmod part_msdos
<------>insmod ext2
#<----->set root='hd0,msdos2'
<------>if [ x$feature_platform_search_hint = xy ]; then
<------>  search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
#<----->  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  c37edc8e-4c2f-4ef0-b027-1efd169c4246
<------>else
<------>  search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
<------>fi
<------>echo<-->'Loading Linux linux ...'
<------>linux<->/boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw  quiet
<------>echo<-->'Loading initial ramdisk ...'
<------>initrd  /boot/initramfs-linux.img
}
```

I would re-install it, but the x32 release of Arch Linux has been discontinued, and I would prefer to have it available.


----------



## Handsome Jack (Feb 9, 2018)

Try adding this (exactly as is, do not comment any line, please):

```
menuentry 'Arch Linux - test' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c37edc8e-4c2f-4ef0-b027-1efd169c4246' {
   insmod gzio
   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  c37edc8e-4c2f-4ef0-b027-1efd169c4246
   else
       search --no-floppy --fs-uuid --set=root c37edc8e-4c2f-4ef0-b027-1efd169c4246
   fi
   echo   'Loading Linux linux ...'
   linux   /boot/vmlinuz-linux root=UUID=c37edc8e-4c2f-4ef0-b027-1efd169c4246 rw
   echo   'Loading initial ramdisk ...'
   initrd  /boot/initramfs-linux.img
}
```


----------



## balanga (Feb 9, 2018)

I pasted that block into my grub.cfg but the situation didn't change so I thought I must have screwed up something up in the Arch Linux installation, so I copied a section from an Arch Linux on a different disk and managed to boot that, so at least I know I have a working solution, so many thanks for that.

Just wondered if I can compare the two Arch Linux installations to see what is wrong with the one that doesn't boot...


----------



## balanga (Feb 11, 2018)

Handsome Jack said:


> No UUID? If you run from, installed Linux, or some Linux live CD, command
> `# blkid /dev/sdb3`
> what will it say?



As a result of this I've now copied a working Arch Linux installation to my Multiboot disk having changed the UUID although there are a couple of errors flagged during boot:


```
error: can't find command 'rw' . 

error: no suitable video mode found
Booting in blind mode
```

It does go on to boot successfully though.


----------



## Handsome Jack (Feb 11, 2018)

balanga said:


> It does go on to boot successfully though.


 


balanga said:


> although there are a couple of errors flagged during boot


 This is probably because _we_ removed option "quiet" on Your request ---->


balanga said:


> Can I provide something like a verbose booting option to see


..so _we_ can now put it back (in grub.cfg) :
`linux   /boot/vmlinuz-linux root=UUID=whatever-uuid-number-you-gotnow rw quiet`


----------

