![]() Extract the tarball into the system’s (bootable fat32 2GB) partition: `cd /run/media/bray/4F85-22E7` `tar -zxvf ~/Downloads/alpine-rpi-3.14.` *(Substitute directories and filenames.)*.Run lsblk to verify both partition mount points.Eject and remove the MicroSD, and then plug it on again.Download Alpine Linux for Raspberry Pi ( aarch64 for Raspberry Pi 4 B).Number Start End Size Type File system Flagsġ 1049kB 2000MB 1999MB primary fat 32 boot, lbaĢ 2001MB 63, 9GB 61, 9GB primary ext 4 Flash Alpine Linux Into the MicroSD Card Verify the MicroSD card’s state with sudo parted /dev/sdd print again, it should end up with a scheme like this: Model: Generic STORAGE DEVICE (scsi).Build a fat32 filesystem on partition 1 and an ext4 filesystem on partition 2: `sudo mkfs.vfat -F 32 /dev/sdd1` `sudo mkfs.ext4 /dev/sdd2`.*(Replace `64g` with the size of your MicroSD card, ex.: `16g`.)* Create the storage partition (62GB): `sudo parted /dev/sdd mkpart primary 2001 64g`.Add boot and lba flags to the system’s partition: `sudo parted /dev/sdd set 1 boot on `.Create the system partition (2GB): `sudo parted /dev/sdd mkpart primary 1 2g`.*(You may run `sudo parted /dev/sdd print` anytime to observe the changes applied.)* Create MBR partitioning scheme on the MicroSD card: ` sudo parted / dev/ sdd mklabel msdos`.Sector size (logical/physical): 512B/ 512B Sample output: Error: /dev/ sdd: unrecognised disk label Verify that the device has no label applied and an empty partition table: `sudo parted /dev/sdd print`. ![]() Erase filesystem/partition-table signatures: `sudo wipefs -af /dev/sdd`.Remove the partition(s): `sudo parted /dev/sdd rm 1` *(Repeat that for other existent partitions if needed, replacing `1` with the partition number.)*.`sudo umount /dev/sdd?*` *(If the device has more than one partition mounted.)* ![]() Unmount the partition(s): `sudo umount /dev/sdd1`.Notice that sdd is the 64gb MicroSD card (in this case), and it hasįrom now on, you may copy/paste the commands, but remember to replace sdd with the MicroSD disk name identified on your machine.Take note of the output, plug the MicroSD card into your computer and run lsblk again.Do not plug it into your computer and run the command: `lsblk`.The storage partition: A ext4 partition occupying the rest of the MicroSD card capacity, to use as persistent storage for the users and for the data generated by the services the Raspberry Pi may serve. The system partition: A fat32 partition, with boot and lba flags, on a small part of the MicroSD card, enough to store the system and the applications (suggested 256MB to 2GB). The goal is to have a MicroSD card containing two partitions: ![]() Create a Bootable MicroSD Card With Two Partitions
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |