Skip to content

Suggestions to Improve Script #14

@Cyanic

Description

@Cyanic

I ran this script on my Ubuntu VM machine.

I ran:
sudo ./mkeosdrive /dev/sdb ~/Downloads/ER-e100.v2.0.9-hotfix.7.5622762.tar
Output was:

umount: /dev/sdb1: not mounted.
no filesystem mounted from /dev/sdb
Press any key to continue formatting /dev/sdb
or hit Ctrl+C to exit now...
1+0 records in
1+0 records out
512 bytes copied, 0.00622698 s, 82.2 kB/s
Waiting for disk sync...
Waiting for disk sync...
Formatting /dev/sdb partitions...
mkfs.fat 4.1 (2017-01-24)
mkfs.msdos: unable to open /dev/sdb1: No such file or directory

I suspected the system hadn't recognized the partition yet by the time the mkfs.msdos command was run.

I added:

# Add a delay to allow the system to recognize the new partitions
sleep 2

Approximately line 83, between echo "Waiting for disk sync..." Line 81 and echo "Formatting $DEVICE partitions..." Line 84

After the 2 second sleep was added everything completed normally.

I'd suggest you perhaps consider added that 2 second sleep.

Finally you had a minor typo line 27: echo "If you want to provide a root partition end cap size but no config, use \"-\" without the quotes as the third paramenter."

Should be say parameter

At first I tried to use a 1GB disk and it failed because the size was actually 940MiB or something. I ended up just using a 4GB USB. I'm not sure what the solution is, perhaps it's too small?

Otherwise great script thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions