1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| parted /dev/sda mktable msdos
fdisk -l /dev/sda Device Boot Start End Sectors Size Id Type /dev/sda1 2048 133120 131073 64M b W95 FAT32 (LBA) /dev/sda2 135168 1847296 1712129 836M 83 Linux
mkfs.vfat -F 32 /dev/sda1 mkfs.ext4 /dev/sda2
fixup4.dat start4.elf :适用于4B的引导程序 kernel8.img config.txt cmdline.txt :内核及启动配置文件 bcm2711-rpi-4-b.dtb overlays/ :设备树文件
mount /dev/sda1 /mnt/boot/ mount /dev/sda2 /mnt/root/ cp -r /home/pi/kernel/boot/* /mnt/boot/ cp -r $ROOTFS_PATH/* /mnt/root/
arm_64bit=1 kernel=kernel-kvm.img dtparam=audio=on dtoverlay=vc4-fkms-v3d max_framebuffers=2
console=serial0,115200 console=tty1 root=PARTUUID=c2d20ef0-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/resize.sh
ls -l /dev/disk/by-partuuid/ lrwxrwxrwx 1 root root 10 Dec 27 2019 c2d20ef0-01 -> ../../sda1 lrwxrwxrwx 1 root root 10 Dec 27 2019 c2d20ef0-02 -> ../../sda2
proc /proc proc defaults 0 0 PARTUUID=c2d20ef0-01 /boot vfat defaults 0 2 PARTUUID=c2d20ef0-02 / ext4 defaults,noatime 0 1
chmod 4755 /mnt/root/usr/bin/sudo
|