我安装什么并不重要。即使安装 tmpfs (使用mount -vt tmpfs none /mnt
)也不起作用。
我正在尝试在 VirtualBox VM 中安装 Gentoo,但在安装根分区(使用mount -v /dev/sda2 /mnt
)后一切都停止工作。它破坏了 btrfs、ext4、vfat 和 xfs。
mount
返回没有任何错误并打印mount: /dev/sda2 mounted on /mnt.
。
安装后,甚至运行ls
打印-bash: ls: command not found
。
我尝试了 2021 年 7 月 25 日和 2021 年 8 月 1 日的 ISO。
我使用 GPT 分区表并在 VirtualBox 设置中启用了 EFI。禁用 EFI 没有帮助。
# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.7
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 41943040 sectors, 20.0 GiB
Model: VBOX HARDDISK
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 7AAC6D43-015D-458A-866E-B6CEEB08FDC9
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 41943006
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00 EFI system partition
2 1050624 41943006 19.5 GiB 8300 Linux filesystem
答案1
gentoo live cd 将 cd 安装到 /mnt/livecd 并在那里安装符号链接 /bin 和 co。在 /mnt 上安装任何内容都会使这些符号链接无效并使其无法运行任何程序/命令。
# ls -l /
total 0
lrwxrwxrwx 1 root root 15 Aug 2 15:22 bin -> /mnt/livecd/bin
lrwxrwxrwx 1 root root 16 Aug 2 15:22 boot -> /mnt/livecd/boot
drwxr-xr-x 14 root root 3720 Aug 2 15:23 dev
drwxr-xr-x 58 root root 2460 Aug 2 15:23 etc
drwxr-xr-x 2 root root 60 Aug 1 17:11 home
drwxr-xr-x 2 root root 40 Aug 2 15:23 initramfs
lrwxrwxrwx 1 root root 15 Aug 2 15:22 lib -> /mnt/livecd/lib
lrwxrwxrwx 1 root root 17 Aug 2 15:22 lib64 -> /mnt/livecd/lib64
drwxr-xr-x 6 root root 120 Aug 2 15:22 mnt
lrwxrwxrwx 1 root root 15 Aug 2 15:23 opt -> /mnt/livecd/opt
dr-xr-xr-x 165 root root 0 Aug 2 15:22 proc
drwx------ 2 root root 100 Aug 1 17:55 root
drwxr-xr-x 14 root root 460 Aug 2 15:23 run
lrwxrwxrwx 1 root root 16 Aug 2 15:22 sbin -> /mnt/livecd/sbin
dr-xr-xr-x 13 root root 0 Aug 2 15:22 sys
drwxrwxrwt 5 root root 100 Aug 2 15:23 tmp
lrwxrwxrwx 1 root root 15 Aug 2 15:22 usr -> /mnt/livecd/usr
drwxr-xr-x 9 root root 220 Aug 1 17:57 var
# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=1405030,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on / type tmpfs (rw,relatime)
/dev/sr0 on /mnt/cdrom type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)
/mnt/cdrom/image.squashfs on /mnt/livecd type squashfs (ro,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh,name=openrc)
none on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)