1

I am running Ubuntu 14.04 on a remote server. It's the only OS installed. I need to be super-cautious before rebooting the machine since KVM access to the server is quite tricky.

During a GRUB update, I am asked where to install GRUB. There is Raid1 on the disks. I am not sure where I should.

Here is the mount table:

# mount

/dev/md2 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/md1 on /boot type ext3 (rw)
/dev/md126 on /home type ext4 (rw,noexec,nosuid,nodev)
/dev/md127 on /backup type ext4 (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)

And, here is fdisk output:

# fdisk -l

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b5404

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    33556480    16777216+  fd  Linux raid autodetect
/dev/sdb2        33558528    34607104      524288+  fd  Linux raid autodetect
/dev/sdb3        34607105  1094607934   530000415   fd  Linux raid autodetect
/dev/sdb4      1094607935  3907029167  1406210616+   5  Extended
/dev/sdb5      1094607998  2154608764   530000383+  fd  Linux raid autodetect
/dev/sdb6      2154608828  3907029167   876210170   fd  Linux raid autodetect

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00044ee7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    33556480    16777216+  fd  Linux raid autodetect
/dev/sda2        33558528    34607104      524288+  fd  Linux raid autodetect
/dev/sda3        34607105  1094607934   530000415   fd  Linux raid autodetect
/dev/sda4      1094607935  3907029167  1406210616+   5  Extended
/dev/sda5      1094607998  2154608764   530000383+  fd  Linux raid autodetect
/dev/sda6      2154608828  3907029167   876210170   fd  Linux raid autodetect

Disk /dev/md127: 897.1 GB, 897104996352 bytes
2 heads, 4 sectors/track, 219019774 cylinders, total 1752158196 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md127 doesn't contain a valid partition table

Disk /dev/md0: 17.2 GB, 17171349504 bytes
2 heads, 4 sectors/track, 4192224 cylinders, total 33537792 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 536 MB, 536543232 bytes
2 heads, 4 sectors/track, 130992 cylinders, total 1047936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 542.6 GB, 542586207232 bytes
2 heads, 4 sectors/track, 132467335 cylinders, total 1059738686 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md126: 542.6 GB, 542586174976 bytes
2 heads, 4 sectors/track, 132467327 cylinders, total 1059738623 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md126 doesn't contain a valid partition table

1 Answer 1

0

In a VPS you do not usually install GRUB. GRUB loads the kernel (among other things). If you have an OpenVZ or similar environment, you do not load the kernel. The kernel is shared between containers. You also do not update the kernel -- and it will, in fact be write-protected from your updates.

In a VPS which is based on KVM this is a different matter. You do load the kernel in these cases. You can find out which type of VPS you have by checking your contract -- or by looking at the output of uname -a. OpenVZ kernels usually add a specific string, like 2.6.26-1-openvz-amd64, to the kernel version.

See also https://stackoverflow.com/questions/1603351/should-i-choose-kvm-or-openvz-for-my-vps for a comparison of the two approaches (there are more, but they are less common).

PS: This answer relates to the original question which was on GRUB location on a VPS. The relevant data is now in the comments to this answer.

14
  • Linux node1.sendika.org 3.13.0-52-generic #86-Ubuntu SMP Mon May 4 04:32:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    – mustafa
    Commented May 13, 2015 at 23:53
  • OK, looks like you may be on KVM. Please run dmesg | grep -i virtual, maybe we will see more (or dmesg | grep -i xen if the other grep does not show anything, to test for XEN).
    – Ned64
    Commented May 13, 2015 at 23:58
  • [ 0.000000] Booting paravirtualized kernel on bare hardware
    – mustafa
    Commented May 13, 2015 at 23:58
  • "bare hardware" suggests that this is not a VPS. Are you sure it is?
    – Ned64
    Commented May 14, 2015 at 0:01
  • 1
    OK, thanks for clearing that up - got me confused! You have a dedi(cated server), congrats! Well, the lvm does not run yet when the kernel is loaded, so you need to install GRUB to the underlying hard disk's partition table (nowadays usually the GPT of /dev/sda, but do check your setup!). You install it elsewhere if you wish to boot a different Linux (with its own GRUB) by chainloading it from GPT's GRUB.
    – Ned64
    Commented May 14, 2015 at 0:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .