Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHere is the terminal dump for the commands that I used:
root@arrow_sockit:~# dd bs=1M count=64 if=/dev/zero of=./backing_file 64+0 records in 64+0 records out root@arrow_sockit:~# fdisk -c=dos Usage: fdisk [options] <disk> change partition table fdisk [options] -l <disk> list partition table(s) fdisk -s <partition> give partition size(s) in blocks Options: -b <size> sector size (512, 1024, 2048 or 4096) -c[=<mode>] compatible mode: 'dos' or 'nondos' (default) -h print this help text -u[=<unit>] display units: 'cylinders' or 'sectors' (default) -v print program version -C <number> specify the number of cylinders -H <number> specify the number of heads -S <number> specify the number of sectors per track root@arrow_sockit:~# fdisk -c='dos' Usage: fdisk [options] <disk> change partition table fdisk [options] -l <disk> list partition table(s) fdisk -s <partition> give partition size(s) in blocks Options: -b <size> sector size (512, 1024, 2048 or 4096) -c[=<mode>] compatible mode: 'dos' or 'nondos' (default) -h print this help text -u[=<unit>] display units: 'cylinders' or 'sectors' (default) -v print program version -C <number> specify the number of cylinders -H <number> specify the number of heads -S <number> specify the number of sectors per track root@arrow_sockit:~# fdisk c=dos Welcome to fdisk (util-linux 2.21.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. fdisk: unable to open c=dos: No such file or directory root@arrow_sockit:~# fdisk -c=dos ./backing_file Welcome to fdisk (util-linux 2.21.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0xb4aa408e. WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (with command 'c'). Command (m for help): e e: unknown command Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): x Expert command (m for help): s Number of sectors (1-63, default 63): 8 Warning: setting sector offset for DOS compatiblity Expert command (m for help): h Number of heads (1-256, default 255): 16 Expert command (m for help): c Number of cylinders (1-1048576, default 8): 1024 Expert command (m for help): r 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 (8-131071, default 8): Using default value 8 Last sector, +sectors or +size{K,M,G} (8-131071, default 131071): Using default value 131071 Partition 1 of type Linux and of size 64 MiB is set Command (m for help): t Selected partition 1 Hex code (type L to list codes): b Changed system type of partition 1 to b (W95 FAT32) Command (m for help): o Building a new DOS disklabel with disk identifier 0xee0c56f2. WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (with command 'c'). Command (m for help): p Disk ./backing_file: 67 MB, 67108864 bytes 16 heads, 8 sectors/track, 1024 cylinders, total 131072 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: 0xee0c56f2 Device Boot Start End Blocks Id System Command (m for help): w The partition table has been altered! WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. root@arrow_sockit:~# modprobe g_mass_storage file=./backing_file