ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Денис Смирнов" <mithraen@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] hasher и пакет dev.
Date: Fri, 16 Feb 2007 12:53:54 +0300
Message-ID: <20070216095354.GB10280@mw.local.seiros.ru> (raw)
In-Reply-To: <3f60a830702151523v4b8493a3n82f1f3cda0142782@mail.gmail.com>

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

On Fri, Feb 16, 2007 at 11:23:47AM +1200, Alexey Borovskoy wrote:

AB> У меня livecd несет в себе тарбол минимальной системы. Потом тарбол
AB> разворачивается на целевую систему, делается chroot в нее, затем
AB> устанавливается lilo. И тут всё останавливается, лило хочет /dev/hda к
AB> примеру.

Это я решаю тем, что создаю такие устройства тем самым скриптом, который
делает чрут. Для всех storage этот скрипт создает вроде вполне даже
правильные девайсы.

#!/bin/sh
#=============================================================================#
#                      Create nodes for storage devices                       #
#=============================================================================#
PREFIX=$1
set +e
T=`mktemp /tmp/mk_devices.XXXXXX`
for s in `ls -1 /sys/block`; do
    echo -n "/bin/mknod $PREFIX/dev/$s b " >> $T
    cat /sys/block/$s/dev | sed 's/:/ /' >> $T
    for part in `ls -1 /sys/block/$s | grep ^$s`; do
    	echo -n "/bin/mknod $PREFIX/dev/$part b " >> $T
		cat /sys/block/$s/$part/dev | sed 's/:/ /' >> $T
    done
done

#=============================================================================#
#                           Create misc devices                               #
#=============================================================================#
mkdir -p $PREFIX/dev/cpu/0
mknod $PREFIX/dev/cpu/0/msr c 202 0 2> /dev/null
# for internet access via ppp
mknod $PREFIX/dev/ppp		c 108 0  2> /dev/null

# create tty devices
mknod $PREFIX/dev/ptmx		c 5 2 2> /dev/null
mknod $PREFIX/dev/console	c 5 1 2> /dev/null
mknod $PREFIX/dev/tty		c 5 0 2> /dev/null
for s in 1 2 3 4 5 6 7 8; do
	mknod $PREFIX/dev/tty$s c 4 $s 2> /dev/null
done


/bin/sh $T 2>&1 | grep -v 'File exists'
rm -f $T


-- 
С уважением, Денис

http://freesource.info
----------------------------------------------------------------------------
Сизиф он и есть Сизиф. Вечно чего-нибудь не предусмотришь ;)
		-- inger in sisyphus@

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

  parent reply	other threads:[~2007-02-16  9:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15  5:11 Alexey Borovskoy
2007-02-15  7:23 ` Anton Farygin
2007-02-15 22:10   ` Alexey Borovskoy
2007-02-15  8:27 ` Mikhail Yakshin
2007-02-15 22:15   ` Alexey Borovskoy
2007-02-15 22:23     ` Michael Shigorin
2007-02-15 23:11       ` Alexey Borovskoy
2007-02-16  8:27         ` Michael Shigorin
2007-02-15 22:31     ` Dmitry V. Levin
2007-02-15 23:23       ` Alexey Borovskoy
2007-02-15 23:33         ` Dmitry V. Levin
2007-02-15 23:48           ` Alexey Borovskoy
2007-02-16  7:54             ` Anton Farygin
2007-02-16  8:32           ` [devel] next version Michael Shigorin
2007-02-16  7:55             ` Kirill A. Shutemov
2007-02-16  8:38             ` [devel] [JT] " Slava Dubrovskiy
2007-02-16  8:51             ` [devel] " Anton Farygin
2007-02-16 10:36             ` Денис Смирнов
2007-02-16  9:53         ` Денис Смирнов [this message]
2007-02-16 10:17           ` [devel] hasher и пакет dev Dmitry V. Levin
2007-02-16 10:32             ` Денис Смирнов
2007-02-16 11:20               ` Konstantin A. Lepikhov
2007-02-16 13:24                 ` Денис Смирнов
2007-02-16 23:49       ` [devel] I: hsh-fakedev Dmitry V. Levin
2007-02-15 10:37 ` [devel] hasher и пакет dev Денис Смирнов
2007-02-15 20:27 ` Konstantin A. Lepikhov

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=20070216095354.GB10280@mw.local.seiros.ru \
    --to=mithraen@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