ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Nick S. Grechukh" <gns@altlinux.ru>
To: "ALT Devel discussion list" <devel@lists.altlinux.org>
Subject: Re: [devel] propagator - diet vs glibc
Date: Sun, 4 Feb 2007 11:56:17 +0200
Message-ID: <a4ab440f0702040156ja9de5a8uc0604bb779b8fef@mail.gmail.com> (raw)
In-Reply-To: <45C35141.6070004@altlinux.org>

2007/2/2, Mikhail Yakshin <greycat@altlinux.org>:
> Nick S. Grechukh пишет:
> Они примерно так:
> Выборочные + запакованные ~ 2.5 мега
> Выборочные + незапакованные ~ 9-10 мегов
> Все + запакованные ~ 10-11 мегов
> Все + незапакованные ~ 35-50-55 мегов
понятно. mar чем хорош, из него вытягивается без распаковки.

> Отсюда и решать, сколько не жалко требовать с пользователя.
> Кстати, относительно pivot'а в propagator - он делается так:
>
>          /* overmount image under new root if needed */
>          if ( statfs(IMAGE_LOCATION, &sfs) )
>                  fatal_error("statfs "IMAGE_LOCATION);
>          /* if something is mounted under IMAGE_LOCATION ? */
>          if ( sfs.f_type != RAMFS_MAGIC && sfs.f_type != TMPFS_MAGIC ) {
>                  if ( mount(IMAGE_LOCATION, "." IMAGE_LOCATION, NULL,
> MS_MOVE, NULL) )
>                          fatal_error("overmounting image location");
>                  /* test for nested mount: disk or nfs with iso image */
>                  if ( statfs(IMAGE_LOCATION, &sfs) )
>                          fatal_error("nested statfs "IMAGE_LOCATION);
>                  if ( sfs.f_type != RAMFS_MAGIC && sfs.f_type !=
> TMPFS_MAGIC )
>                          if ( mount(IMAGE_LOCATION, "." IMAGE_LOCATION
> "/isolinux", NULL, MS_MOVE, NULL) )
>                                  fatal_error("overmounting nested image
> location");
>          }
>
>          umount("/sys");
>          umount("/proc/bus/usb");
>          umount("/proc");
>
>          /* Delete rootfs contents */
>          if ( nuke_dir("/") )
>                  fatal_error("nuking initramfs contents");
>
>          /* Overmount the root */
>          if ( mount(".", "/", NULL, MS_MOVE, NULL) )
>                  fatal_error("overmounting root");
>
>          /* chroot, chdir */
>          if (chroot(".") || chdir("/"))
>                  fatal_error("chroot");
>
> Судя по вот этому вызову nuke_dir - если он действительно отрабатывает и
> у нас ramfs/tmpfs - то все должно быть хорошо. Просто мы поднимаем
> планку минимального количества памяти, на которой запустится наш новый
> propagator.

это написано в filesystems/ramfs-rootfs-initramfs.txt
  - When switching another root device, initrd would pivot_root and then
    umount the ramdisk.  But initramfs is rootfs: you can neither pivot_root
    rootfs, nor unmount it.  Instead delete everything out of rootfs to
    free up the space (find -xdev / -exec rm '{}' ';'), overmount rootfs
    with the new root (cd /newmount; mount --move . /; chroot .), attach
    stdin/stdout/stderr to the new /dev/console, and exec the new init.

а пропагатор именно initramfs.

  reply	other threads:[~2007-02-04  9:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02 10:19 Nick S. Grechukh
2007-02-02 11:33 ` Konstantin A. Lepikhov
2007-02-02 11:40   ` Nick S. Grechukh
2007-02-02 11:45     ` Konstantin A. Lepikhov
2007-02-02 11:53       ` Nick S. Grechukh
2007-02-04 22:13         ` [devel] [JT] " Michael Shigorin
2007-02-04 22:43           ` Денис Смирнов
2007-02-02 11:33 ` [devel] " Mikhail Yakshin
2007-02-02 11:42   ` Nick S. Grechukh
2007-02-02 11:46     ` Mikhail Yakshin
2007-02-02 11:55       ` Nick S. Grechukh
2007-02-02 11:57         ` Mikhail Yakshin
2007-02-02 12:02           ` Nick S. Grechukh
2007-02-02 14:29             ` Mikhail Yakshin
2007-02-02 14:37               ` Nick S. Grechukh
2007-02-02 14:57                 ` Mikhail Yakshin
2007-02-04  9:56                   ` Nick S. Grechukh [this message]
2007-02-04 22:16                     ` Michael Shigorin
2007-02-05 11:05                       ` Nick S. Grechukh
2007-02-02 14:32 ` Nick S. Grechukh
2007-02-04 11:54 ` Nick S. Grechukh

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=a4ab440f0702040156ja9de5a8uc0604bb779b8fef@mail.gmail.com \
    --to=gns@altlinux.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