CentOS + restoring from a dump
Ранее я писал о том как сдампить для бэкапа раздел с линуксом.
Недавно пришлось заняться восстановлением из этого дампа.
Система не грузилась и останавливалась с ошибкой kernel panic сразу после монтирования файловой системы.
Загрузился в режиме Rescue с СД, прогнал систему fsck – не помогло, мудрил с GRUB – не помогло, пробовал много других способов – не помогло :).
Решил восстановить из дампа. К этому моменту я уже записал CentOS 6.3 на болванку и загрузился в Rescue режиме в тексте.
Для ускорения процесса, заранее записал дамп на внешний юсб-винт.
Попытался смонтировать его в систему и тут меня ждал облом – неизвестная файловая система (NTFS). Я был в шоке – одна из самых распространенных систем не включена.
Для включения нужно было проделать некоторые манипуляции:
The default RPMforge repository does not replace any CentOS base packages. In the past it used to, but those packages are now in a separate repository (rpmforge-extras) which is disabled by default.
You can find a complete listing of the RPMforge package packages at http://packages.sw.be/
Download the rpmforge-release package. Choose one of the two links below, selecting to match your host’s architecture. If you are unsure of which one to use you can check your architecture with the command uname -i
i686 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
x86_64 http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
The preferred rpmforge-release package to retrieve and to install in order to enable that repository is one of the two listed above.
Install DAG’s GPG key
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txtIf you get an error message like the following the key has already been imported:
error: http://apt.sw.be/RPM-GPG-KEY.dag.txt: key 1 import failed.Verify the package you have downloaded
rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
Security warning: The rpmforge-release package imports GPG keys into your RPM database. As long as you have verified the md5sum of the key injection package, and trust Dag, et al., then it should be as safe as your trust of them extends.
Install the package
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpmThis will add a yum repository config file and import the appropriate GPG keys.
Then try to install something like this
yum install ntfs-3g
Успешно смонтировал диск.
Далее запустил восстановление:
cd /mnt/sysimage (не забываем перейти в раздел куда будет распаковываться дамп)
restore -rf /mnt/usb/linux.dump
Перегрузился – все заработало.
AT8000S/24 switches + slow DHCP Asterisk + creating a conference call