Skip to main content

Nadgradnja Fedora Core 9 na Fedora Core 10 z YUM

10. verzija operacijskega sistema Fedora Core je že dosegljiva. Sledijo navodila, kako nadgraditi iz vezije 9 preko YUM-a, če ne uporabljaš grafičnega vmesnika:

$ yum update
$ yum clean all
$ rpm -Uvh http://ftp.heanet.ie/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/fedora-release-10-1.noarch.rpm http://ftp.heanet.ie/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/fedora-release-notes-10.0.0-1.noarch.rpm
$ yum -y update

Možni so razni zapleti. Jaz sem recimo imel naložen še stari paket Avahi za FC7, ki je povzorčil “dependency” problem, podobno pa je bilo pri paketu Clamd. Ko sem razrešil ta problem, sem lahko normalno namestil FC10. na koncu samo še narediš ponovni zagon in upaš, da bo vse vredu.

grubby fatal error: unable to find a suitable template

Občasno sem tudi admin, ki skrbi za nekaj strežnikov na katerih teče operacijski sistem Fedora Core, trenutno verzija 9. Imam linux (software) raid. Na vseh strežnikih imam nastavljeno avtomatsko posodabljanje preko YUM-a. Problem se je začel pojavljati na nekaterih strežnikih po nadgradnji iz verzije 8 v 9. Nadgradnje sem izvedel preko interneta in ni bilo problemov. Čez nekaj časa pa sem v logih zasledil sledečo napako pri nadgradnji kernela:

grubby fatal error: unable to find a suitable template

Poskusil sem namestiti kernel preko RPM-ja in dobil enako sporočilo o napaki. Preveril sem grub.conf in ugotovil, da potrebnih vrstic za zagon z novim kernelom, ni vpisanih.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,0)
#          kernel /boot/vmlinuz-version ro root=/dev/md0
#          initrd /boot/initrd-version.img
#boot=/dev/md0
password –md5 $1$MNOLL$tWHHwFquNUxCK/YoJ.Ggoj/
timeout=5
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.24.4-64.fc8)
root (hd1,0)
kernel /boot/vmlinuz-2.6.24.4-64.fc8 ro root=LABEL=/
initrd /boot/initrd-2.6.24.4-64.fc8.img

Če to storim ročno se sistem ne naloži in se ustavi pri inicializaciji gonilnikov, ker ne najde root-a (update).

Waiting for driver initialization.
Loading pata_acpi module
Waiting for driver initialization.
Trying to resume from /dev/sdc3
No suspend signature on swap, not resuming.
Creating root device.
Mounting root filesystem.
mount: error mounting /dev/root on /sysroot as ext3: No such file or directory
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
Mount failed for selinuxfs on /selinux: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Booting has failed.

Spodaj je del namestitve iz RPM-ja z dodanim -vvv:

D: adding 1 entries to Installtid index.
D: opening db index /var/lib/rpm/Sigmd5 create mode=0x42
D: adding 1 entries to Sigmd5 index.
D: opening db index /var/lib/rpm/Sha1header create mode=0x42
D: adding “4bd647eca284f320c65982b6662e59a87ba6a3a5” to Sha1header
index.
D: opening db index /var/lib/rpm/Filemd5s create mode=0x42
D: adding 2157 entries to Filemd5s index.
D: install: %post(kernel-2.6.26.6-79.fc9.i586) asynchronous
scriptlet start
D: install: %post(kernel-2.6.26.6-79.fc9.i586) execv(/bin/sh) pid 9671
++ uname -i
++ uname -i
+ ‘[‘ i386 == x86_64 -o i386 == i386 ‘]’
+ ‘[‘ -f /etc/sysconfig/kernel ‘]’
+ /bin/sed -i -e
‘s/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/’
/etc/sysconfig/kernel
+ /sbin/new-kernel-pkg –package kernel –mkinitrd –depmod
–install 2.6.26.6-79.fc9.i586
grubby fatal error: unable to find a suitable template
D: install: waitpid(9671) rc 9671 status 0 secs 61.688
D: running post-transaction scripts
D: Expected size: 18876201 = lead(96)+sigs(344)+pad(0)+data(18875761)
D: Actual size: 18876201
D: kernel-2.6.26.6-79.fc9: Header V3 DSA signature: OK, key ID 6df2196f
D: (null): %posttrans(kernel-2.6.26.6-79.fc9.i586) synchronous
scriptlet start
D: (null): %posttrans(kernel-2.6.26.6-79.fc9.i586) execv(/bin/sh)
pid 13149
+ /sbin/new-kernel-pkg –package kernel –rpmposttrans
2.6.26.6-79.fc9.i586
D: (null): waitpid(13149) rc 13149 status 0 secs 0.206
D: closed db index /var/lib/rpm/Pubkeys
D: closed db index /var/lib/rpm/Filemd5s
D: closed db index /var/lib/rpm/Sha1header
D: closed db index /var/lib/rpm/Sigmd5
D: closed db index /var/lib/rpm/Installtid
D: closed db index /var/lib/rpm/Provideversion
D: closed db index /var/lib/rpm/Requireversion
D: closed db index /var/lib/rpm/Dirnames
D: closed db index /var/lib/rpm/Triggername
D: closed db index /var/lib/rpm/Conflictname
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Requirename
D: closed db index /var/lib/rpm/Group
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: May free Score board((nil))
[root@dok boot]#

[root@dokumentko ~]# /sbin/fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       30401   244196001   83  Linux

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000bc374

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         637     5116671   fd  Linux raid autodetect
/dev/sdb2             638       29635   232926435   fd  Linux raid autodetect
/dev/sdb3           29636       29762     1020127+  82  Linux swap / Solaris
/dev/sdb4           29763       30401     5132767+   5  Extended
/dev/sdb5           29763       30401     5132736   fd  Linux raid autodetect

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c1fa7

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1         637     5116671   fd  Linux raid autodetect
/dev/sdc2             638       29635   232926435   fd  Linux raid autodetect
/dev/sdc3           29636       29762     1020127+  82  Linux swap / Solaris
/dev/sdc4           29763       30401     5132767+   5  Extended
/dev/sdc5           29763       30401     5132736   fd  Linux raid autodetect

Disk /dev/md0: 5239 MB, 5239341056 bytes
2 heads, 4 sectors/track, 1279136 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/md2: 5255 MB, 5255856128 bytes
2 heads, 4 sectors/track, 1283168 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md1: 238.5 GB, 238516568064 bytes
2 heads, 4 sectors/track, 58231584 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn’t contain a valid partition table

[root@dokumentko ~]# mount
/dev/md0 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/md1 on /home type ext3 (rw)
/dev/md2 on /backup type ext3 (rw)
/dev/sda1 on /backup_home type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

[root@dokumentko ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
LABEL=home /home ext3 defaults 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=SWAP-sdb3 swap swap pri=0 0 0
LABEL=SWAP-sda3 swap swap pri=0 0 0
LABEL=backup /backup ext3 suid,dev,exec 0 0
LABEL=backup_home /backup_home ext3 suid,dev,exec 0 0

[root@dokumentko ~]# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid1 sdc2[1] sdb2[0]
232926336 blocks [2/2] [UU]

md2 : active raid1 sdb5[0]
5132672 blocks [2/1] [U_]

md0 : active raid1 sdb1[0] sdc1[1]
5116544 blocks [2/2] [UU]

unused devices:

[root@dokumentko ~]# fdisk /dev/md0
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x1c05d888.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

The number of cylinders for this disk is set to 1279136.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help):

Enako oppozorilo dobim za md1 in md2. Obstoječi kernel (2.6.24.4-64.fc8) se normalno zažene. Je možno, da je do kakšne napake prišlo pri nadgradnji iz fc8 na fc9? V čem je problem?

Reblog this post [with Zemanta]