You are not logged in.

#1 2014-04-14 13:14:12

brusapa
Member
From: Spain
Registered: 2013-10-26
Posts: 11

Problem booting a pure btrfs system

Hi everyone, in first place I want to apologize about all the grammar mistakes I'll make in this post, but English isn't my native language.
I don't really know if this question belongs to this subforum or to the Newbies one, so, sorry if it doesn't belong to this one.

I've been trying to install a pure btrfs archlinux, but I always have the same problem when the installation process ends, the computer doesn't boot and displays this on screen:

Scanning for Btrfs filesystems
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.
sh: can't access tty; job control turned off
[rootfs /]#

I'm tryingo to install it on a virtualbox virtual machine (maybe this could be the problem), pure btrfs (with separate /home and / subvolumes), and using grub2 as bootloader.

/dev/sda (BTRFS)
|--> __active
        |--> rootvol
        |--> home

A quick google search about the error suggest me to add 'init=/bin/systemd' to the kernel line, but that didn't work, I've also added the btrfs hook before executing mkinitcpio.

HOOKS="base udev autodetect modconf block filesystems keyboard btrfs"

I'm a complete noob with btrfs, well... I'm a newbie in arch in general, and I don't know what to do now, so, if somebody could help I'll be really grateful.

I don't know where is the error, so I post here my fstab

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/sda LABEL=ssd
UUID=72d012e2-7154-47b2-aa44-bf13f81c5d8c	/         	btrfs     	rw,noatime,compress=lzo,ssd,discard,autodefrag,inode_cache,subvol=__active/rootvol	0 0

# /dev/sda LABEL=ssd
UUID=72d012e2-7154-47b2-aa44-bf13f81c5d8c	/home     	btrfs     	rw,noatime,compress=lzo,ssd,discard,autodefrag,inode_cache,subvol=__active/home	0 0

# /dev/sda LABEL=ssd
UUID=72d012e2-7154-47b2-aa44-bf13f81c5d8c	/mnt/defvol     btrfs     	rw,noatime,compress=lzo,ssd,discard,autodefrag,inode_cache 0 0

and my grub configuration, maybe they will be useful.

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="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 Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# 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"

#GRUB_SAVEDEFAULT="true"

Offline

#2 2014-04-14 14:29:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: Problem booting a pure btrfs system

Can we get the actual grub.cfg file?

Offline

#3 2014-04-14 14:38:06

brusapa
Member
From: Spain
Registered: 2013-10-26
Posts: 11

Re: Problem booting a pure btrfs system

Of course you can, you are trying to help me after all...

#
# 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  72d012e2-7154-47b2-aa44-bf13f81c5d8c
else
  search --no-floppy --fs-uuid --set=root 72d012e2-7154-47b2-aa44-bf13f81c5d8c
fi
    font="/__active/rootvol/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_archlinux ###

menuentry "Arch Linux pkg-linux kernel" --class arch-linux --class arch --class gnu-linux --class gnu --class os {
    
    if [ x$feature_all_video_module = xy ]; then
        insmod all_video
    fi
    set gfxpayload=keep
    insmod btrfs
    if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid  --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0  72d012e2-7154-47b2-aa44-bf13f81c5d8c
    else
        search --no-floppy --fs-uuid  --set=root 72d012e2-7154-47b2-aa44-bf13f81c5d8c
    fi
    echo 'Loading Arch Linux pkg-linux kernel ...'
    linux /__active/rootvol/boot/vmlinuz-linux root=UUID=72d012e2-7154-47b2-aa44-bf13f81c5d8c rw  quiet
    echo 'Loading Arch Linux pkg-linux kernel initramfs ...'
    initrd /__active/rootvol/boot/initramfs-linux.img
}


menuentry "Arch Linux pkg-linux kernel (fallback initramfs)" --class arch-linux --class arch --class gnu-linux --class gnu --class os {
    
    if [ x$feature_all_video_module = xy ]; then
        insmod all_video
    fi
    set gfxpayload=keep
    insmod btrfs
    if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid  --set=root --hint-bios=hd0 --hint-efi=hd0 --hint-baremetal=ahci0  72d012e2-7154-47b2-aa44-bf13f81c5d8c
    else
        search --no-floppy --fs-uuid  --set=root 72d012e2-7154-47b2-aa44-bf13f81c5d8c
    fi
    echo 'Loading Arch Linux pkg-linux kernel ...'
    linux /__active/rootvol/boot/vmlinuz-linux root=UUID=72d012e2-7154-47b2-aa44-bf13f81c5d8c rw  quiet
    echo 'Loading Arch Linux pkg-linux kernel fallback initramfs ...'
    initrd /__active/rootvol/boot/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_archlinux ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-72d012e2-7154-47b2-aa44-bf13f81c5d8c' {
	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  72d012e2-7154-47b2-aa44-bf13f81c5d8c
	else
	  search --no-floppy --fs-uuid --set=root 72d012e2-7154-47b2-aa44-bf13f81c5d8c
	fi
	echo	'Loading Linux linux ...'
	linux	/__active/rootvol/boot/vmlinuz-linux root=UUID=72d012e2-7154-47b2-aa44-bf13f81c5d8c rw rootflags=subvol=__active/rootvol  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/__active/rootvol/boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-72d012e2-7154-47b2-aa44-bf13f81c5d8c' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-72d012e2-7154-47b2-aa44-bf13f81c5d8c' {
		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  72d012e2-7154-47b2-aa44-bf13f81c5d8c
		else
		  search --no-floppy --fs-uuid --set=root 72d012e2-7154-47b2-aa44-bf13f81c5d8c
		fi
		echo	'Loading Linux linux ...'
		linux	/__active/rootvol/boot/vmlinuz-linux root=UUID=72d012e2-7154-47b2-aa44-bf13f81c5d8c rw rootflags=subvol=__active/rootvol  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/__active/rootvol/boot/initramfs-linux.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+ ###

Offline

#4 2014-04-14 14:50:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: Problem booting a pure btrfs system

Which option are you choosing at boot? The "Arch Linux pkg-linux kernel" options aren't passing the subvolume to the kernel.

Offline

#5 2014-04-14 14:57:25

brusapa
Member
From: Spain
Registered: 2013-10-26
Posts: 11

Re: Problem booting a pure btrfs system

I was booting with "Arch Linux pkg-linux kernel"... If I boot with "Arch Linux" one it boots normally... I feel a little embarrassed for not realizing that myself...
Do you know how to fix the "Arch Linux pkg-linux kernel" option?
Thank you very much

Offline

#6 2014-04-14 15:37:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: Problem booting a pure btrfs system

No idea how to fix it, I don't use grub anymore. Version 2 just made things overly complex IMO.

Offline

#7 2014-04-18 00:51:59

baggar11
Member
Registered: 2014-03-12
Posts: 19

Re: Problem booting a pure btrfs system

I'm not sure if this will help as I'm rather new at btrfs myself, but I would try removing the subvol option in fstab and set it on the FS using "btrfs sub set <id> <mount>." I've used that on all my btrfs installs when I hop between snapshots and it works great.

Offline

Board footer

Powered by FluxBB