从Live USB (16.04)启动后:
ubuntu@ubuntu:~$ sudo fdisk -l
[...]
Disk /dev/nvme0n1: 953.9 GiB, 1024209543168 bytes, 2000409264 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
Disklabel type: gpt
Disk identifier: C5CE78D6-06C1-4528-BF0F-098BAEE04CC0
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 2050047 999424 488M Linux filesystem
/dev/nvme0n1p3 2050048 2000408575 1998358528 952.9G Linux filesystem
[...]
# Later, de-crypting nvme0n1p3 and looking inside it:
ubuntu@ubuntu:~$ sudo cryptsetup luksOpen /dev/nvme0n1p3 n1p3
Enter passphrase for /dev/nvme0n1p3:
ubuntu@ubuntu:~$ sudo vgscan
Reading all physical volumes. This may take a while...
Found volume group "ubuntu-vg" using metadata type lvm2
ubuntu@ubuntu:~$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu-vg -wi-a----- 867.47g
swap_1 ubuntu-vg -wi-a----- 63.85g
ubuntu@ubuntu:~$ sudo vgchange -ay ubuntu-vg
2 logical volume(s) in volume group "ubuntu-vg" now active
ubuntu@ubuntu:~$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu-vg -wi-a----- 867.47g
swap_1 ubuntu-vg -wi-a----- 63.85g
ubuntu@ubuntu:~$ mkdir /tmp/n1p3
ubuntu@ubuntu:~$ sudo mount /dev/ubuntu-vg/root /tmp/n1p3
ubuntu@ubuntu:~$ ls /tmp/n1p3
bin cdrom data etc initrd.img lhome lib32 libx32 measurements mnt proc run snap sys usr vmlinuz
boot core dev home initrd.img.old lib lib64 lost+found media opt root sbin srv tmp var vmlinuz.old
ubuntu@ubuntu:~$
问题:
- /dev/nvme0n1 的前 2048 个扇区是什么?
- /dev/nvme0n1p1 中有什么?
- /dev/nvme0n1p2 中有什么?
- swap_1 中有什么?