Re: Hard disk with /boot partition died, what to do?
Installing grub2 is simple, but I am not sure what can be done about the missing kernels which are inside /boot also. Especially since the system "thinks" they are already installed so not sure apt-get install can install them. But you can try.
And for future reference, you definitely took some bad advice about /boot. The thing is that /boot can't be inside raid0 mdadm array since with raid0 you split the data and I guess the boot files don't tolerate to be split in two.
But for raid1 on the contrary, it's recommended to keep /boot on the array because even with one disk dead the system goes on and gives you a chance to replace the failed disk. You can have /boot as separate mdX raid1 device, or inside your / mdX device, doesn't matter. Sometimes it's better to have it separate at the start of the disks to make sure the boot files are not too far from the beginning of the disk on large disks. Some older machines can't use boot files if beyond the 137GB mark on the disk.
Having said the above, you don't even need a new disk to try and save this, and later keep /boot inside /.
Boot the server with the live cd, add the mdadm package since it's not in the live cd, and if needed reassemble the array (make SURE you do NOT use --create, use --assemble like):
sudo mdadm --assemble --scan
After that mount the root mdX device on /mtn for example (temporary mount point). Open /mnt/etc/fstab (your server fstab) and comment the /boot line adding # at the beginning. That will make it ignore looking for the /boot partition on the dead disk.
After that create a boot folder inside root which in this case would be:
sudo mkdir /mnt/boot
Since there is no separate entry for /boot in fstab, the OS will try to use the boot folder inside /.
Then all you need to do is chroot into /mnt and try installing the latest kernel and grub2. If you need more detailed help with that, ask. I think the above general ideas should be the correct way to go.
Darko.
-----------------------------------------------------------------------
Ubuntu 18.04 LTS 64bit
Bookmarks