On my Ubuntu Server 14.04 I have large mdadm RAID6 array, and tiny boot HDD. I want to get rid of that boot HDD, and boot system from USB flash drive.
Although I know it is possible to install Ubuntu on a USB flash drive - I don't want to do it in order to limit writes to USB drive (that's literally asking for reliability troubles on a server).
Is there any guidelines or tutorials or suggestions on how to only move my initial steps (GRUB, initrd image e.t.c) of Ubuntu boot to USB stick, and then have / mounted on this RAID array?
Just to clarify - I don't want to move my whole system partition to USB drive, I only want to move the bare minimum there to limit writes on USB stick.
1 Answer
Moving the boot files to the USB disk wouldn't be too difficult - Moving / would be a large project; Instead, I suggest you consider reinstalling Ubuntu.
If you're willing to reinstall Ubuntu (you don't have to format your array during the reinstall), we can accomplish this without too much difficulty:
- If you plan on not formatting the array, I suggest that you make a subdirectory on it, and move all the array's files into it. Since the array will be the new "/", any existing files will be found there, instead of the array's normal mountpoint.
- Make sure the USB drive is attached before booting the installer
- When configuring partitions:
- format the USB drive using a Linux filesystem (like ext4), and set its mountpoint to "/boot"
- Set the mountpoint of your array to "/" (If you want to keep the data on the array, make sure it's not makred to be formatted here.)
- When configuring the bootloader, make sure that GRUB is set to be installed on the USB drive's device. (If the USB drive is already "sda", this should be the default.)