PDA

Просмотр полной версии : перенос CentOS 5.11 на RocketRAID 620


Student14
24.12.2014, 15:50
Здравствуйте!

Возникла необходимость перенести CentOS 5.11 с hdd на RocketRAID 620.
Исходная разметка:
Disk Drive: /dev/sda
Size: 500107862016 bytes, 500.1 GB
sda1 Boot Primary Linux ext3 [/boot] 106.93
sda2 Primary Linux LVM 499998.33Загрузился с LiveCD CentOS 7

Закинул драйвера. Установил
rpm -i /tmp/kmod-rr62x-1.2-1.el7.elrepo.x86_64.rpm
insmod /usr/lib/modules/3.10.0-123.el7.x86_64/extra/rr62x/rr62x.ko

Драйвера установлены. райд виден = /dev/sdb.
Далее dd if=/dev/sda of=/dev/sdb bs=1G
Выключил ПК, отключил исходный диск, загрузился с ЛайвСД, установил драйвера...

Смонтировал с целью поправить GRUB# mkdir /mnt/r

# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2

# vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active

# mount /dev/VolGroup00/LogVol00 /mnt/r

# mount -B /proc /mnt/r/proc

# mount -B /dev /mnt/r/dev

# mount /dev/sda1 /mnt/r/boot

# chroot /mnt/r

# /sbin/grub
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> find /boot/grub/menu.lst
find /boot/grub/menu.lst

Error 15: File not found
grub> find /grub/stage1
find /grub/stage1
(hd0,0)
grub> root (hd0,0)
root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0,0)
setup (hd0,0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "install /grub/stage1 (hd0,0) /grub/stage2 p /grub/grub.conf "... succeeded
Done.
grub> quit
quit

# sync
# rebootво время загрузки получаю Kernel Panic...
...
Waiting for driver initialization.
Scanning and configuring dmraid supported devices
Scanning logical volumes
Reading all physical volumes. This may take a while...
No volume groups found
Activating logical volumes
Volume group "VolGroup00" not found
Trying to resume from /dev/VolGroup00/LogVol01
Unable to access resume device (/dev/VolGroup00/LogVol01)
Creating root device.
Mounting root filesystem.
mount: could not find filesystem ’/dev/root’
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmouatiug old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!Где я ошибся?

ТЕМА ЗАКРЫТА
РЕШЕНИЕ:
на тот случай если кому понадобится:
путь к исходникам драйвера: /src/rr62x
далее
# cd /src/rr62x/product/rr62x/linux"включаем" patchkernel в файле ../../../inc/linux/Makefile.def в строке 167 удаляем #
# nano ../../../inc/linux/Makefile.def...
в файле ../../../osm/linux/patch.sh мне пришлось закоментировать блок
#check to see if it is really a src dir
if [ ! -d ${KERNELDIR}/Documentation ] ; then
echo "The target directory ${KERNELDIR} is not a full kernel source tree."
exit 1
fiдалее как по инструкции
# make patchkernel
The target kernel version is 2.6
grep: ../../../arch/i386/defconfig: No such file or directory
Kernel source has been patched successfully.

# make install
make[1]: Entering directory `/usr/src/kernels/2.6.18-400.1.1.el5.centos.plus-x86_64'
CC [M] /src/rr62x/product/rr62x/linux/.build/os_linux.o
CC [M] /src/rr62x/product/rr62x/linux/.build/osm_linux.o
CC [M] /src/rr62x/product/rr62x/linux/.build/div64.o
CC [M] /src/rr62x/product/rr62x/linux/.build/hptinfo.o
CC [M] /src/rr62x/product/rr62x/linux/.build/config.o
LD [M] /src/rr62x/product/rr62x/linux/.build/rr62x.o
Building modules, stage 2.
MODPOST
WARNING: could not find /src/rr62x/product/rr62x/linux/.build/.him_magni.o.cmd for /src/rr62x/product/rr62x/linux/.build/him_magni.o
LD [M] /src/rr62x/product/rr62x/linux/.build/rr62x.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-400.1.1.el5.centos.plus-x86_64'
You made a module which is for current kernel 2.6.18-400.1.1.el5.centos.plus.
Deleting previous installed driver module rr62x...
Install the new driver module...
Removing conflicted driver module...
Updating module dependencies...Done.
Checking for initrd images to be updated...
#поскольку драйвера уже установлены (устройство /dev/sdb), то просто смонтировал, и скопировал новый initrd-2.6.18-400.1.1.el5.centos.plus.img
# mkdir /mnt/r
# mount /dev/sdb1 /mnt/r

# cp /boot/initrd-2.6.18-400.1.1.el5.centos.plus.img /mnt/r/
cp: overwrite `/mnt/r/initrd-2.6.18-400.1.1.el5.centos.plus.img'? y
#
# poweroffвыключил ПК, отключил исходный диск, включил...