From: Aleksey Avdeev <solo@solin.spb.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] I: installer: Ошибка перемонтирования при использовании LVM
Date: Tue, 13 Oct 2015 16:41:55 +0300
Message-ID: <561D0A23.3000908@solin.spb.ru> (raw)
In-Reply-To: <5617EBA3.8010401@solin.spb.ru>
[-- Attachment #1: Type: text/plain, Size: 2557 bytes --]
09.10.2015 19:30, Aleksey Avdeev пишет:
> 09.10.2015 19:06, Aleksey Avdeev пишет:
> ...
>>
>> Дальнейшие раскопки показали, что т. к. у меня cryptsetup отсутствует
>> у меня в образе инсталлятора но ставиться в целевую систему -- в
>> процессе перемонтирования бинарник /sbin/cryptsetup копируется, функцией
>> copy_chroot_binaries() из /usr/sbin/install2-remount-functions.
>> Копирования же необходимых библиотек не выполняется, см.
>> <http://git.altlinux.org/people/mike/packages/?p=installer-scripts-remount-stage2.git;a=blob;f=installer-scripts-remount-stage2/scripts/install2-remount-functions;h=c689af73bd0fb19ad22c80ca893d3b1e334962f0;hb=e119820712cab35620fd73c65bb79ddfda15daf6>
>>
>> Похоже в copy_chroot_binaries() надо добавлять копирование требуемых
>> библиотек...
>
> Открыл https://bugzilla.altlinux.org/show_bug.cgi?id=31351 по этому
> поводу.
Собрал installer-scripts-remount-stage2-0.5.2-alt2 (см.
<http://git.altlinux.org/tasks/archive/done/_147/151356/logs/events.1.1.log>).
Особенности: Для копирование файлов из устанавливаемой системы
используется скрипт /usr/share/make-initrd/tools/put-file (из пакета
make-initrd), там (в устанавливаемой системе) приветствующий. При этом
выполняется следующая последовательность операций (см.
<https://bugzilla.altlinux.org/show_bug.cgi?id=31351#c2>):
1. Проверить, существует ли требуемый
$destdir/usr/share/make-initrd/tools/put-file (если
нет -- выводим предупреждение и ничего не делаем.
2. Создать временный каталог $destdir/tmp/installer.XXX
3. Смонтировать в $destdir/tmp/installer.XXX текущий корень:
mount --bind / $destdir/tmp/installer.XXX
4. Выполнить копирование необходимых файлов из $destdir в
$destdir/tmp/installer.XXX, используя вызов put-file внутри chroot`а
$destdir
5. Отмонтировать $destdir/tmp/installer.XXX
6. Удалить каталог $destdir/tmp/installer.XXX
Для более красивого решения, требуется (см.
<https://bugzilla.altlinux.org/show_bug.cgi?id=31351#c4>):
1. Доработка /usr/share/make-initrd/tools/put-file -- требуется
возможность задать chroot, для выполнения ldd. Как вариант, добавить
параметр --from-chroot=<chrootdir> и при вызове:
put-file --from-chroot=<chrootdir> <destdir> <file>
а) в качестве пути к копируемому файлу использовать <chrootdir>/<file>
б) использовать ldd в chroot:
chroot <chrootdir> ldd <file>
2. Скрипты /usr/share/make-initrd/tools/put-{file,tree} переместить в
/usr/bin и выделить в отдельный пакет. Например в put-file.
--
С уважением. Алексей.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 278 bytes --]
next prev parent reply other threads:[~2015-10-13 13:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 16:06 Aleksey Avdeev
2015-10-09 16:30 ` Aleksey Avdeev
2015-10-13 13:41 ` Aleksey Avdeev [this message]
2015-10-09 17:07 ` Dmitry V. Levin
2015-10-09 17:15 ` Aleksey Avdeev
2015-10-09 17:23 ` Dmitry V. Levin
2015-10-09 17:24 ` Aleksey Avdeev
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=561D0A23.3000908@solin.spb.ru \
--to=solo@solin.spb.ru \
--cc=devel@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
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git