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

Race condition: auto-mounting getting in the way #24

Open
teohhanhui opened this issue Mar 5, 2024 · 1 comment
Open

Race condition: auto-mounting getting in the way #24

teohhanhui opened this issue Mar 5, 2024 · 1 comment

Comments

@teohhanhui
Copy link
Contributor

root@Han-MacBook-Air:/home/teohhanhui/Projects/leifliddy/asahi-fedora-usb# ./build.sh -d /dev/sda
### Preparing USB device
GPT fdisk (gdisk) version 1.0.9

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): 
Command (? for help): Partition number (1-128, default 1): First sector (34-15148574, default = 2048) or {+-}size{KMGTP}: Last sector (2048-15148574, default = 15147007) or {+-}size{KMGTP}: Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'EFI system partition'

Command (? for help): Partition number (2-128, default 2): First sector (34-15148574, default = 1230848) or {+-}size{KMGTP}: Last sector (1230848-15148574, default = 15147007) or {+-}size{KMGTP}: Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem'

Command (? for help): Partition number (3-128, default 3): First sector (34-15148574, default = 3328000) or {+-}size{KMGTP}: Last sector (3328000-15148574, default = 15147007) or {+-}size{KMGTP}: Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem'

Command (? for help): 
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
mkfs.fat 4.2 (2021-01-31)
mke2fs 1.47.0 (5-Feb-2023)
/dev/sda2 is mounted; will not make a filesystem here!
mke2fs 1.47.0 (5-Feb-2023)
The file /dev/sdap2 does not exist and no size was specified.

Looks like it fails on this line:

mkfs.ext4 -U $BOOT_UUID -L 'fedora-usb-boot' -F "$usb_device"2 || mkfs.ext4 -U $BOOT_UUID -L 'fedora-usb-boot' -F "$usb_device"p2

Because at that point auto mount has already won the race... 🤣

@teohhanhui
Copy link
Contributor Author

Temporarily disabling auto mount works fine.

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

1 participant