ext2
文件系统适合/boot
分区吗?我设置ext4
了/ root
分区,但不确定为 /boot 分区选择哪个文件系统,我只是设置外部2。在这种情况下重要吗?
答案1
仅当您要使用古老的 GRUB 时才重要,只有 GRUB2 支持 ext4。
ext2 简单、健壮且支持良好,这使其成为 /boot 的不错选择。
答案2
概括:ext2 对于 来说是一个糟糕的选择/boot
,因为(除非我遗漏了某些东西或者非常不幸)它似乎阻止了 GRUB2 的“正常”更新。
细节:
今天我正在更新一台 2010 年老式笔记本电脑
- 运行 Debian 发行版 (LMDE2)
随 win7 一起提供,我使用非托管 Linux
/boot
分区和托管 (LVM2-on-LUKS) 分区进行双引导:$ sudo fdisk -l Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: dos ... Device Boot Start End Sectors Size Id Type /dev/sda1 2048 34818047 34816000 16.6G 27 Hidden NTFS WinRE /dev/sda2 * 34818048 239618047 204800000 97.7G 7 HPFS/NTFS/exFAT /dev/sda3 239618048 240642047 1024000 500M 83 Linux /dev/sda4 240642048 976773119 736131072 351G 5 Extended /dev/sda5 240644096 976773119 736129024 351G 83 Linux $ df -h Filesystem Size Used Avail Use% Mounted on /dev/dm-2 20G 12G 7.2G 62% / ... /dev/sda3 485M 73M 387M 16% /boot /dev/mapper/LVM2_crypt-home 322G 292G 31G 91% /home
即,/dev/sda5
~= /dev/dm-2
:它是一个 LUKS 加密分区,LVM2 在其中管理根分区、交换分区和主分区。
$ mount | grep -e '^/dev/'
/dev/sda3 on /boot type ext2 ...
/dev/mapper/LVM2_crypt-root on / type ext4 ...
/dev/mapper/LVM2_crypt-home on /home type ext4 ...
(请注意/dev/sda3 on /boot type ext2
上述内容。)我今天进行软件包更新/升级的经验(在 debian 盒子上,如果这有影响的话):
包管理器想要更新内核、GRUB 和libc
;具体来说,包
base-files
grub-common
grub-pc
grub-pc-bin
grub2-common
linux-compiler-gcc-4.8-x86
linux-headers-3.16.0-4-amd64
linux-headers-3.16.0-4-common
linux-image-3.16.0-4-amd64
linux-kbuild-3.16
linux-libc-dev
软件包安装似乎进展顺利,直到
Setting up grub-common (2.02~beta2-22+deb8u1) ...
Setting up grub2-common (2.02~beta2-22+deb8u1) ...
Setting up grub-pc-bin (2.02~beta2-22+deb8u1) ...
Setting up grub-pc (2.02~beta2-22+deb8u1) ...
Installing for i386-pc platform.
Installation finished. No error reported.
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
大约在这一点上,我的控制台进入字符模式图形以显示一个带有 title=Configuring grub-pc
和 body=的对话框
GRUB failed to install to the following devices:
/dev/dm-2
Do you want to continue anyway? If you do, your computer may not start up properly.
Writing GRUB to boot device failed - continue?
我点击按钮=否,现在想知道如何{最好,破坏性最小}
- 从 ext2 更新我的 /boot
- 更新GRUB2