[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#880844: flash-kernel: fails to include rootflags=subvol=@



Package: flash-kernel
Version: 3.79
Severity: critical
Tags: d-i
Justification: breaks the whole system

Dear Maintainer,

I used debian installer to install debian on an Allwinner
A20-OLinuXino-Lime2 following the instructions at:
https://wiki.debian.org/InstallingDebianOn/Allwinner

In the debian installer, I changed priority to medium so that I could
have control over the partitioning steps.  I have an attached SATA disk
and partitioned this as physical volume for encryption with a btrfs
filesystem on it.

I then proceeded to manually create subvolumes on the btrfs filesystem
and mounted the root subvolume as /target.

Essentially, my /target was mounted as:
# mount -t btrfs -o rw,ssd,noatime,nodiratime,compress=lzo,space_cache,subvol=@ /dev/mapper/sda3_crypt /target

(Also fixed /etc/fstab)

After finishing the install and rebooting, the system fails to boot and u-boot drops into an initramfs shell.

The problem is that u-boot does not pass the rootflags=subvol=@ to the
boot command.  The root btrfs filesystem is mounted on /root in the
initramfs rather than the subvolume @ being mounted as /root.

I was able to manually remount the subvolume @ onto /root and further
mount /boot (which is ext2 filesystem on micro SD card partition 1).

I looked in /boot/boot.scr and saw this line:
setenv bootargs ${bootargs} quiet
which assumes that bootargs may have already been set.

I rebooted the system and stopped u-boot to enter the u-boot shell.
I added some environment variables as follows:
=> setenv rootflags 'subvol=@'
=> setenv bootargs rootflags=${rootflags}
=> saveenv
=> reset

Now u-boot passes bootargs=rootflags=subvol=@
And the system boot properly.

Furthermore, if I run flash-kernel my settings are not overwritten and
the system continues to boot properly.

However, I don't think this is the correct way to fix the problem.
I couldn't see any configuration file for flash-kernel or
initramfs-tools for setting rootflags.

Is there a configuration option which will add rootflags somewhere so
that flash-kernel puts this in the boot.scr file?



-- System Information:
Debian Release: 9.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 4.9.0-4-armmp-lpae (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages flash-kernel depends on:
ii  debconf [debconf-2.0]  1.5.61
ii  devio                  1.2-1.2+b1
ii  initramfs-tools        0.130
ii  linux-base             4.5
ii  mtd-utils              1:2.0.0-1
ii  ucf                    3.0036

Versions of packages flash-kernel recommends:
ii  u-boot-tools  2016.11+dfsg1-4

flash-kernel suggests no packages.

-- debconf information:
* flash-kernel/linux_cmdline: quiet


Reply to: