ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Eugene Prokopiev <prokopiev@stc.donpac.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 12:14:04 +0300
Message-ID: <4411435C.3070003@ats-manager.stc.donpac.ru> (raw)
In-Reply-To: <440FC52A.50807@ats-manager.stc.donpac.ru>

Половину своей задачи я решил: в initrd все инициализируется правильно, 
но вот переключиться из initrd в настоящую систему я не могу.

Что я сейчас имею: ALM 2.4 + updates + некоторые backports + kernel 
2.6.14-std26-up-alt5 из Сизифа

Содержимое initrd:

# find ./
./
./etc
./dev
./dev/mapper
./dev/system
./dev/console
./dev/null
./dev/ram
./dev/systty
./dev/tty1
./dev/urandom
./dev/md0
./dev/md255
./dev/md1
./initroot
./loopfs
./sys
./proc
./bin
./bin/echo
./bin/insmod
./bin/losetup
./bin/modprobe
./bin/mount
./bin/sh
./bin/test
./bin/umount
./bin/cat
./bin/mknod
./bin/bash
./bin/lvm
./bin/strace
./bin/raidautorun
./bin/busybox-big
./lib
./lib/modules
./lib/modules/2.6.14-std26-up-alt5
./lib/modules/2.6.14-std26-up-alt5/kernel
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/md
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/md/dm-mod.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/md/raid1.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/ide-core.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/pci
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/pci/piix.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/pci/generic.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/ide-generic.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/ide-disk.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/fs
./lib/modules/2.6.14-std26-up-alt5/kernel/fs/mbcache.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/fs/jbd
./lib/modules/2.6.14-std26-up-alt5/kernel/fs/jbd/jbd.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/fs/ext3
./lib/modules/2.6.14-std26-up-alt5/kernel/fs/ext3/ext3.ko
./lib/modules/2.6.14-std26-up-alt5/kernel/fs/ext2
./lib/modules/2.6.14-std26-up-alt5/kernel/fs/ext2/ext2.ko
./lib/ld-linux.so.2
./lib/libc.so.6
./linuxrc
./var
./log

Содержимое linuxrc:

#!/bin/bash -x

/bin/insmod -f 
/lib/modules/2.6.14-std26-up-alt5/kernel/drivers/md/dm-mod.ko
/bin/insmod -f 
/lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/ide-core.ko
/bin/insmod -f 
/lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/pci/piix.ko
/bin/insmod -f 
/lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/pci/generic.ko
/bin/insmod -f 
/lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/ide-generic.ko
/bin/insmod -f 
/lib/modules/2.6.14-std26-up-alt5/kernel/drivers/ide/ide-disk.ko
/bin/insmod -f /lib/modules/2.6.14-std26-up-alt5/kernel/drivers/md/raid1.ko
/bin/insmod -f /lib/modules/2.6.14-std26-up-alt5/kernel/fs/mbcache.ko
/bin/insmod -f /lib/modules/2.6.14-std26-up-alt5/kernel/fs/jbd/jbd.ko
/bin/insmod -f /lib/modules/2.6.14-std26-up-alt5/kernel/fs/ext3/ext3.ko
/bin/insmod -f /lib/modules/2.6.14-std26-up-alt5/kernel/fs/ext3/ext2.ko

/bin/mount -t proc proc /proc
/bin/mount -t tmpfs -o size=1m none /dev/mapper
/bin/mount -t tmpfs -o size=1m none /dev/system
/bin/mount -t tmpfs -o size=1m none /etc
/bin/mount -t tmpfs -o size=1m none /var
/bin/mount -t ext2 -o rw /dev/md0 /log

/bin/raidautorun /dev/md255
/bin/mknod -m 600 /dev/mapper/control c 10 63

cat /proc/mdstat

/bin/lvm vgscan
/bin/lvm vgchange -ay

/initroot

/bin/umount /log
/bin/umount /var
/bin/umount /etc
/bin/umount /dev/system
/bin/umount /dev/mapper
/bin/umount /proc

Содержимое initroot (взято из оригинального initrd, сгенерированного 
посредством mkinitrd):

#!/bin/sh

EncodeDev()
{
         echo $(( ($2 & 0xff) | ($1 << 8) | (($2 & ~0xff) << 12) ))
}

read cmdline </proc/cmdline
cmdline=" $cmdline "
if test -z "${cmdline##*[        ]root=*}" ; then
         root="${cmdline##*[      ]root=}"
         root="${root%%[  ]*}"
         if test -z "${root##/dev/*}" ; then
                 root="${root#/dev/}"
                 (
                 read ignored
                 read ignored
                 while read major minor size name ignored; do
                         if test "$name" = "$root" ; then
                                 EncodeDev $major $minor 
 >/proc/sys/kernel/real-root-dev
                                 break
                         fi
                 done
                 ) </proc/partitions

         fi
fi

В итоге я получаю:

VFS: Cannot open root devoce "3a00" or unknown-block(58,0)
Please append a correct "root" boot option
Kernel panic - not syncing : VFS : Unable to mount root fs on unknown 
block(58,0)

Если вместо initroot в linuxrc вписать вызов /bin/bash, то дальше руками 
я смогу смонтировать свои lvm-разделы. Точно также их монтирует штатное 
ядро 2.4.26-std-up-alt13

Что делать дальше?

-- 
С уважением, Прокопьев Евгений



  reply	other threads:[~2006-03-10  9:14 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 [this message]
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
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=4411435C.3070003@ats-manager.stc.donpac.ru \
    --to=prokopiev@stc.donpac.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