You are not logged in.

#1 2013-11-09 00:11:36

cmotion
Member
Registered: 2013-11-08
Posts: 3

SOLVED Grub with correct uuid, "device not found"

-updated, fixed grub.cfg link, and added corrected code formating.

hello, I have been struggling to get arch to work on my new computer I have successfully installed arch on several occasions previously. here is the setup information which might be usefull
file system setup

mksf.btrfs -L pool -d Raid1 -m Raid1 /dev/sda /dev/sdb /dev/sdc /dev/sde /dev/sdf

I followed the guide on Arch mkinitcpio-btrfs

I have installed grub to all six drives, "this is to allow the computer to boot regardless of which drive the bios selects
and created the config from the live media by

mount /dev/sda /mnt -o defaults,relatime,autodefrag,compress=lzo
arch-chroot /mnt
 grub-install --target=i386-pc --recheck /dev/sda
repeated for sda through sdf
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot

"device not found"

on the arch wiki btrfs page

btrfs arch wiki wrote:

what have i tried?

"If you get the following: error no such device: root when booting from a RAID style setup then edit /usr/share/grub/grub-mkconfig_lib and remove both quotes from the line echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}". Regenerate the con-fig for grub and your system should boot without an error. "

this did not effect my results

also I have simply tried booting to the different drives


I have read and i believe..  tried the following 'solutions'
here
here
here
here

Here is my 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 btrfs
set root='hd0'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0 --hint-bios=hd1 --hint-efi=hd1 --hint-baremetal=ahci1 --hint-bios=hd2 --hint-efi=hd2 --hint-baremetal=ahci2 --hint-bios=hd3 --hint-efi=hd3 --hint-baremetal=ahci3 --hint-bios=hd4 --hint-efi=hd4 --hint-baremetal=ahci4 --hint-bios=hd5 --hint-efi=hd5 --hint-baremetal=ahci5 c583330e-be8e-44ef-b2b1-96c9f70aa5c9
else
  search --no-floppy --fs-uuid --set=root c583330e-be8e-44ef-b2b1-96c9f70aa5c9
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
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
/dev/sdf' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod btrfs
    set root='hd0'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0 --hint-bios=hd1 --hint-efi=hd1 --hint-baremetal=ahci1 --hint-bios=hd2 --hint-efi=hd2 --hint-baremetal=ahci2 --hint-bios=hd3 --hint-efi=hd3 --hint-baremetal=ahci3 --hint-bios=hd4 --hint-efi=hd4 --hint-baremetal=ahci4 --hint-bios=hd5 --hint-efi=hd5 --hint-baremetal=ahci5 c583330e-be8e-44ef-b2b1-96c9f70aa5c9
    else
      search --no-floppy --fs-uuid --set=root c583330e-be8e-44ef-b2b1-96c9f70aa5c9
    fi
    echo    'Loading Linux core repo kernel ...'
    linux    /boot/vmlinuz-linux root=UUID=c583330e-be8e-44ef-b2b1-96c9f70aa5c9 rw  quiet
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
/dev/sdf' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod btrfs
    set root='hd0'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0 --hint-bios=hd1 --hint-efi=hd1 --hint-baremetal=ahci1 --hint-bios=hd2 --hint-efi=hd2 --hint-baremetal=ahci2 --hint-bios=hd3 --hint-efi=hd3 --hint-baremetal=ahci3 --hint-bios=hd4 --hint-efi=hd4 --hint-baremetal=ahci4 --hint-bios=hd5 --hint-efi=hd5 --hint-baremetal=ahci5 c583330e-be8e-44ef-b2b1-96c9f70aa5c9
    else
      search --no-floppy --fs-uuid --set=root c583330e-be8e-44ef-b2b1-96c9f70aa5c9
    fi
    echo    'Loading Linux core repo kernel ...'
    linux    /boot/vmlinuz-linux root=UUID=c583330e-be8e-44ef-b2b1-96c9f70aa5c9 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 ###

### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###

Here is my fstab
'I plan on seperating home and the pacman packages as subvolumes to minimize the size of snapshots. however I have commented them  out until I am able to boot the system

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/sda LABEL=pool
UUID=c583330e-be8e-44ef-b2b1-96c9f70aa5c9	/         	btrfs     	defaults,relatime,compress=lzo,space_cache,autodefrag		0 0
#UUID=c583330e-be8e-44ef-b2b1-96c9f70aa5c9	/var/lib/btrfs	btrfs		defaults,relatime,compress=lzo,subvolid=0,autodefrag	0 0
#UUID=c583330e-be8e-44ef-b2b1-96c9f70aa5c9	/home		btrfs		defaults,relatime,compress-lzo,subvolid=259,autodefrag	0 0
#UUID=c583330e-be8e-44ef-b2b1-96c9f70aa5c9	/var/lib/pacman/local		btrfs		defaults,relatime,compress=lzo,autodefrag,subvolid=261	0 0

#/dev/sda: LABEL="pool" UUID="c583330e-be8e-44ef-b2b1-96c9f70aa5c9" UUID_SUB="b2cbe589-f43d-41e1-8a80-55def4e71b05" TYPE="btrfs" PTTYPE="dos" 

here is my blkid

/dev/sda: LABEL="pool" UUID="c583330e-be8e-44ef-b2b1-96c9f70aa5c9" UUID_SUB="b2cbe589-f43d-41e1-8a80-55def4e71b05" TYPE="btrfs" PTTYPE="dos" 
/dev/sde: LABEL="pool" UUID="c583330e-be8e-44ef-b2b1-96c9f70aa5c9" UUID_SUB="0708ae37-ad0d-4b19-b470-5db86ce1a4e4" TYPE="btrfs" PTTYPE="dos" 
/dev/sdb: LABEL="pool" UUID="c583330e-be8e-44ef-b2b1-96c9f70aa5c9" UUID_SUB="3e4b633c-c5a2-4dbd-be09-89ab45160a68" TYPE="btrfs" PTTYPE="dos" 
/dev/sdd: LABEL="pool" UUID="c583330e-be8e-44ef-b2b1-96c9f70aa5c9" UUID_SUB="5befe591-b5d6-4b23-a981-da7bc440f33e" TYPE="btrfs" PTTYPE="dos" 
/dev/sdc: LABEL="pool" UUID="c583330e-be8e-44ef-b2b1-96c9f70aa5c9" UUID_SUB="0943bb02-e6ec-4dc4-9273-911d86bba36f" TYPE="btrfs" PTTYPE="dos" 
/dev/sdg1: UUID="2013-11-01-08-10-26-00" LABEL="ARCH_201311" TYPE="iso9660" PTUUID="0d738582" PTTYPE="dos" PARTUUID="0d738582-01" 
/dev/sdg2: SEC_TYPE="msdos" LABEL="ARCHISO_EFI" UUID="1B5C-32EF" TYPE="vfat" PARTUUID="0d738582-02" 
/dev/loop0: TYPE="squashfs" 
/dev/loop1: UUID="f844a479-9328-482b-a105-8a11d0274e4f" TYPE="ext4" 
/dev/loop2: UUID="f844a479-9328-482b-a105-8a11d0274e4f" TYPE="ext4" 
/dev/mapper/arch_root-image: UUID="f844a479-9328-482b-a105-8a11d0274e4f" TYPE="ext4" 
/dev/sdf: PTTYPE="dos" 

any thoughts would be appreciated

Last edited by cmotion (2013-11-10 03:08:15)

Offline

#2 2013-11-09 01:50:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: SOLVED Grub with correct uuid, "device not found"

Welcome to Arch's forums.

cmotion wrote:

I have installed grub to all six drives,

Why?

EDIT: Oh, wait. Is this because it is a RAID set up? If so, please excuse my ignorance in asking you why you did this.

EDIT 2: Is that really the contents of your grub.cfg? If so, the problem should be obvious!

It is very difficult to parse the other files you posted. I cannot tell if there are line breaks there or not. Please post them here between

code tags

or on a pastebin which will retain the original line breaks.

Last edited by cfr (2013-11-09 01:59:12)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-11-09 02:02:46

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: SOLVED Grub with correct uuid, "device not found"

cmotion wrote:

I followed the guide on Arch mkinitcpio-btrfs
...
any thoughts would be appreciated

I wouldn't touch that hook with a ten foot poll. 

It is probably better to set things up manually and gain an understanding of how things work in btrfs.  Having a hook to roll back your filesystem seems pointless. 

First off, if you are using btrfs with subvolumes separating your partitions, there is no point in separating anything but /home.  Some people like to separate /var, but this is entirely pointless, as the typical benefits of /var are that it is either on a separate disk for performance, or is meant to be restricted by the size of the filesystem.  If it is on the same filesystem as / anyway, it enjoys neither benefit.

So the filesystem should be all one piece.  I do think that it might make sense to separate /boot depending on your needs, but having that as the same subvol enables you to be able to have a matching kernel and modules in the same snapshot.  If the filesystem is all one piece (with the possible exception of /home), then rolling back the filesystem is as easy as changing the kernel command line before boot. 

Using the naming scheme of that article you linked above, to specify which subvol is the rootfs, you would mount with the subvol=__active option.  So one option would be to put this in the fstab.  But if you do, then systemd-remount-fs.service will try to mount that everytime.  So instead, leave it out of the fstab and put it on the kernel commadn line with 'rootflags=subvol=__active'.  In the event that you want to roll back, just stop it at the bootloader and use whatever option is required to edit the kernel command line.  Then change that part to 'rootflags=subvol=/path/to/snapshot'.  Done!  No BS initramfs hook required.

Offline

#4 2013-11-09 02:13:09

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: SOLVED Grub with correct uuid, "device not found"

I'm not sure but isn't everything in fstab commented out except the / line? So it is not obvious to me the OP has more than one file system going.

Incidentally, the hook you wouldn't touch appears to have disappeared. Did you facilitate its eviction by any chance?!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2013-11-09 06:14:39

cmotion
Member
Registered: 2013-11-08
Posts: 3

Re: SOLVED Grub with correct uuid, "device not found"

cfr wrote:

Welcome to Arch's forums.

cmotion wrote:

I have installed grub to all six drives,

Why?

EDIT: Oh, wait. Is this because it is a RAID set up? If so, please excuse my ignorance in asking you why you did this.

thanks, it was a trouble shooting procedure, since the system refused to boot

cfr wrote:

EDIT 2: Is that really the contents of your grub.cfg? If so, the problem should be obvious!

It is very difficult to parse the other files you posted. I cannot tell if there are line breaks there or not. Please post them here between

code tags

or on a pastebin which will retain the original line breaks.

thanks for the advice, should be fixed now

cfr wrote:

I'm not sure but isn't everything in fstab commented out except the / line? So it is not obvious to me the OP has more than one file system going.

yes, again, to reduce the number of areas I may have made a mistake.

Last edited by cmotion (2013-11-09 06:16:54)

Offline

#6 2013-11-09 06:26:24

cmotion
Member
Registered: 2013-11-08
Posts: 3

Re: SOLVED Grub with correct uuid, "device not found"

WonderWoofy wrote:
cmotion wrote:

I followed the guide on Arch mkinitcpio-btrfs
...
any thoughts would be appreciated

I wouldn't touch that hook with a ten foot poll. 

It is probably better to set things up manually and gain an understanding of how things work in btrfs.  Having a hook to roll back your filesystem seems pointless. 

First off, if you are using btrfs with subvolumes separating your partitions, there is no point in separating anything but /home.  Some people like to separate /var, but this is entirely pointless, as the typical benefits of /var are that it is either on a separate disk for performance, or is meant to be restricted by the size of the filesystem.  If it is on the same filesystem as / anyway, it enjoys neither benefit.

So the filesystem should be all one piece.  I do think that it might make sense to separate /boot depending on your needs, but having that as the same subvol enables you to be able to have a matching kernel and modules in the same snapshot.  If the filesystem is all one piece (with the possible exception of /home), then rolling back the filesystem is as easy as changing the kernel command line before boot. 

Using the naming scheme of that article you linked above, to specify which subvol is the rootfs, you would mount with the subvol=__active option.  So one option would be to put this in the fstab.  But if you do, then systemd-remount-fs.service will try to mount that everytime.  So instead, leave it out of the fstab and put it on the kernel commadn line with 'rootflags=subvol=__active'.  In the event that you want to roll back, just stop it at the bootloader and use whatever option is required to edit the kernel command line.  Then change that part to 'rootflags=subvol=/path/to/snapshot'.  Done!  No BS initramfs hook required.

hey thanks for your response, the wiki article which incidentally no longer exists offered two ways to set the root volume, the recommended way 'in that article' was to set the default subvolume and not use the rootfs flags, it said however that if you chose not to change the default subvolume that you would need to set "subvol=__active" in the fstab. I originally chose the former

as to not using the hook, my primary goal was to enable easy snapshot-ting.  i will remove the mkinitcpio-btrfs and try without it. however I am not sure that is the reason the system wont boot. because this set-up is working perfectly fine in this configuration in a virtualmachine

Offline

Board footer

Powered by FluxBB