Make-initrd development discussion
 help / color / mirror / Atom feed
From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] boot with rootfs on a btrfs subvolume
Date: Sun, 16 May 2021 18:14:19 +0200
Message-ID: <20210516161419.46lji7fbpl6vw3bm@example.org> (raw)
In-Reply-To: <20210504210204.dn7atiidmnnr4igx@example.org>

On Tue, May 04, 2021 at 11:02:04PM +0200, Alexey Gladkov wrote:
> > > > P.S. Я, правда, пока не пробовал задавать rootflags — но почему бы
> > > > make-initrd по умолчанию не взять их из fstab?
> > > 
> > > Можете показать /etc/fstab из получившегося initrd ?
> > 
> > Одна строчка:
> > UUID=a8c68183-f5bf-4623-86fe-41d9171b7c5f /      btrfs  rw,relatime,ssd,space_cache,subvolid=822,subvol=/alt 0 0
> > 
> > subvol и subvolid вполне соответствуют желаемым.
> 
> make-initrd уже сейчас умеет их использовать, но только если не указан
> root=. Если указать root=, то он забывает сохранённые настройки.
> 
> Это можно исправить. Он make-initrd может забывать не всё, а только то,
> что переопределено.
> 
> > > Были ли передан при загрузке root= ?
> > 
> > root=UUID=a8c68183-f5bf-4623-86fe-41d9171b7c5f
> 
> Тогда всё ясно.

Я начал думать про эту проблему и склоняюсь к выводу, что как сделано
сейчас это правильное поведение.

Сейчас запись из системного /etc/fstab берётся тогда, когда нет попытки
переопределить значения рута. Когда передаётся root=, то скорее всего эта
информация не актуальна. В этом случае вся информация из системы
отбрасывается.

Если же частично брать из системы опции и тип файловой системы, то будут
"подземные стуки" потому, что будут подставляться параметры, где был
создан образ.

В вашем случае если вы укажите root=UUID на другой рут, то будут
поставлены rootfstype=btrfs и параметры, что будет очень неправильно.

Текущее поведение при указании root= сбросит остальные параметры на
rootfstype=auto и rootflags=defaults. Это мне кажется более правильным.

-- 
Rgrds, legion



      parent reply	other threads:[~2021-05-16 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 16:53 Arseny Maslennikov
2021-05-04 18:43 ` Alexey Gladkov
2021-05-04 19:14   ` Arseny Maslennikov
2021-05-04 21:02     ` Alexey Gladkov
2021-05-04 21:59       ` Arseny Maslennikov
2021-05-05  8:43         ` Alexey Gladkov
2021-05-16 16:14       ` Alexey Gladkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210516161419.46lji7fbpl6vw3bm@example.org \
    --to=gladkov.alexey@gmail.com \
    --cc=make-initrd@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Make-initrd development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
		make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
	public-inbox-index make-initrd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.make-initrd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git