Решено: Проблема с загрузкой нового ядра (переход с 2.4 на 2.6)

Knoppix

Модераторы: Warderer, Модераторы разделов

wolverine
Сообщения: 5

Решено: Проблема с загрузкой нового ядра

Сообщение wolverine »

Предыстория.
Стоял Etch с ядром 2.4 + Firebird 1.5 - возникла проблема - с какой то переодичностью начались биться базы.
Решил обновить его до 2.0 хотя бы и Lenny.
Поправил соурс лист на архив.дебиан, обновился до последних пакетов, поставил ядро 2.6.18 для 686, поправил lilo.conf
Перезапускаюсь и ...
местный энекейщик присылает мне текст загрузки

begin: Running /scripts/local-premount
done.
Usage: mod probe -и дальши пишуться ключи и х там много прописано потом
modprobe -r [-n] [-i] [v] <modulename> ...
modprobe -l -t <dirname> [ -a <modulename> ...]
mount: Cannont read /etc/fstab: No such file or directory
Begin: Running /scripts/local-bottom ...
Done.
Done.
Begin: Running /scripts/local-bottom ...
mount mounting /root/dev/ on /dev/.static/dev failed: No such file or directorymount
Done
mount mounting /sys om /root/sys failed: No such file or directorymount
mount mounting /proc on /root/proc failed: No such file or directorymount
Target filesystem doesn`t have /sbin/init

Старое ядро грузится без проблем.
На системе стоит софтовый раид в зеркало

:~# fdisk -l
Disk /dev/md/0: 79.9 GB, 79998877696 bytes
2 heads, 4 sectors/track, 19530976 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/md/0p1 ? 233721421 254807611 84344761 69 Unknown
Partition 1 does not end on cylinder boundary.
/dev/md/0p2 ? 212689936 446425119 934940732+ 73 Unknown
Partition 2 does not end on cylinder boundary.
/dev/md/0p3 ? 322 322 0 74 Unknown
Partition 3 does not end on cylinder boundary.
/dev/md/0p4 360710145 360716696 26207+ 0 Empty
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Disk /dev/ide/host0/bus1/target0/lun0/disc: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/ide/host0/bus1/target0/lun0/part1 * 1 155010 78125008+ fd Linux raid autodetect
/dev/ide/host0/bus1/target0/lun0/part2 155011 158816 1918224 82 Linux swap / Solaris

Disk /dev/ide/host0/bus0/target0/lun0/disc: 81.9 GB, 81963220480 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/ide/host0/bus0/target0/lun0/part1 * 1 9726 78124063+ fd Linux raid autodetect
/dev/ide/host0/bus0/target0/lun0/part2 9727 9964 1911735 82 Linux swap / Solaris

:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md/0 / ext3 errors=remount-ro 0 0
/dev/discs/disc0/part2 none swap sw 0 0
/dev/discs/disc1/part2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0

По инету поискал, вроде пишут надо fsck -yv запускать, но что то побаиваюсь на рабочей то системе.
:~# fsck /
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
/dev/md/0 is mounted.

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? no

check aborted.

:/# cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a "#", and everything on the line after them are ignored.

8139too
ide-scsi
sr_mod
sg
md
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Решено: Проблема с загрузкой нового ядра

Сообщение sash-kan »

изложу всё, что пришло в голову после прочтения поста:
у вас и какие-то проблемы с raid-ом и незагружающееся ядро 2.6.18
может быть, не грузится оно именно из-за проблем с raid-ом
хотя не исключены и варианты (или их набор): проблемы у lilo с новым ядром, неправильно указан root в параметрах ядру, некорректно сформирован initrd, не включены нужные модули в initrd·

что бы я делал в такой ситуации?
во-первых, уточню, что я понятия не имею, какие функции у вас выполняет текущая система и исхожу из того, что минимальные (ну, допустим, шлюз + база данных + сайт)·
учитывая очень большую древность программ, стоящих в системе, я бы не взялся за обновление системы, а сразу бы поставил stable (на другой диск, естественно) и произвёл бы настройку системы, поглядывая на то, что стоит в текущей· базу данных и содержимое сайта, естественно, скопировал бы целиком и разбирался с возможными неувязками по ходу дела·
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
wolverine
Сообщения: 5

Re: Решено: Проблема с загрузкой нового ядра

Сообщение wolverine »

sash-kan писал(а):
23.07.2011 18:57
у вас и какие-то проблемы с raid-ом и незагружающееся ядро 2.6.18
может быть, не грузится оно именно из-за проблем с raid-ом
хотя не исключены и варианты (или их набор): проблемы у lilo с новым ядром, неправильно указан root в параметрах ядру, некорректно сформирован initrd, не включены нужные модули в initrd·

Сервер используется просто под базы + хранилище.
Установить все на новое железо конечно хорошо, только до города этого мне 2 дня пути ((
initrd ставился вместе с ядром, т.е. вручную я его никак не ковырял.
может какие модули следует включать мысли есть?

:~# cat /etc/lilo.conf

Код: Выделить всё

# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# ---------------       `install-mbr(8)', `/usr/share/doc/lilo/',
#                       and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# |                        !! Reminder !!                         |
# |                                                               |
# | Don't forget to run `lilo' after you make changes to this     |
# | conffile, `/boot/bootmess.txt', or install a new kernel.  The |
# | computer will most likely fail to boot if a kernel-image      |
# | post-install script or you don't remember to run `lilo'.      |
# |                                                               |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
#    bios=0x81

#disk=/dev/sda
#    bios=0x80

# Specifies the boot device.  This is where Lilo installs its boot
# block.  It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/md/0

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/md/0

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller.  Using `compact' is especially recommended when
# booting from a floppy disk.  It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=menu

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration.  If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well.  Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like.  If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress.  `single-key' goes with the `alias' lines in the
# `image' configurations below.  eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
#       prompt
#       single-key
#       delay=100
#       timeout=100

# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
vga=normal

# Kernel command line options that apply to all installed images go
# here.  See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""

# Boot up Linux by default.
#
default=Linux

image=/vmlinuz
        label=Linux
        initrd=/initrd.img
        read-only

image=/vmlinuz.old
        label=LinuxOLD
        read-only
#       restricted
#       alias=1

image=/vmlinuz.old1
        label=LinuxOLD1
        read-only
        optional
#       restricted
#       alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
#       label=HURD
#       restricted
#       alias=3
Спасибо сказали:
Аватара пользователя
Atolstoy
Сообщения: 1655
Статус: Tux in the rain
ОС: Linux x86_64

Re: Решено: Проблема с загрузкой нового ядра

Сообщение Atolstoy »

Не на новое железо, а просто на другой жёсткий диск.
Всего лишь 26 литров пива достаточно человеку для удовлетворения ежедневной потребности в кальции. Здоровое питание - это так просто!
http://atolstoy.wordpress.com
Спасибо сказали:
wolverine
Сообщения: 5

Re: Решено: Проблема с загрузкой нового ядра

Сообщение wolverine »

Atolstoy писал(а):
25.07.2011 10:27
Не на новое железо, а просто на другой жёсткий диск.

Это не принципиально на самом деле. ((
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: Решено: Проблема с загрузкой нового ядра

Сообщение sash-kan »

Код: Выделить всё

image=/vmlinuz
        label=Linux
        initrd=/initrd.img
        read-only
вы проверяли, что это именно нужный intird? и почему у него такое месторасположение — в корне? корень ведь на raid-е· у вас /boot тоже на raid-е?
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
wolverine
Сообщения: 5

Re: Решено: Проблема с загрузкой нового ядра

Сообщение wolverine »

sash-kan писал(а):
25.07.2011 16:28

Код: Выделить всё

image=/vmlinuz
        label=Linux
        initrd=/initrd.img
        read-only
вы проверяли, что это именно нужный intird? и почему у него такое месторасположение — в корне? корень ведь на raid-е· у вас /boot тоже на raid-е?

Да, корень на райде.
:/$ ls -l

Код: Выделить всё

итого 4716
drwxr-xr-x  2 root root     4096 2011-07-21 09:54 bin
drwxr-xr-x  2 root root     4096 2011-07-25 16:21 boot
drwxr-xr-x  1 root root        0 1970-01-01 06:00 dev
drwxrwsr-x  3 root staff    4096 2009-12-07 12:55 home
drwxr-xr-x  2 root root     4096 2004-06-29 11:42 initrd
drwx------  2 root root    16384 2004-06-29 11:35 lost+found
drwxr-xr-x  7 root root     4096 2011-07-25 17:13 root
drwxrwxrwt  3 root root     4096 2011-07-26 09:32 tmp
lrwxrwxrwx  1 root root       28 2011-07-20 16:38 initrd.img -> boot/initrd.img-2.6.18-6-686
-rw-r--r--  1 root root  4729823 2011-07-20 16:38 initrd.img-2.6.18-6-686.bak
lrwxrwxrwx  1 root root       25 2011-07-20 16:38 vmlinuz -> boot/vmlinuz-2.6.18-6-686
lrwxrwxrwx  1 root root       19 2005-06-15 18:50 vmlinuz.old -> boot/vmlinuz-2.4.31
lrwxrwxrwx  1 root root       20 2011-07-20 16:42 vmlinuz.old1 -> /boot/vmlinuz-2.4.26


intird даже пересобирать пытался
:~# update-initramfs -u

Код: Выделить всё

update-initramfs: Generating /boot/initrd.img-2.6.18-6-686
W: mdadm: I am supposed to start /dev/md/0 from the initial ramdisk,
W: mdadm: yet I cannot find the array in the configuration file.
W: mdadm: I am thus reverting to starting all arrays.
Added Linux *
Added LinuxOLD
Added LinuxOLD1
The boot record of /dev/md/0 has been updated.

Спасибо сказали:
wolverine
Сообщения: 5

Re: Решено: Проблема с загрузкой нового ядра

Сообщение wolverine »

Вообщем проблему решил - она в варингах и не правильной точке монтирования в mdadm.conf
Нашел решения Здесь
Спасибо сказали: