ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] LVM в initrd для ядра 2.6.14-std26-up-alt5
Date: Fri, 10 Mar 2006 15:38:40 +0300
Message-ID: <20060310123840.GV2873@master.mivlgu.local> (raw)
In-Reply-To: <4411654E.9010600@ats-manager.stc.donpac.ru>

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

On Fri, Mar 10, 2006 at 02:38:54PM +0300, Eugene Prokopiev wrote:
> > Если оставлять старый механизм работы с initrd, нужно определить
> > major/minor нужного устройства в /dev, созданного утилитами lvm, и
> > записать его в /proc/sys/kernel/real-root-dev.
> 
> да, работает :)
> 
> > Можно перейти на новый механизм обработки initrd (root=/dev/ram0, linuxrc
> > запускается как init (pid==1) и должен смонтировать реальный root, после
> > чего выполнить pivot_root туда и exec /sbin/init).
> 
> в /root смонтирован настоящий /root (из /dev/system/root)
> 
> пишу
> 
> pivot_root /root /var/root
> или
> pivot_root /root /loopfs
> 
> мне заявляют Device or resource busy в первом случае и Invalid argument 
> во втором. В /var/root и /loopfs ничего нет - это пустые каталоги

Второй из каталогов должен быть на новом корне.

В man pivot_root написано, как правильно его применять, чтобы это работало
на всех ядрах.

> > Либо перейти на initramfs (примерно то же самое, но вместо pivot_root
> > выполняется chroot, и хорошо бы зачистить за собой initramfs, чтобы не
> > занимать память).
> 
> попробую.
> 
> как зачищать?

Чем-то типа

http://kernel.org/git/?p=libs/klibc/klibc.git;a=tree;h=2fada3e78ac03e588155bd40f31b672b93e52daa;hb=7a3728f1058a791118628ecc372fd3155ee3ec5e;f=usr/kinit/run-init

> это есть смысл делать только для initramfs?

Да (в остальных способах initrd либо отмонтируется и уничтожается самим
ядром, либо перемонтируется в каталог на реальном корне, откуда его можно
потом отмонтировать и сделать blockdev --flushbufs /dev/ram0 в стартовых
скриптах).

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-03-10 12:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-09  6:03 Eugene Prokopiev
2006-03-10  9:14 ` Eugene Prokopiev
2006-03-10  9:50   ` Eugene Prokopiev
2006-03-10  9:58   ` Sergey Vlasov
2006-03-10 11:38     ` Eugene Prokopiev
2006-03-10 12:38       ` Sergey Vlasov [this message]
2006-03-10 19:50         ` Eugene Prokopiev
2006-03-13 12:55       ` Eugene Prokopiev
2006-03-13 13:06         ` Eugene Prokopiev
2006-03-13 13:45         ` Sergey Vlasov
2006-03-13 15:03           ` Eugene Prokopiev
2006-03-13 15:22             ` Sergey Vlasov

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=20060310123840.GV2873@master.mivlgu.local \
    --to=vsu@altlinux.ru \
    --cc=sisyphus@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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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