Direct disk booting from block storage
I was curious to know if anyone has attempted to direct disk boot from a block storage device. Has it been successful?
To clarify a bit, I refer to direct disk booting as booting from a device with an MBR. I have been unable to achieve this with a fresh install of Arch Linux, using syslinux as my bootloader and ext4 as the file systems. As the syslinux documentation requires, I disabled 64bit mode on the boot ext4 file system, and the partition table I used was MBR. I properly configured syslinux and set my root device as the block storage device, then attempted to boot. That failed. However, when I created a disk on the Linode itself and used pv to image the block storage device to the newly created disk, I was able to direct disk boot successfully.
Since the exact image was used on both disks, I can only conclude that block storage devices are unable to direct disk boot at this time, which isn't stated in the documentation anywhere that I'm aware of, and also, has no warning in the cloud manager when attempting this setup. It simply fails silently.
Is this a bug, or are block storage devices unable to direct disk boot? Or, am I doing something wrong, and someone, somewhere, has succeeded?
Also, as a side note, I unintentionally booted from the block storage device while the Linode's disk was being used as the root, and the boot device. It occurred because, as an exact image, each disk had the same labels for file systems, and I had the block storage device unintentionally as one of the disks in the configuration at that time.
If anyone has any questions or wants to clarify any information, you are welcome to ask.
Hey Blake -
You can boot directly from a Block Storage Volume, so what I wanted to do was pass along our guide that explains the method for doing so:
Boot a Linode from a Block Storage Volume
The above link will instruct you on how to duplicate your primary disk to the Volume and then set it, itself, as the primary.
I hope this works for you. Please feel free to report back to let us know if you were able to get this to work.
I have booted directly from a block storage volume before, using that guide to do so. It works perfectly as long as you're using Grub or a Linode kernel. However, the problem comes when you attempt to use direct disk to boot from an MBR and partitioned block storage device. This works perfectly on the Linode's disk, but if using the block storage device as the boot and root drive, it simply fails silently.
The same means I used to image the primary disk over to a block storage disk, was how I imaged the block storage disk I wanted to direct disk boot from, over to the primary disk of the Linode. With the exact same image on the block storage device and on the Linode disk, I could direct disk boot only from the Linode's disk, not the block storage disk.
Hopefully that helps to clarify things a bit.
Also, the guide doesn't mention that direct disk booting of a block storage device is supported, it doesn't mention it at all. I presumed from that, that I would be able to achieve this, but no luck so far.
Here's another little test I tried for this, and confirmed that booting direct disk from a block storage device will fail.
I created a disk image of Arch Linux, a very minimal install about 1.1GB in size. I partitioned it and created a Linode, removed all created disks, created a raw disk image, then set the configuration profile to boot direct disk, disabled all distro helpers, then booted into rescue mode with the raw image mounted as
/dev/sda and downloaded the image.
curl http://vrnw.org/arch.img | dd of=/dev/sda
I successfully booted into the profile. Arch Linux came up on Lish, as expected. Next, I created a block storage device, 10GB in size. I booted into rescue mode with the raw disk image mounted as
/dev/sda and the block storage device mounted as
/dev/sdb. Copy the image.
pv < /dev/sda > /dev/sdb
I then replaced the raw disk with the block storage device in my profile and rebooted. It silently failed. As a final test, I removed all disk images from the Linode and mounted the block storage device as
/dev/sda in rescue mode and downloaded the image again. I then tried to reboot with the block storage device using direct disk, and mounted as
/dev/sda in my profile. Again, this silently failed.
If anyone wants to try this, the image is still up at the above URL. I plan to keep it up for a week or so. There is no root password, no network access. This image was strictly made to see if booting would be successful from a block storage device in direct disk mode. So far, it is not.
If there are any questions or clarification wanted, feel free to ask me.
I too believe that block storage has undocumented limitations with respect to booting. I my case I am trying to boot a Live image in iso form. I created a volume and transferred a bootable image. I've check the md5sum of the resulting storage and it looks good. However attempts to boot the image just results in the VM powering off after a few seconds and and activity feed entry stating the node "could not be rebooted with config <blah>".</blah>
Is there a way to get more detailed logs from the boot attempt?