Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jun 06, 2015 8:46 pm 
Offline
Senior Member

Joined: Fri Feb 13, 2015 8:12 pm
Posts: 101
Today I created a temporary linode to test pv-grub with xen.

I made a Debian 8 "deployment" in /dev/xvda and another one in /dev/xvdc.
Then I booted with a menu entry like this one:
Code:
title   Debian GNU/Linux, kernel 3.16.0-4-amd64
root    (hd0)
kernel  /boot/vmlinuz-3.16.0-4-amd64 root=UUID=f5cea9b5-6b12-4b1a-880d-6f134d917473 ro
initrd  /boot/initrd.img-3.16.0-4-amd64

I expected that it would boot the Debian install at /dev/xvda but to my surprise, it booted /dev/xvdc instead.

The reason: Both deployments had the same UUID!

The UUID is supposed to be random, it's not supposed to be duplicate in the same system.

The UUID thing was created to survive disk name changes (for example, /dev/xvda to /dev/vda when moving from Xen to KVM), so it is a good thing and it should be supported.

Fixing this should be quite easy indeed: Create the partition like this:
Code:
uuid=`uuidgen`
mkfs.ext4 -U ${uuid} /dev/whatever

Then instead of a fixed /etc/fstab, generate it with a template, like this:
Code:
sed -e "s/ROOTUUID/${uuid}/" /mnt/etc/fstab.in > /mnt/etc/fstab
rm -f /mnt/etc/fstab.in

You get the idea. Alternatively, use "tune2fs -U randomuuid" after mkfs.ext4 and something like the above replace with sed.

The good thing is that there is no initrd to regenerate, so this is probably everything that needs to be done.

Thanks.


Top
   
PostPosted: Fri Jun 12, 2015 6:05 am 
Offline
Newbie

Joined: Thu Feb 25, 2010 9:24 pm
Posts: 3
How did you do the deployment?


Top
   
PostPosted: Fri Jun 12, 2015 9:11 am 
Offline
Senior Member

Joined: Fri Feb 13, 2015 8:12 pm
Posts: 101
Dashboard -> Deploy an image -> Debian 8 (now oddly called Debian 8.1, as Debian 7 continues to be Debian 7)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group