Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

Upgrade 2.1 to 2.2 "missing operating system"

Pages: 1 2

VM on vSphere clean install 2.1, after upgrade to 2.2 a have missing operating system.

Can you mount the boot disk as a secondary disk on another vm and check the following:

mount /dev/sdX2 /mnt/part2

then check the following
ls /mnt/part2
this should show the root file system

ls /mnt/part2/boot
should the following ( new kernel + initrd image )
grub initrd.img-4.12.14-08-petasan vmlinuz-4.12.14-08-petasan

what is the output of (if it exists)
cat /mnt/part2/boot/grub/grub.cfg

ls /mnt/part2/boot/
grub initrd.img-4.12.14-08-petasan vmlinuz-4.12.14-08-petasan

 

cat /mnt/part2/boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  fd150c2b-c1ac-49f6-a30c-26688578c151
else
search --no-floppy --fs-uuid --set=root fd150c2b-c1ac-49f6-a30c-26688578c151
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-fd150c2b-c1ac-49f6-a30c-26688578c151' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  fd150c2b-c1ac-49f6-a30c-26688578c151
else
search --no-floppy --fs-uuid --set=root fd150c2b-c1ac-49f6-a30c-26688578c151
fi
linux   /boot/vmlinuz-4.12.14-08-petasan root=/dev/sda2 ro quiet net.ifnames=0 quiet net.ifnames=0
initrd  /boot/initrd.img-4.12.14-08-petasan
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-fd150c2b-c1ac-49f6-a30c-26688578c151' {
menuentry 'Debian GNU/Linux, with Linux 4.12.14-08-petasan' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.12.14-08-petasan-advanced-fd150c2b-c1ac-49f6-a30c-26688578c151' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  fd150c2b-c1ac-49f6-a30c-26688578c151
else
search --no-floppy --fs-uuid --set=root fd150c2b-c1ac-49f6-a30c-26688578c151
fi
echo    'Loading Linux 4.12.14-08-petasan ...'
linux   /boot/vmlinuz-4.12.14-08-petasan root=/dev/sda2 ro quiet net.ifnames=0 quiet net.ifnames=0
echo    'Loading initial ramdisk ...'
initrd  /boot/initrd.img-4.12.14-08-petasan
}
menuentry 'Debian GNU/Linux, with Linux 4.12.14-08-petasan (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.12.14-08-petasan-recovery-fd150c2b-c1ac-49f6-a30c-26688578c151' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  fd150c2b-c1ac-49f6-a30c-26688578c151
else
search --no-floppy --fs-uuid --set=root fd150c2b-c1ac-49f6-a30c-26688578c151
fi
echo    'Loading Linux 4.12.14-08-petasan ...'
linux   /boot/vmlinuz-4.12.14-08-petasan root=/dev/sda2 ro single nomodeset quiet net.ifnames=0
echo    'Loading initial ramdisk ...'
initrd  /boot/initrd.img-4.12.14-08-petasan
}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

I checked upgrading a 2.1 to 2.2 as a VM in vSphere and it is working here.

The listing you posted looks good. Maybe the boot loader failed to install, can you try the following while the disk is mounted in the second VM:

mount --bind /sys /mnt/part2/sys
mount --bind /proc /mnt/part2/proc
mount --bind /dev /mnt/part2/dev

chroot /mnt/part2/ grub-install --target=i386-pc --modules="ext2 part_gpt" /dev/sdX

where sdX is the drive the failed disk is seen as in the second VM.  Does the command complete successfully  ? If so remove it from the second VM and use in the original VM as first disk ( sda ), double check the disk order.

Let me know how this goes.

Note if this is a production system, you can re-install 2.1 on a new VM os/disk and do a "Replace Management Node"  deployment if it is node 1-3, else do a Join. After deployment you can move the old OSD vmdks (if any) to the new VM and restart.

 

I take ubuntu live CD:

root@ubuntu-server:~# mount /dev/sda2 /mnt/part2

root@ubuntu-server:~# chroot /mnt/part2/ grub-install --target=i386-pc --modules="ext2 part_gpt" /dev/sda2

Installing for i386-pc platform

grub-install: error: cannot find a device for /boot/grub (is /dev mounted?)

 

I try the from "hirens boot cd" different linux distro and get the same error

sdX is the drive the failed disk is seen as in the second VM

enter the drive like /dev/sda /dev/sde   ...not a partition

sdX is the drive the failed disk is seen as in the second VM

OK

enter the drive like /dev/sda /dev/sde   ...not a partition

YES

root@ubuntu-server:~# mount /dev/sda2 /mnt/part2

root@ubuntu-server:~# chroot /mnt/part2/ grub-install --target=i386-pc --modules="ext2 part_gpt" /dev/sda

Installing for i386-pc platform

grub-install: error: cannot find a device for /boot/grub (is /dev mounted?)

The same error.

did you perform the bind mounts to /dev /sys as per earlier post ?

Sorry, my wrong mounts))

Now a have:

Installing for i386-pc platform

grub-install: warning: Your embedding area is unusually small. core.img won't fit in it..

grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.

grub-setup: error: will not proceed with blocklists.

The 386-pc by itself is not an issue,  it specifies mbr/bios partition. the error itself is strange. we also did an upgrade on vms in vSphere and they worked. can you give more detail: what version of vmware, any special disk settings that may help us reproduce this.

again if this was a production system, i suggest you re-deploy a new vm with 2.1 and do a replace management node

Pages: 1 2