From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] udev network interface renaming policy
Date: Thu, 23 Sep 2021 21:05:55 +0200
Message-ID: <20210923190555.hyxounrtywuybyz7@example.org> (raw)
In-Reply-To: <YUyfukjwRmbvf4lN@cello>
On Thu, Sep 23, 2021 at 06:39:38PM +0300, Arseny Maslennikov wrote:
> On Thu, Sep 23, 2021 at 05:22:22PM +0200, Alexey Gladkov wrote:
> > On Thu, Sep 23, 2021 at 05:43:07PM +0300, Arseny Maslennikov wrote:
> > > On Thu, Sep 23, 2021 at 04:05:46PM +0200, Alexey Gladkov wrote:
> > > > On Thu, Sep 23, 2021 at 08:37:08PM +0700, Антон Мидюков wrote:
> > > > > Обнаружил, что сетевой интерфейс включенный в initrd остаётся с именем eth0 при сетевой
> > > > > установке. Что приводит к тому, что в инсталяторе настраиваем eth0, а в установленной системе
> > > > > имеем его с именем enp0s8 подобным без конфигурации. Так что к установленной системе по сети после установки уже
> > > > > можно и не подключиться (сетевой интерфейс подключен один).
> > > >
> > > > Переименовывает systemd или что-то около его.
> > >
> > > Переименовывает сам udevd, т. е. его встроенный компонент:
> > > https://github.com/systemd/systemd/blob/main/src/udev/udev-builtin-net_setup_link.c
> > > https://github.com/systemd/systemd/blob/main/src/udev/udev-builtin-net_id.c
> >
> > Пытается переименовать именно оно, вы правы. Но делает она по каким-то
> > полиси:
> >
> > https://github.com/systemd/systemd/blob/42ffc40ce382dfda5f2a100698673bc252a72194/src/udev/net/link-config.c#L455
>
> ...Описанным в systemd.link(5). [1]
>
> > > >> % cat /lib/udev/rules.d/80-net-setup-link.rules
> > > >> # do not edit this file, it will be overwritten on update
> > > >>
> > > >> SUBSYSTEM!="net", GOTO="net_setup_link_end"
> > > >>
> > > >> IMPORT{builtin}="path_id"
> > > >>
> > > >> ACTION=="remove", GOTO="net_setup_link_end"
> > > >>
> > > >> IMPORT{builtin}="net_setup_link"
> > > ^^^^^^^^^^^^^^
> > > Вот здесь этот компонент и вступает в игру.
> > > >>
> > > >> NAME=="", ENV{ID_NET_NAME}!="", NAME="$env{ID_NET_NAME}"
> > > >>
> > > >> LABEL="net_setup_link_end"
> >
> > Но это правило есть и у меня на системе, но переименования не случается.
> > Почему этого не происходит у меня я пока не понял.
>
> Может, лежит в нужном месте .link-файл, в котором указано не
> переименовывать (см. ман-страницу). Или не лежит, а замазан (т. е.
> действительны результаты работы команды `ln -s /dev/null
> /etc/systemd/network/99-default.link')
>
> [1] https://man7.org/linux/man-pages/man5/systemd.link.5.html
У меня нет systemd вообще. Также нет каталога /etc/systemd/network.
Ну да ладно. Видимо, это частности конкретной системы.
--
Rgrds, legion
prev parent reply other threads:[~2021-09-23 19:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 13:37 [make-initrd] Добавить udev правило в initrd через initrd.mk Антон Мидюков
2021-09-23 14:05 ` Alexey Gladkov
2021-09-23 14:20 ` Антон Мидюков
2021-09-23 14:36 ` Alexey Gladkov
2021-09-27 15:38 ` Антон Мидюков
2021-09-27 15:59 ` Alexey Gladkov
2021-09-27 18:54 ` Leonid Krivoshein
2021-09-29 4:18 ` Антон Мидюков
2021-09-27 18:25 ` Leonid Krivoshein
2021-09-23 16:12 ` Антон Мидюков
2021-09-23 19:13 ` Alexey Gladkov
2021-09-24 4:22 ` Антон Мидюков
2021-09-24 5:37 ` Антон Мидюков
2021-09-24 9:53 ` Alexey Gladkov
2021-09-24 9:57 ` Антон Мидюков
2021-09-24 9:58 ` Alexey Gladkov
2021-09-24 13:17 ` Leonid Krivoshein
2021-09-24 13:52 ` [make-initrd] has_feature() и initrd_release() Leonid Krivoshein
2021-09-24 14:31 ` Alexey Gladkov
2021-09-24 14:56 ` Leonid Krivoshein
2021-09-24 14:29 ` [make-initrd] Добавить udev правило в initrd через initrd.mk Alexey Gladkov
2021-09-24 14:54 ` Leonid Krivoshein
2021-09-23 14:43 ` Arseny Maslennikov
2021-09-23 15:22 ` Alexey Gladkov
2021-09-23 15:39 ` [make-initrd] udev network interface renaming policy Arseny Maslennikov
2021-09-23 19:05 ` 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=20210923190555.hyxounrtywuybyz7@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