Difference between revisions of "SD Card"

From krtkl wiki
Jump to navigation Jump to search
Line 30: Line 30:
  
 
=== Partitioning the SD Card (<tt>fdisk</tt>) ===
 
=== Partitioning the SD Card (<tt>fdisk</tt>) ===
 +
 +
Before partitioning the SD card, any partitions that have been mounted on the system must be unmounted. This can be done using the <tt>umount</tt> command.
 +
 +
<pre>umount /dev/sdb1</pre>
 +
 +
Once the SD card has been located, we can partition it for the Linux system (''BOOT'' partition) and root filesystem (''ROOTFS'' partition) using <tt>fdisk</tt>. <tt>fdisk</tt> must be run with root permissions (<tt>sudo</tt>) using the disk parent as the argument (do not use the parition number in the argument).
 +
 +
==== BOOT Partition ====
 +
 +
 +
==== ROOTFS Partition ====

Revision as of 03:08, 23 April 2016

Formatting SD Card

Use fdisk to format the SD card.

Locating SD Card on System

The mount command can be used to locate the SD card device, once it has been connected to the host computer. In the example below, an SD card has been connected on /dev/sdb1 and mounted at /media/user/UNTITLED.

user@ubuntu:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=russellbush)
/dev/sdb1 on /media/user/UNTITLED type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077, utf8=1,showexec,flush,uhelper=udisks2)

Partitioning the SD Card (fdisk)

Before partitioning the SD card, any partitions that have been mounted on the system must be unmounted. This can be done using the umount command.

umount /dev/sdb1

Once the SD card has been located, we can partition it for the Linux system (BOOT partition) and root filesystem (ROOTFS partition) using fdisk. fdisk must be run with root permissions (sudo) using the disk parent as the argument (do not use the parition number in the argument).

BOOT Partition

ROOTFS Partition