Quantcast
Viewing all articles
Browse latest Browse all 49146

Re: converting Linux server OpenSUSE 13.2 with kernel 3.16.7-29-desktop error : installGrub.sh failed with return code: 127, and message: FATAL: kernel too old

Hi, everybody,now  this problem is solved and costs me more than 3 days.I want to share the solution.

1 boot up thesystem from liveCD .

2 chroot to installed system.

  su - root

  mount /dev/system/newroot /mnt

  mount /dev/system/homenew /mnt/homenew

  mount /dev/sda1    /mnt/boot

  mount --rbind /proc /mnt/proc

  mount --rbind /sys  /mnt/sys

  mount --rbind /dev /mnt/dev

  chroot /mnt

3 change boot GPT partition attribute,so we can install boot loader into the boot disk.

   parted /dev/sda

   set 1 bios_grub on

4 check /etc/fstab and correct it if needed.

   use blkid to identify the uuid of each disk and partition.

   if the wrong disk UUID  is used to identify the disk or partition to mount,correct it.

   remove entries that  no longer exists.

5  check if modules mptbase,mptscsih,mptspi is built into initrd or not. if not,add those modules and rebuild initrd

   mkdir -p /tmp/initrd

   cp /boot/initrd-$(uname -r)  /tmp/initrd

   cd /tmp/initrd

   mv initrd-$(uname -r) initrd-$(uname -r).xz

   xz -d initrd-$(uname -r).xz

   ls -l lib/modules/$(uname -r)/kernel/drivers/messages/fushion |grep -i mpt

   add mptbase module into initrd if needed.

   vi /etc/sysconfig/kernel

   add modules in this line : INITRD_MODULES="megaraid_sas ata_piix lpfc ata_generic" and rebuild initrd image.

   make it like this here: INITRD_MODULES="megaraid_sas ata_piix lpfc ata_generic mptbase,mptscsih,mptspi"

  mkinitrd -v

6  replace all rescume=xxxxxx with rescume=norescume in /etc/grub2/grub.cfg or remove rescume=xxxx complete.this can also be done in yast.

 

7  reinstall boot loader

   grub2-mkconfig -o /boot/grub2/grub.cfg

   grub2-install /dev/sda

   make sure no errors occur.

8  reboot system and system should boot normally.

 

There is some information to be added here.

if step 3 is not done,then there will be an error " GPT partition xxxx " and failed when installing grub2 into disk。

if step  6 is not done, then  system will show "GRUB loading" and restart again endlessly after power on.

if step 5 is not done, then sysem will show errors below after grub loaded successfully.

  "Kernel panic - not syncing: VFS: Unable to mount root fs on unknow-block(0,0)"

This is because we are coverting an desktop linux which did not include mpt* (mptbase,mptscsih,mptspi) modules(which is the disk driver to vmware virtual disk) in the initrd image, when system trys to boot initrd image ,the disk can not be found.

Image may be NSFW.
Clik here to view.

 

After all those steps aredone, I'm able to boot the coverted system.


Viewing all articles
Browse latest Browse all 49146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>