PDA

View Full Version : 14.04 LTS Server - Boot Vulnerability



Johnco2
April 18th, 2016, 07:32 PM
I run an LVM/mdmraid server on an HP N40L acting as a media server and as backup for various Macs & Windows machines.
When I set it up (with 12.04 LTS) the recommendation was to boot from a USB stick containing Grub2 & the OS.
This has proved the Achilles heel of the system because backing up the USB requires the use of dd and, twice now, the usb superblock has been corrupted on both the source and the destination USB at the same time. I have not found the 'restore from Live CD' process easy and would like to avoid it. The restore process appears to be the only solution as ,as far as I am aware, there is no recovery from a corrupt superblock if the backup copies (dd seems to wipe these) are not available apart from a complete fdisk on the drive (wiping all the data).


Does anyone know of a documented way of reliably moving the boot process onto the existing LVM/Raid or, alternatively, reducing the USB stick to simply boot with all the operating system files being on the LVM/Raid.


At this moment, the system is up even though fsck.ext4 highlights the bad superblock.

ian-weisser
April 19th, 2016, 02:42 AM
The system cannot read an LVM filesystem until after boot. That's one of the disadvantages of LVM.

Your /boot directory needs to be unencrypted, and on a non-LVM device (USB stick) or non-LVM partition carved out of one of your HDDs.
GRUB needs to know the location of your /boot.

SeijiSensei
April 19th, 2016, 03:31 PM
Do you have an old hard drive lying around that you could insert into the machine onto which you could load the OS and /boot? That would be the easiest solution by far. Make that device the primary in the BIOS and install a new version of Linux. I'd go with 14.04LTS server at this point, though 16.04 is probably close enough to release that you can try that instead. Server versions are pretty stable compared to desktop versions.

Johnco2
April 19th, 2016, 07:32 PM
Thanks - I’ll try the spare hard drive method.


I already have /home, /opt, /usr and /var moved to the lvm array. Would you recommend moving, for example /etc before installing the new Linux onto the hard drive. I guess I’m trying to avoid re-installing apps like Netatalk which I had to build and configure.