Forum Discussion
Altera_Forum
Honored Contributor
11 years agoThanks for the quick response, Dave.
I had tried the partitioning earlier and had no luck. The parmeters that fdisk asks for are not quite the same as the ones in the example, this bugs me. When I am partitioning it asks me for sector start/stop rather than cylinder. I get the same error with modprobe. Here is the full terminal dump: Sending discover... Sending discover... No lease, failing Starting portmap daemon... Sun Sep 29 01:40:00 UTC 2013 INIT: Entering runlevel: 5 Starting OpenBSD Secure Shell server: sshd NET: Registered protocol family 10 IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready done. Starting syslogd/klogd: done Starting Lighttpd Web Server: lighttpd. Starting blinking LED server Stopping Bootlog daemon: bootlogd. _ ____ ____ _ ___ _ _ _____ _ / \ _ __ _ __ _____ __ / ___| ___ / ___| |/ (_) |_ / |___ / / | / _ \ | '__| '__/ _ \ \ /\ / / \___ \ / _ \| | | ' /| | __| | | |_ \ | | / ___ \| | | | | (_) \ V V / ___) | (_) | |___| . \| | |_ | |___) || | /_/ \_\_| |_| \___/ \_/\_/ |____/ \___/ \____|_|\_\_|\__| |_|____(_)_| arrow_sockit login: root root@arrow_sockit:~# modprobe g_mass_storage ERROR: could not insert 'g_mass_storage': No such device root@arrow_sockit:~# modprobe g_mass_storage file=./backing_fi ERROR: could not insert 'g_mass_storage': No such device root@arrow_sockit:~# ls README disk-file.img readme adam_cool_beans disk_img.img soc_system.rbf altera hello sockit_golden_top.rbf backing_file hps_gpio test.txt bridgeoff.sh led_blink yipee_led bridgeon.sh led_blink_devices.sh clear_leds.sh my_first_hps root@arrow_sockit:~# modprobe g_mass_storage file=./backing_file ERROR: could not insert 'g_mass_storage': No such device root@arrow_sockit:~# modprobe g_mass_storag file=./backing_file FATAL: Module g_mass_storag not found. root@arrow_sockit:~# modprobe g_mass_storage file=./backing_file ERROR: could not insert 'g_mass_storage': No such device 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 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 0x5b98fcf9. Command (m for help): x Expert command (m for help): s Number of sectors (1-63, default 63): 8 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 (2048-131071, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-131071, default 131071): Using default value 131071 Partition 1 of type Linux and of size 63 MiB is set Command (m for help): n Partition type: p primary (1 primary, 0 extended, 3 free) e extended Select (default p): p artition number (1-4, default 2): Using default value 2 No free sectors available Command (m for help): exit 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): q 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 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 0xe3700929. Command (m for help): x Expert command (m for help): s Number of sectors (1-63, default 63): 8 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): m 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): 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-131071, default 2048): 1 Value out of range. First sector (2048-131071, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-131071, default 131071): Using default value 131071 Partition 1 of type Linux and of size 63 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): 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: 0xe3700929 Device Boot Start End Blocks Id System backing_file1 2048 131071 64512 b W95 FAT32 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 ERROR: could not insert 'g_mass_storage': No such device root@arrow_sockit:~# root@arrow_sockit:~# modprobe g_mass_storage file=./backing_file -sh: root@arrow_sockit:~#: command not found root@arrow_sockit:~# ERROR: could not insert 'g_mass_storage': No such device -sh: ERROR:: command not found root@arrow_sockit:~# root@arrow_sockit:~# -sh: root@arrow_sockit:~#: command not found root@arrow_sockit:~#