You are not logged in.

#1 2012-06-03 14:47:07

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

[SOLVED] BTRFS Subvol Root Mounting Incorrectly ... Systemd-tools UpD

Since updating udev to systemd-tools, the initramfs dumps me into a shell, stating that the rootfs was mounted, but /bin/systemd could not be found.

I'm unsure if rootflags=,subvol=arch,ssd is being ignored, or if the btrfs subvolumes are coming online just a hair after the check before switch_root occurs.

Whatever the case, the initramfs mounts my entire btrfs volume to /new_root, rather than the subvolume on which I have my root filesystem.  In other words, ls /new_root from the shell shows all my subvolumes.  Umounting /new_root and remounting it with mount /dev/disk/by-label/arch -o subvol=arch,ssd and then exec env -i /usr/bin/switch_root /new_root /bin/systemd works, however.

Of course, I looked around and found this post: https://bbs.archlinux.org/viewtopic.php?id=136913

Adding a rootdelay=3 doesn't seem to do the trick, though in that post, /dev/disk/by-uuid/UUID is used instead of /dev/disk/by-label/LABEL.  Seems quirky to me.

Here is my GRUB2 grub.cfg:

insmod part_gpt

insmod ext2
insmod btrfs

insmod search_label

insmod linux

insmod efi_gop
insmod efi_uga

insmod font

load_env

set default=0
set timeout=3

set pager=1

if loadfont ${prefix}/unicode.pf2
  insmod gfxterm
  set gfxmode=1366x768x32
  set gfxpayload=keep
  terminal_output gfxterm
fi

menuentry "Arch Linux" {
   search --label --no-floppy --set=root boot
   linux /vmlinuz-linux root=/dev/disk/by-label/arch rootflags=,subvol=arch,ssd rootfstype=btrfs rootdelay=3 ro i915.modeset=1 reboot=pci elevator=noop init=/bin/systemd quiet
   initrd /initramfs-linux.img
}

menuentry "Arch Linux" {
   search --label --no-floppy --set=root boot
   linux /vmlinuz-linux root=/dev/disk/by-label/arch rootflags=,subvol=arch,sdd rootfstype=btrfs rootdelay=3 ro i915.modeset=1 reboot=pci elevator=noop init=/bin/systemd quiet
   initrd /initramfs-linux-fallback.img
}

And, here is my /etc/fstab:

tmpfs      /tmp              tmpfs nodev,nosuid                    0 0

LABEL=arch /                 btrfs subvol=arch,ssd,noatime         0 1
LABEL=arch /home             btrfs subvol=home,ssd,noatime         0 1
LABEL=arch /srv              btrfs subvol=srv,ssd,noatime          0 1
LABEL=arch /var              btrfs subvol=var,ssd,noatime          0 1
LABEL=arch /var/abs          btrfs subvol=abs,ssd,noatime          0 1
LABEL=arch /var/log          btrfs subvol=log,ssd,noatime          0 1
LABEL=arch /var/yaws         btrfs subvol=yaws,ssd,noatime         0 1
LABEL=arch /var/cache/pacman btrfs subvol=pacman_cache,ssd,noatime 0 1
LABEL=arch /var/lib/pacman   btrfs subvol=pacman_lib,ssd,noatime   0 1
LABEL=arch /var/quicklisp    btrfs subvol=quicklisp,ssd,noatime    0 1

LABEL=boot /boot             ext2  defaults                        0 2

LABEL=efi  /boot/efi         vfat  defaults                        0 2

LABEL=swap none              swap  defaults                        0 0

I appreciate any pointers anyone can offer to get my system booting as it was before the systemd-tools update.

EDIT:  All is not bad, however.  Since the update to systemd-tools, my Apple MacBook Air SuperDrive is correctly recognized upon connection without rebooting as it previously required.

Last edited by ego.abyssi (2012-06-03 15:05:17)


Fortune sides with him who dares -Virgil

Offline

#2 2012-06-03 14:50:52

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] BTRFS Subvol Root Mounting Incorrectly ... Systemd-tools UpD

Has nothing to do with the systemd-tools upgrade. Get rid of the leading comma in your rootflags.

Offline

#3 2012-06-03 14:53:16

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [SOLVED] BTRFS Subvol Root Mounting Incorrectly ... Systemd-tools UpD

It might also be wise to rebuild your initramfs image, if you haven't already. Otherwise it will still have the old udevd while your actual system has the new one. Not necessarily "the solution" but it makes things a bit simpler to debug.

Offline

#4 2012-06-03 15:02:03

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [SOLVED] BTRFS Subvol Root Mounting Incorrectly ... Systemd-tools UpD

I'll try removing the leading comma and report back, falconindy.  Checking the btrfs_root Wiki page, I can see that the leading comma is now removed.  Strangely enough, it had always worked before.

ataraxia, I did rebuild the initramfs image, per the instructions, but good looking out.  I've missed silly things like this before. smile


Fortune sides with him who dares -Virgil

Offline

#5 2012-06-03 15:04:18

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [SOLVED] BTRFS Subvol Root Mounting Incorrectly ... Systemd-tools UpD

Worked like a charm, falconindy.  Thanks!


Fortune sides with him who dares -Virgil

Offline

#6 2012-06-03 15:39:51

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] BTRFS Subvol Root Mounting Incorrectly ... Systemd-tools UpD

The upgrade that "broke" this was util-linux, as we're shipping a new mount implementation. What you've found is a subtle bug in the option string parser that causes it to stop hard on multiple successive commas, i.e. "ro,relatime,,subvol=root" will be parsed into "ro" and "relatime". I have limited time today, but I'll try to work out a patch to submit upstream.

Offline

#7 2012-06-05 19:11:28

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] BTRFS Subvol Root Mounting Incorrectly ... Systemd-tools UpD

Offline

Board footer

Powered by FluxBB