SlideShare a Scribd company logo
1 of 5
Download to read offline
Partitioning the uSD card for uSD card booting in Beaglebone Black
Use adaptor or card reader for accessing micro sd card in PC, Insert the card to the PC and
open the terminal for partioning the sd card.
Use the below command for partitioning/viewing the partitions already present in sd card:
$sudo fdisk /dev/sdb
It is not neccessary to be “sdb”, if you were using one or two usb ports already, check which
is your card port, it may be “sdb” or “sdc” depends on your usage of ports. After using the
above command, you will get like this:
Command (m for help):
Now use option 'p' to view the partitions of sd card, since we are using new sd card, it will
display like this below:
Command (m for help): p
Disk /dev/sdb: 7901 MB, 7901020160 bytes
244 heads, 62 sectors/track, 1020 cylinders, total 15431680 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
Command (m for help): 
Note the number of bytes : 7901020160, it will be used while calculation of cylinder.
Now use the option 'x' , it will goes to the Expert command mode, give values as below
Command (m for help): x
Expert command (m for help): h
Number of heads (1­256, default 244): 255
Expert command (m for help): s
Number of sectors (1­63, default 62): 63
Expert command (m for help): c
Number of cylinders (1­1048576, default 1020): 961
Expert command (m for help): r
Command (m for help):
After entering the values option 'r' use to return to normal mode.
Partitioning the uSD card for uSD card booting in Beaglebone Black
Calculation for No.of.cylinders = Total.no.of.bytes on sd card/head/sector/512
= 7901020160/255/63/612 = 961 (rounded)
1. Creation of First Partition:
To create a new partition, use option 'n' , it will ask for partion type - select 'p' for primary,
then give the partition number and sector value.
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1­4, default 1): 1
First sector (2048­15431679, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048­15431679, default 
15431679): +116M
Then make the first partition as FAT and bootable, for that use 't' and 'a' options as follows:
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): L
You will get a big list of codes from that select code “c” for “W95 FAT32 (LBA)”
To make partition to 'bootable' use 'a' option and give the partition number as follows:
Command (m for help): a
Partition number (1­4): 1
Now first partition is created and to check that use 'p' option as below:
Command (m for help): p
Disk /dev/sdb: 7901 MB, 7901020160 bytes
255 heads, 63 sectors/track, 961 cylinders, total 15431680 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 239615 118784 c W95 FAT32 (LBA)
Partitioning the uSD card for uSD card booting in Beaglebone Black
2. Creation of Second Partition:
Follow the same procedure as we done for first partition except the FAT and Bootable.
Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (1­4, default 2): 2
First sector (239616­15431679, default 239616): 
Using default value 239616
Last sector, +sectors or +size{K,M,G} (239616­15431679, default 
15431679): +3G
To check partition after creating second partition, do option 'p' as follows:
Command (m for help): p
Disk /dev/sdb: 7901 MB, 7901020160 bytes
255 heads, 63 sectors/track, 961 cylinders, total 15431680 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 239615 118784 c W95 FAT32 (LBA)
/dev/sdb2 239616 6531071 3145728 83 Linux
3. Creation of Third partition:
Command (m for help): n
Partition type:
   p   primary (2 primary, 0 extended, 2 free)
   e   extended
Select (default p): p
Partition number (1­4, default 3): 
Using default value 3
First sector (6531072­15431679, default 6531072): 
Using default value 6531072
Last sector, +sectors or +size{K,M,G} (6531072­15431679, default 
15431679): 
Using default value 15431679
Partitioning the uSD card for uSD card booting in Beaglebone Black
After creating three partitions, it will be like this as below:
Command (m for help): p
Disk /dev/sdb: 7901 MB, 7901020160 bytes
255 heads, 63 sectors/track, 961 cylinders, total 15431680 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 239615 118784 c W95 FAT32 (LBA)
/dev/sdb2 239616 6531071 3145728 83 Linux
/dev/sdb3 6531072 15431679 4450304 83 Linux
4. Writing the created partitions to card:
Finally we have to do option 'w' to write all partitions we have created to card
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
5. Unmount the Sdcard partitions as below:
$ umount /dev/sdb1
$ umount /dev/sdb2
$ umount /dev/sdb3
Partitioning the uSD card for uSD card booting in Beaglebone Black
6. Creating File Systems on New Partitions:
After creating partitions in micro SD card, we have to create appropriate file system
corresponding to the partitions. Follow the below commands as below:
$ sudo mkfs.vfat -F 32 /dev/sdb1 -n boot
mkfs.vfat 3.0.12 (29 Oct 2011)
$ sudo mke2fs -L FirstRootFs /dev/sdb2
mke2fs 1.42 (29-Nov-2011)
Filesystem label=FirstRootFs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
196608 inodes, 786432 blocks
39321 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=805306368
24 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
$ sudo mke2fs -L SecondRootFs /dev/sdb3
mke2fs 1.42 (29-Nov-2011)
Filesystem label=SecondRootFs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
278528 inodes, 1112576 blocks
55628 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1140850688
34 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

More Related Content

What's hot

Secondary Storage Device Magnetic Tapes
Secondary Storage Device  Magnetic TapesSecondary Storage Device  Magnetic Tapes
Secondary Storage Device Magnetic TapesRico
 
Hard disk drives
Hard disk drivesHard disk drives
Hard disk drivesBits
 
File System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create UserFile System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create UserHarman Gahir
 
Hard Disk Drive
Hard Disk Drive Hard Disk Drive
Hard Disk Drive Rohan Awale
 
Graphical user interface _ SEOSKILLS Hyderabad
Graphical user interface _ SEOSKILLS HyderabadGraphical user interface _ SEOSKILLS Hyderabad
Graphical user interface _ SEOSKILLS HyderabadSEO SKills
 
Chapter 9: SCSI Drives and File Systems
Chapter 9: SCSI Drives and File SystemsChapter 9: SCSI Drives and File Systems
Chapter 9: SCSI Drives and File Systemsaskme
 
How to mount ntfs in linux
How to mount ntfs in linuxHow to mount ntfs in linux
How to mount ntfs in linuxsiraza5
 
ระบบเครือข่ายคอมพิวเตอร์
ระบบเครือข่ายคอมพิวเตอร์ระบบเครือข่ายคอมพิวเตอร์
ระบบเครือข่ายคอมพิวเตอร์1339900423564
 
Cache presentation on Mapping and its types
Cache presentation on Mapping and its typesCache presentation on Mapping and its types
Cache presentation on Mapping and its typesEngr Kumar
 

What's hot (20)

Disk formatting
Disk formattingDisk formatting
Disk formatting
 
Secondary Storage Device Magnetic Tapes
Secondary Storage Device  Magnetic TapesSecondary Storage Device  Magnetic Tapes
Secondary Storage Device Magnetic Tapes
 
Memory
MemoryMemory
Memory
 
Unix Administration 4
Unix Administration 4Unix Administration 4
Unix Administration 4
 
CD Media
CD MediaCD Media
CD Media
 
Hard disk drives
Hard disk drivesHard disk drives
Hard disk drives
 
Chapter2d
Chapter2dChapter2d
Chapter2d
 
Hard disk
Hard diskHard disk
Hard disk
 
File System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create UserFile System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create User
 
Hard Disk Drive
Hard Disk Drive Hard Disk Drive
Hard Disk Drive
 
Graphical user interface _ SEOSKILLS Hyderabad
Graphical user interface _ SEOSKILLS HyderabadGraphical user interface _ SEOSKILLS Hyderabad
Graphical user interface _ SEOSKILLS Hyderabad
 
101 1.1 hardware settings
101 1.1 hardware settings101 1.1 hardware settings
101 1.1 hardware settings
 
Chapter 9: SCSI Drives and File Systems
Chapter 9: SCSI Drives and File SystemsChapter 9: SCSI Drives and File Systems
Chapter 9: SCSI Drives and File Systems
 
How to mount ntfs in linux
How to mount ntfs in linuxHow to mount ntfs in linux
How to mount ntfs in linux
 
HARD DISK DRIVE
HARD DISK DRIVE HARD DISK DRIVE
HARD DISK DRIVE
 
What is-32-bit-and-64-bit
What is-32-bit-and-64-bitWhat is-32-bit-and-64-bit
What is-32-bit-and-64-bit
 
ระบบเครือข่ายคอมพิวเตอร์
ระบบเครือข่ายคอมพิวเตอร์ระบบเครือข่ายคอมพิวเตอร์
ระบบเครือข่ายคอมพิวเตอร์
 
Cache presentation on Mapping and its types
Cache presentation on Mapping and its typesCache presentation on Mapping and its types
Cache presentation on Mapping and its types
 
Bits and bytes
Bits and bytesBits and bytes
Bits and bytes
 
Hard Disk
Hard DiskHard Disk
Hard Disk
 

Viewers also liked

Character_device_driver_bbb
Character_device_driver_bbbCharacter_device_driver_bbb
Character_device_driver_bbbRashila Rr
 
Character_Device_drvier_pc
Character_Device_drvier_pcCharacter_Device_drvier_pc
Character_Device_drvier_pcRashila Rr
 
Achats des Français en végétaux d'ornement en 2015
Achats des Français en végétaux d'ornement en 2015Achats des Français en végétaux d'ornement en 2015
Achats des Français en végétaux d'ornement en 2015Val'hor - En Quête de Vert
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 

Viewers also liked (6)

DRY EXTRACTS
DRY EXTRACTSDRY EXTRACTS
DRY EXTRACTS
 
Character_device_driver_bbb
Character_device_driver_bbbCharacter_device_driver_bbb
Character_device_driver_bbb
 
HERBAL_MEDICINE
HERBAL_MEDICINEHERBAL_MEDICINE
HERBAL_MEDICINE
 
Character_Device_drvier_pc
Character_Device_drvier_pcCharacter_Device_drvier_pc
Character_Device_drvier_pc
 
Achats des Français en végétaux d'ornement en 2015
Achats des Français en végétaux d'ornement en 2015Achats des Français en végétaux d'ornement en 2015
Achats des Français en végétaux d'ornement en 2015
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 

Similar to Partitioning_SDcard

Similar to Partitioning_SDcard (20)

Mac os x mount ntfs
Mac os x mount ntfsMac os x mount ntfs
Mac os x mount ntfs
 
101 2.1 design hard disk layout
101 2.1 design hard disk layout101 2.1 design hard disk layout
101 2.1 design hard disk layout
 
Unix 6 en
Unix 6 enUnix 6 en
Unix 6 en
 
Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by step
 
最後の楽園の開発をちょこっとだけ手伝った話
最後の楽園の開発をちょこっとだけ手伝った話最後の楽園の開発をちょこっとだけ手伝った話
最後の楽園の開発をちょこっとだけ手伝った話
 
Game mintia
Game mintiaGame mintia
Game mintia
 
Connect dell equallogic storage to linux instance
Connect dell equallogic storage to linux instanceConnect dell equallogic storage to linux instance
Connect dell equallogic storage to linux instance
 
Log
LogLog
Log
 
Setup sd card for ubuntu on pandaboard
Setup sd card for ubuntu on pandaboardSetup sd card for ubuntu on pandaboard
Setup sd card for ubuntu on pandaboard
 
Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery Commands
 
Pandaboard
PandaboardPandaboard
Pandaboard
 
Ghosterr
GhosterrGhosterr
Ghosterr
 
Uclinux
UclinuxUclinux
Uclinux
 
Computer Hardware.ppt
Computer Hardware.pptComputer Hardware.ppt
Computer Hardware.ppt
 
Log
LogLog
Log
 
Barios crosober
Barios crosoberBarios crosober
Barios crosober
 
How to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanHow to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by Ivan
 
Mirroring the root_disk under solaris SVM
Mirroring the root_disk under solaris SVMMirroring the root_disk under solaris SVM
Mirroring the root_disk under solaris SVM
 
How to build and load linux to embedded system
How to build and load linux to embedded systemHow to build and load linux to embedded system
How to build and load linux to embedded system
 
Booy Up
Booy UpBooy Up
Booy Up
 

Partitioning_SDcard

  • 1. Partitioning the uSD card for uSD card booting in Beaglebone Black Use adaptor or card reader for accessing micro sd card in PC, Insert the card to the PC and open the terminal for partioning the sd card. Use the below command for partitioning/viewing the partitions already present in sd card: $sudo fdisk /dev/sdb It is not neccessary to be “sdb”, if you were using one or two usb ports already, check which is your card port, it may be “sdb” or “sdc” depends on your usage of ports. After using the above command, you will get like this: Command (m for help): Now use option 'p' to view the partitions of sd card, since we are using new sd card, it will display like this below: Command (m for help): p Disk /dev/sdb: 7901 MB, 7901020160 bytes 244 heads, 62 sectors/track, 1020 cylinders, total 15431680 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 Disk identifier: 0x00000000 Device Boot Start End Blocks Id System Command (m for help):  Note the number of bytes : 7901020160, it will be used while calculation of cylinder. Now use the option 'x' , it will goes to the Expert command mode, give values as below Command (m for help): x Expert command (m for help): h Number of heads (1­256, default 244): 255 Expert command (m for help): s Number of sectors (1­63, default 62): 63 Expert command (m for help): c Number of cylinders (1­1048576, default 1020): 961 Expert command (m for help): r Command (m for help): After entering the values option 'r' use to return to normal mode.
  • 2. Partitioning the uSD card for uSD card booting in Beaglebone Black Calculation for No.of.cylinders = Total.no.of.bytes on sd card/head/sector/512 = 7901020160/255/63/612 = 961 (rounded) 1. Creation of First Partition: To create a new partition, use option 'n' , it will ask for partion type - select 'p' for primary, then give the partition number and sector value. Command (m for help): n Partition type:    p   primary (0 primary, 0 extended, 4 free)    e   extended Select (default p): p Partition number (1­4, default 1): 1 First sector (2048­15431679, default 2048):  Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048­15431679, default  15431679): +116M Then make the first partition as FAT and bootable, for that use 't' and 'a' options as follows: Command (m for help): t Selected partition 1 Hex code (type L to list codes): L You will get a big list of codes from that select code “c” for “W95 FAT32 (LBA)” To make partition to 'bootable' use 'a' option and give the partition number as follows: Command (m for help): a Partition number (1­4): 1 Now first partition is created and to check that use 'p' option as below: Command (m for help): p Disk /dev/sdb: 7901 MB, 7901020160 bytes 255 heads, 63 sectors/track, 961 cylinders, total 15431680 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 Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 * 2048 239615 118784 c W95 FAT32 (LBA)
  • 3. Partitioning the uSD card for uSD card booting in Beaglebone Black 2. Creation of Second Partition: Follow the same procedure as we done for first partition except the FAT and Bootable. Command (m for help): n Partition type:    p   primary (1 primary, 0 extended, 3 free)    e   extended Select (default p): p Partition number (1­4, default 2): 2 First sector (239616­15431679, default 239616):  Using default value 239616 Last sector, +sectors or +size{K,M,G} (239616­15431679, default  15431679): +3G To check partition after creating second partition, do option 'p' as follows: Command (m for help): p Disk /dev/sdb: 7901 MB, 7901020160 bytes 255 heads, 63 sectors/track, 961 cylinders, total 15431680 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 Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 * 2048 239615 118784 c W95 FAT32 (LBA) /dev/sdb2 239616 6531071 3145728 83 Linux 3. Creation of Third partition: Command (m for help): n Partition type:    p   primary (2 primary, 0 extended, 2 free)    e   extended Select (default p): p Partition number (1­4, default 3):  Using default value 3 First sector (6531072­15431679, default 6531072):  Using default value 6531072 Last sector, +sectors or +size{K,M,G} (6531072­15431679, default  15431679):  Using default value 15431679
  • 4. Partitioning the uSD card for uSD card booting in Beaglebone Black After creating three partitions, it will be like this as below: Command (m for help): p Disk /dev/sdb: 7901 MB, 7901020160 bytes 255 heads, 63 sectors/track, 961 cylinders, total 15431680 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 Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 * 2048 239615 118784 c W95 FAT32 (LBA) /dev/sdb2 239616 6531071 3145728 83 Linux /dev/sdb3 6531072 15431679 4450304 83 Linux 4. Writing the created partitions to card: Finally we have to do option 'w' to write all partitions we have created to card Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. 5. Unmount the Sdcard partitions as below: $ umount /dev/sdb1 $ umount /dev/sdb2 $ umount /dev/sdb3
  • 5. Partitioning the uSD card for uSD card booting in Beaglebone Black 6. Creating File Systems on New Partitions: After creating partitions in micro SD card, we have to create appropriate file system corresponding to the partitions. Follow the below commands as below: $ sudo mkfs.vfat -F 32 /dev/sdb1 -n boot mkfs.vfat 3.0.12 (29 Oct 2011) $ sudo mke2fs -L FirstRootFs /dev/sdb2 mke2fs 1.42 (29-Nov-2011) Filesystem label=FirstRootFs OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 196608 inodes, 786432 blocks 39321 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=805306368 24 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: done Writing inode tables: done Writing superblocks and filesystem accounting information: done $ sudo mke2fs -L SecondRootFs /dev/sdb3 mke2fs 1.42 (29-Nov-2011) Filesystem label=SecondRootFs OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 278528 inodes, 1112576 blocks 55628 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1140850688 34 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Allocating group tables: done Writing inode tables: done Writing superblocks and filesystem accounting information: done