Re: [opensuse] rebuilding initrd?



On 5/24/2010 10:15 AM, Leen de Braal wrote:
Hi all,

Having a problem with a system that will not boot.
Reason: mainboard broken and disks are now used on another mainboard, with
probably another chipset.
It contains a /dev/md0 as root-device, but when booting from the new mobo,
md0 is not available.

Booting with a rescue CD I can see the raid device /dev/md0
When I do these things after booting a rescue system, it seems to me that
the system is the way I want it:
====================
mount /dev/md0 /mnt,
mount /dev/sda1 /mnt/boot,
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys

chroot /mnt
====================

What command do I need to rebuild the initrd with the modules now loaded?
In /etc/sysconfig/kernel to me it seems to have the modules for the old mobo?

Seems like you did all the hard stuff already if you got all the way to manually booting an install kernel and setting up that complete of a chroot complete with bind mounts.

All I can see that's left is:

Within that chroot,
Run lsmod |less to see what modules you need for your hd's.
Edit /etc/sysconfig/kernel with the new modules. Definitely make sure it includes raid456 or raid10 or whatever raid level you're using. mikinitrd should automatically
Possibly edit /etc/fstab if the fs's were mounted by id or uuid and they changed.
Then just run mkinitrd.

Exit out of chroot & reboot.

--
bkw

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: [opensuse] rebuilding initrd?
    ... It contains a /dev/md0 as root-device, but when booting from the new ... chroot complete with bind mounts. ... glad you figured it out despite my unclear edit. ... The line "mkinitrd should automatically" was supposed to be deleted. ...
    (SuSE)
  • Re: [opensuse] rebuilding initrd?
    ... It contains a /dev/md0 as root-device, but when booting from the new ... chroot complete with bind mounts. ... To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
    (SuSE)
  • bootloaders selecting wrong video adapter [was: GRUB doesnt come up in new installation]
    ... I think that's what the problem is after installing lilo on ... by booting a live CD then using chroot. ... Unable to determine video adapter in use in the present system. ...
    (Debian-User)
  • rhel 5
    ... pls give me solution one linux machine not booting give the problem grub> ... when i use the rescuse mode give the error when chroot /mnt/sysimage ...
    (RedHat)
  • Re: Cron to email notification of ftp file upload?
    ... That is what I did but used chmod and not chroot. ... # DO NOT EDIT THIS FILE - edit the master and reinstall. ... Webmin can schedule cron stuff, ...
    (alt.os.linux)