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

Bug#880844: marked as done (flash-kernel: fails to include rootflags=subvol=@)



Your message dated Sat, 20 Jan 2018 00:29:18 -0800
with message-id <87k1wdue5d.fsf@aikidev.net>
and subject line Re: Bug#880844: flash-kernel: fails to include rootflags=subvol=@
has caused the Debian Bug report #880844,
regarding flash-kernel: fails to include rootflags=subvol=@
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
880844: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880844
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
On 2017-11-04, Mark wrote:
> 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.

You have a number of options:

Drop a file in /etc/flash-kernel/ubootenv.d:

  setenv rootflags 'subvol=@'
  setenv bootargs ${bootargs} rootflags=${rootflags}

You could edit /etc/default/flash-kernel:

  LINUX_KERNEL_CMDLINE="quiet rootflags=subvol=@"

You could edit the bootscripts in /etc/flash-kernel/bootscripts/* or
create a custom boot script and edit /etc/flash-kernel/db to use that
bootscript for your board.

Hopefully that solves your issue.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply to: