Hi Chris,
On Thu, May 28, 2009 at 06:59:28PM +0100, Chris Dennis wrote:
Andy Smith wrote:
Hi Chris,
On Thu, May 28, 2009 at 12:40:06PM +0100, Chris Dennis wrote:
In my case, the error message is
/boot/grub$ sudo update-grub
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/sda1.
grub-probe: error: Cannot find a GRUB drive for /dev/sda1. Check your
device.map.
Does both /dev/sda and /dev/sda1 exist?
/dev/sda doesn't:
$ ls -l /dev/sd*
brw-rw---- 1 root disk 8, 1 2009-03-17 00:56 /dev/sda1
brw-rw---- 1 root disk 8, 2 2009-03-17 00:56 /dev/sda2
I saw the previous posts about this, which referred to /dev/xvda,
(whatever that is) and wasn't sure how that translated to a situation
using /dev/sda.
A bit of history:
Obviously your virtual machine requires some block devices, and in
the earlier days since Linux tended to expect everything to be a
SCSI block device (even IDE devices by this point). So it seemed
sensible to just present them as /dev/sd* even though they were
really Xen paravirtual block devices.
When the various virtualisation techniques were making some progress
on being integrated into the upstream kernel, it was decided that
since there was going to be a/some paravirtual block device drivers
there then they really should have their own devices. That's why
the name changed to /dev/xvd*.
Functionally there is no difference, and it is best if you refer to
filesystems by UUID or label so that the block devices can be
renamed and you don't have to care.
Which name of block device you have is set in your Xen domain's
config in BitFolk's dom0 servers so you can't just change it (but
you don't need to).
It seems you will need to create /dev/sda to make update-grub happy.
What is the mantra for creating /dev/sda ? I've
never understood
major/minor numbers...
You would do it like this:
# cd /dev && mknod sda b 8 0
# chown root:disk /dev/sda
# chmod 660 /dev/sda
In this instance the major/minor numbers don't matter, in fact sda
(or xvda) will never be used as it doesn't exist, this is purely to
make update-grub and other scripts happy.
In future I am looking at exporting a disk device instead which is
partitioned. It makes access in dom0 a little more tricky but it's
what the VM's kernel expects to see so will reduce confusion there.
I just need to make sure I can still do things like take snapshots
and grow filesystems.
Cheers,
Andy
--
http://bitfolk.com/ -- No-nonsense VPS hosting
Q. How many mathematicians does it take to change a light bulb?
A. Only one - who gives it to six Californians, thereby reducing the problem
to an earlier joke.