我正在远程服务器上运行Ubuntu14.04。这是唯一安装的操作系统。在重新启动机器之前,我需要非常谨慎,因为KVM对服务器的访问非常棘手。
在GRUB更新期间,有人问我在哪里安装GRUB。磁盘上有Raid1。我不知道我该去哪里。
下面是挂载表:
# 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)下面是fdisk输出:
# 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发布于 2015-05-13 23:50:12
在VPS中,通常不安装GRUB。GRUB加载内核(除其他外)。如果您有一个OpenVZ或类似的环境,则不加载内核。内核在容器之间共享。您也不更新内核--实际上,它会被写保护,不受更新的影响。
在基于KVM的VPS中,这是另一回事。在这些情况下,您确实加载了内核。您可以通过检查您的合同--或者通过查看uname -a的输出,来找出您有哪些类型的VPS。OpenVZ内核通常会向内核版本中添加一个特定的字符串,比如2.6.26-1-openvz- add 64。
还请参阅https://stackoverflow.com/questions/1603351/should-i-choose-kvm-or-openvz-for-my-vps以比较这两种方法(有更多的方法,但它们不太常见)。
PS:这个答案与最初的问题有关,它位于VPS上的GRUB位置上。有关数据现载于对本答复的评论中。
https://unix.stackexchange.com/questions/203279
复制相似问题