This page (revision-24) was last changed on 2021-04-21 06:16 by Murray Altheim

This page was created on 2021-03-27 21:00 by Murray Altheim

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
24 2021-04-21 06:16 12 KB Murray Altheim to previous
23 2021-04-21 06:14 12 KB Murray Altheim to previous | to last
22 2021-04-21 06:13 12 KB Murray Altheim to previous | to last
21 2021-04-17 03:16 11 KB Murray Altheim to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 22 changed one line
! Finding Your SD Card
! Find Your SD Card
At line 94 changed one line
! Find Your SD Card
! Find Your SD Card (Again)
At line 96 changed one line
Using the instructions above with fdisk, locate your SD card.
Using the instructions [above|#section-HowToBackupAnSdCard-FindYourSDCard] with fdisk, locate your SD card.
In my case, it turns out that the new card mounted at {{/dev/sdd}}.
At line 100 added one line
At line 105 added 11 lines
So we delete any partitions on the SD card (we'll use "/dev/sdd" but you should substitute the mount point you found):
{{{
sudo fdisk /dev/sdd
}}}
This responds with a prompt, where you type "d":
{{{
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
}}}
If you have multiple partitions on the SD card you can select the partitions or simply repeat the command until the SD card has no more partitions.
At line 117 added 19 lines
Now check to see what your SD card looks like:
{{{
Disk /dev/sdd: 14.6 GiB, 15665725440 bytes, 30597120 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
Disk identifier: 0x334dade7
}}}
Now, to create a single FAT32 partition, type "n", selected "p" for primary, then accepted all the defaults:
{{{
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-30597119, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-30597119, default 30597119):
At line 137 added 19 lines
Created a new partition 1 of type 'Linux' and of size 14.6 GiB.
}}}
Now we'll set the partition type to FAT32. The command is "t", and you can list all the available types with "L". The label for "W95 FAT32" is "b" so we'll respond with "b":
{{{
Hex code (type L to list all codes): b
Changed type of partition 'Linux' to 'W95 FAT32'.
}}}
Now, write the changes you've made to the SD card:
{{{
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
}}}
So, we've created a partition but it's not net formatted. So let's format our new partition using the {{mkfs.vfat}} according to the specifications you've configured:
{{{
sudo mkfs.vfat /dev/sdd1
}}}
You'll note we're using "sdd1" rather than "sdd" because we're formatting the first (and only) ''partition'', not the ''drive'' itself.
At line 157 added 10 lines
! Copy the Raspberry Pi OS Image to the SD Card
Now that you've got a freshly-formatted SD card mounted (we'll assume here at {{/dev/sdd}} but may be different for you), we can restore our image file to that SD card using the {{dd}} command:
{{{
sudo dd if=/home/altheim/Desktop/rpi-backup-20210328.img of=/dev/sdd bs=4M status=progress
}}}
The awake among you will note that this reverses the {{if}} and {{of}} argument values from when we made the backup, since we're just reversing the process.