adafruit / Adafruit-Pi-ExternalRoot-Helper

A shell script to configure a USB drive as root filesystem.
MIT License
69 stars 25 forks source link

The file /dev/sda1 does not exist and no size was specified. #5

Open smartroad opened 8 years ago

smartroad commented 8 years ago

Hi!

Tried to run this using Jessie-lite and ended up with:

sudo ./adafruit-pi-externalroot-helper -d /dev/sda
Target drive = /dev/sda
[start] Will create new ext4 filesystem on /dev/sda
[start] If there is data on /dev/sda, it will be lost.
Really proceed? (y)es / (n)o y
[dependencies] Installing gdisk, rsync, and parted.
Reading package lists... Done
Building dependency tree
Reading state information... Done
gdisk is already the newest version.
parted is already the newest version.
rsync is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
[fs create] Creating /dev/sda1
[fs create] Creating ext4 filesystem on /dev/sda1
mke2fs 1.42.12 (29-Aug-2014)
The file /dev/sda1 does not exist and no size was specified.

yet if I run mke2fs /dev/sda1 it formats the drive no issue mkfs -t ext4 -L rootfs /dev/sda1 also has no issues

skilbjo commented 8 years ago

+1

rpiuser314 commented 8 years ago

I have had this problem myself. I found that manually entering the command: "sudo mkfs -t ext4 -L rootfs /dev/sda1" (w/o quotes) worked just fine. I figured that perhaps the script was running faster than the file /dev/sda1 was able to be seen. I solved the problem by adding a statement of "sleep 1" (w/o quotes) just before the mkfs ... line. Make that addition and run the script again. Good luck!

cartpauj commented 8 years ago

Also ran into this myself, cloned the repo locally and modified the script with "sleep 1" as @rpiuser314 mentioned. Worked like a charm! +1

aronayne commented 8 years ago

Appears to be a common issue, fix suggested by @rpiuser314 fixed it for me on Raspberry PI with Jesse. Fix should be merged with master ?

phlbnks commented 7 years ago

+1 Also fixed by @rpiuser314

marqxb commented 7 years ago

+1 Thanks @rpiuser314

IgorGanapolsky commented 7 years ago

I still get the error: The file /dev/sda1 does not exist and no size was specified despite the fix suggested in this thread...

diostam commented 7 years ago

The sleep 1 trick did the job. thanks

2475810 commented 7 years ago

sleep 1 trick didn't do it for me got around this by first run: "sudo mkfs -t ext4 /dev/sda1", then comment out this line from the script "mkfs -t ext4 -L rootfs "${target_partition}", after this the script runs without any issues.

cryptomonk commented 6 years ago

+1 @rpiuser314 (Open adafruit-pi-externalroot-helper with a text editor) nano adafruit-pi-externalroot-helper

Then see this: https://github.com/adafruit/Adafruit-Pi-ExternalRoot-Helper/pull/8/files

:)

remrol commented 6 years ago

Thank you, sleep 1 solves the problem for me

JPM-git commented 6 years ago

same here sleep 1 solves the problem.

Thank you

vmstan commented 4 years ago

There is now a sleep 5 in the published code.

rpiuser314 commented 4 years ago

Hi Michael,

Thank you for the update. That is good to hear that that the sleep is now in the code. It is kind of a big hammer approach, but I didn't know any other way to fix my problem. Thank you again.

Sincerely, Kedric Bartsch

On Fri, Apr 17, 2020 at 2:52 PM Michael Stanclift notifications@github.com wrote:

There is now a sleep 5 in the published code.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit-Pi-ExternalRoot-Helper/issues/5#issuecomment-615407829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOIJDMV3MBOKJACVT7IEODRNCQOVANCNFSM4B4EORRA .