检查 /boot 是否为独立分区

检查 /boot 是否为独立分区

我不明白,我如何拥有或不拥有单独的 /boot 分区?

alex@me:~$ sudo fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000a1bc4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048  1506224127   753111040   83  Linux
/dev/sda2      1946028030  1953523711     3747841    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda3      1506224128  1946025983   219900928    7  HPFS/NTFS/exFAT
/dev/sda5      1946028032  1953523711     3747840   82  Linux swap / Solaris

Partition table entries are not in disk order
alex@me:~$ sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       707G  273G  399G  41% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            1.8G   12K  1.8G   1% /dev
tmpfs           353M  908K  352M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.8G  760K  1.8G   1% /run/shm
none            100M   28K  100M   1% /run/user

答案1

如果/boot是单独的分区,则会在df -h输出下列出。如果/boot出现在Mounted on列下,则说明它是一个单独的分区。如果没有,则说明它不是。

答案2

除了查看 df -h 的输出之外,您还可以查看 /etc/fstab 的内容

例如这是我的:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdb1 during installation
UUID=3aa66d3b-c382-40be-9e8e-a3e9fa59c55c /boot           ext2    defaults        0       2
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0

正如你所见,倒数第二行是我的 /boot 分区

相关内容