Direct to Disk - How to choose boot device?

When moving from the Linode kernels to Direct to Disk, how does KVM know which device to boot from? Does it a always boot from /dev/sda? Or can I create a separate boot device, say on /dev/sdc, install the MBR there, and boot from that device?

I ask, because it would be nice to be able to have a separate image for booting, and only mount it on /boot when updating the kernel. This would also provide a convenient way to test out different kernels. Each could live in its own boot image.

4 Replies

Linode Staff

The idea is that the "root device" inside the Configuration Profile becomes the "boot device" selector, when using Direct Disk mode.

I know there have been changes made to that code recently to improve this - it may have been deployed today. If not, it's staged code and will be avail very soon.

-Chris

I assumed that with a new KVM we should be changing fstab entries from /dev/sd[abc…] to UUID's? I did this before accepting the KVM today. This upgrade seemed to go OK. Am I correct about using UUID's; e.g., will this be required soon?

Linode Staff

There is nothing specific about using UUIDs in either Xen or KVM Linodes. If you want to roll with UUIDs, you can - but by no means is it necessary.

-Chris

UUID is not necessary, but only if you use the "distro-helper".

This is what happened in a test linode after I switched to KVM:

Only in etc.after/event.disabled: hvc0.conf
diff -ru etc.before/fstab etc.after/fstab
--- etc.before/fstab    2015-06-13 13:16:59.000000000 +0200
+++ etc.after/fstab    2015-06-13 13:23:09.000000000 +0200
@@ -6,8 +6,8 @@
 #
 # <file system=""><mount point=""><type><options><dump><pass>proc        /proc        proc    defaults                       0 0
-/dev/xvda   /            ext4    noatime,errors=remount-ro      0 1
-/dev/xvdb   none         swap    sw    
+/dev/sda   /            ext4    noatime,errors=remount-ro      0 1
+/dev/sdb   none         swap    sw    
 none            /tmp            tmpfs   mode=1777       0       0
 none /var/cache/apt       tmpfs mode=755                    0       0
 none /var/lib/apt/lists   tmpfs mode=755                    0       0
Only in etc.before/init: hvc0.conf
Only in etc.after/init: ttyS0.conf</pass></dump></options></type></mount></file> 

There are two kinds of changes here:

  • The /etc/init thing. This is only for upstart, used mainly by old Ubuntu releases. Not required anymore if the distro is recent enough.

  • The /etc/fstab thing. Modifying /etc/fstab is not required at all when using UUID.

So I would say that UUID and systemd have made distro-helper to be obsolete.

IMHO, switching to KVM would have been a good opportunity to start deprecating distro-helper and start using UUID, like everybody else.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct