Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions to Improve Script #14

Open
Cyanic opened this issue Apr 22, 2024 · 4 comments
Open

Suggestions to Improve Script #14

Cyanic opened this issue Apr 22, 2024 · 4 comments

Comments

@Cyanic
Copy link
Contributor

Cyanic commented Apr 22, 2024

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.

@sowbug
Copy link
Owner

sowbug commented Apr 22, 2024

These are excellent suggestions, and I'll be happy to take a PR if you create it.

For the small USB drive, yeah, I agree it was probably just a bit too small. If the error message is confusing or misleading, I'm open to suggestions how to improve it.

@Cyanic
Copy link
Contributor Author

Cyanic commented May 10, 2024

I've never done a PR... but I guess it's about time I learned. Give me a week here and I'll try to figure it out :)

@sowbug
Copy link
Owner

sowbug commented May 10, 2024

It's a cinch, and you'll be glad to have an extra tool in your toolbelt once you've done it.

  1. Fork this repo.
  2. Clone your own repo (github.com/Cyanic/mkeosimg) to your local machine.
  3. Make the changes you have in mind, test, etc.
  4. Commit.
  5. Push your repo's updates to GitHub.
  6. On the website, see the prompt to create a PR.

That's pretty much it.

@Cyanic
Copy link
Contributor Author

Cyanic commented Aug 7, 2024

Well better late than never I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants