[PATCH] BBB: sd_setup.sh: Change /bin/bash -> /bin/sh to solely adhere to POSIX shell constructs

Ed Sutter edsutterjr at gmail.com
Sun Jul 12 00:23:35 UTC 2015


On 7/11/2015 10:28 AM, Joel Sherrill wrote:
>
> On July 11, 2015 9:18:01 AM CDT, Ed Sutter <edsutterjr at gmail.com> wrote:
>> Jarielle,
>> Did you try running the script with that change?
>> I applied the patch, then tried running it and it failed.
>> Apparently 'echo' in sh is different than 'echo' in bash, at least it
>> is for my system.
>> Let me know.
>> I had to remove the -e from the echo lines for it to work on my
>> ubuntu14.04 system.
>> You wanna test that and resubmit the patch or should I do it?
> What happened?
I get output that indicates that the echo piped into fdisk isn't happy (see attached).
Am I doing something stupid?
>
>> Ed
>> _______________________________________________
>> umon-devel mailing list
>> umon-devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/umon-devel
> --joel
>

-------------- next part --------------
BEAGLEBONEBLACK:sudo ./sd_setup.sh FAT /dev/sdc
[sudo] password for els:
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0114832 s, 91.3 MB/s
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x159b6f44.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): -: 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):
Disk /dev/sdc: 2013 MB, 2013265920 bytes
62 heads, 62 sectors/track, 1022 cylinders, total 3932160 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: 0x159b6f44

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): 1: 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): Command (m for help): +: 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): No partition is defined yet!

Command (m for help): 6: 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): Partition number (1-4): Warning: partition 1 has empty type

Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
mkfs.fat 3.0.26 (2014-03-07)
/dev/sdc1: No such file or directory
mount: special device /dev/sdc1 does not exist
umount: mnt: not mounted
BEAGLEBONEBLACK:


More information about the umon-devel mailing list