I’m trying to format a micro-SD to install Fedora on my Raspberry Pi 2. I’m following the instructions here.
But when I get to the part about building the swap partition, I’m getting an error message. This is the output of fdisk:
Command (m for help): p
Disk /dev/sdd: 29.7 GiB, 31914983424 bytes, 62333952 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: 0x0002ce31
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 264191 262144 128M b W95 FAT32
/dev/sdd2 264192 1312767 1048576 512M 82 Linux swap / Solaris
/dev/sdd3 1312768 62333951 61021184 29.1G 83 Linux
Now here’s what happens when I run mkswap:
[root@new-host-5 raspberry]# mkswap /dev/sdd2
mkswap: error: swap area needs to be at least 40 KiB
I’ve tried searching for a similar issue, but am coming up empty. Anyone have any ideas?
[Update a while later]
OK, I’ve decided that it’s a bad SD. But now I’ve got a new problem; I can’t mount the W95 FAT32 boot partition:
Disk /dev/sdd: 14.5 GiB, 15560867840 bytes, 30392320 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: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 264191 262144 128M b W95 FAT32
/dev/sdd2 264192 772095 507904 248M 82 Linux swap / Solaris
/dev/sdd3 772096 30392319 29620224 14.1G 83 Linux
Command (m for help): q
[root@new-host-5 raspberry]# mount -t fat32 /dev/sdd1 /tmp/rpi/boot/
mount: unknown filesystem type ‘fat32’
[root@new-host-5 raspberry]# mount -t auto /dev/sdd1 /tmp/rpi/boot/
mount: /dev/sdd1 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so.
It doesn’t work with “auto” or “vfat” either.
[Tuesday-morning update]
OK, not sure what the problem was, but after rebooting the machine, I managed to get it all to work. I haven’t actually tried booting the Pi, yet, though.