[Nintendo Switch News, Guides, Discussion , Develop] funtimez:
Thanks for the script but its not working for me. it starts 2 partitions but there is nothing in them and windows wants to format them both. also in linux it doesnt list all 7 of the partitions using lsblk like it should . i think it has a problem unmounting before it starts its process. im running ubuntu in vmware but also tried the live iso. heres a copy of whats going on in terminal. has anyone else who tried this method have the same issues?

fun@ubuntu:~/Downloads/script$ sudo ./flash.sh ./android-16gb.img

[sudo] password for fun:

Available devices:

NAME TRAN VENDOR MODEL SIZE

[0] /dev/sda spi VMware, VMware Virtual S 178G

[1] /dev/sdb usb Multi Flash Reader 119.3G

[2] /dev/sr0 sata NECVMWar VMware SATA CD01 1024M

Choose device [0-2]:

> 1

The following device will be used:

NAME TRAN VENDOR MODEL SIZE

/dev/sdb usb Multi Flash Reader 119.3G

Continue? [y,n]:

> y

umount: invalid option -- 'q'

Try 'umount --help' for more information.

Create partition for emummc? [y,n]:

> n

Total usable device size:

122110 MiB

Reserved size for Android system (and emummc) partitions:

3472 MiB

Available size for Android user and Nintendo Switch partitions:

118638 MiB

Size in [MiB] for Android user partition [8192-116590]:

> 18989

Partitions will have the following size:

99649 MiB for Nintendo Switch partition

18989 MiB for Android user partition

All data on the following device will be lost:

NAME TRAN VENDOR MODEL SIZE

/dev/sdb usb Multi Flash Reader 119.3G

Continue? [y,n]:

> y

label: gpt

label-id: 9EA0CE87-51D7-47A9-9FF9-78799EAB6EC0

device: /dev/sdb

unit: sectors

/dev/sdb1 : start= 2048, size= 204081152, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=EB7F633E-BBF3-44F2-B080-3D81A9054C66, name="hos_data"

/dev/sdb2 : start= 204083200, size= 2222080, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=B626D33B-A292-427B-8B9E-01FEF73E2A6A, name="vendor"

/dev/sdb3 : start= 206305280, size= 4540416, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=45FDA7C3-9713-4DA0-8A6E-87392208596C, name="system"

/dev/sdb4 : start= 210845696, size= 143360, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=9FE52B2E-2329-4C78-AFDD-1F528256C4A3, name="boot"

/dev/sdb5 : start= 210989056, size= 143360, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=D8AD62F5-8FE2-4279-ABD1-7FFB4375C603, name="recovery"

/dev/sdb6 : start= 211132416, size= 61440, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=1D58AE11-0484-4016-AE62-6001DDD8AFBC, name="dtb"

/dev/sdb7 : start= 211193856, size= 38889472, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=8824AFDD-7CC4-405D-AC39-C7846CD04138, name="userdata"

Checking that no-one is using this disk right now ... FAILED

This disk is currently in use - repartitioning is probably a bad idea.

Umount all file systems, and swapoff all swap partitions on this disk.

Use the --no-reread flag to suppress this check.

sfdisk: Use the --force flag to overrule all checks.

/dev/sdb:

No errors detected.

Header version: 1.0

Using 1 out of 128 partitions.

A total of 4029 free sectors is available in 2 segments (the largest is 1007.5 KiB).

Making empty file systems:

mkfs.fat 4.1 (2017-01-24)

mkfs.fat: /dev/sdb1 contains a mounted filesystem.

mkfs.fat 4.1 (2017-01-24)

mkfs.fat: unable to open /dev/sdb8: No such file or directory

mke2fs 1.44.1 (24-Mar-2018)

The file /dev/sdb7 does not exist and no size was specified.

Dumping partition "vendor" to sd card (1137 MB, 1085 MiB):

dd: failed to open '/dev/sdb2': Invalid argument

2048+0 records in

2048+0 records out

1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0525777 s, 19.9 MB/s

2047+0 records in

2047+0 records out

1048064 bytes (1.0 MB, 1.0 MiB) copied, 0.0646979 s, 16.2 MB/s

Dumping partition "system" to sd card (2324 MB, 2217 MiB):

dd: failed to open '/dev/sdb3': Invalid argument

2048+0 records in

2048+0 records out

1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0636049 s, 16.5 MB/s

2047+0 records in

2047+0 records out

1048064 bytes (1.0 MB, 1.0 MiB) copied, 0.042866 s, 24.4 MB/s

Dumping partition "boot" to sd card (73 MB, 70 MiB):

dd: failed to open '/dev/sdb4': Invalid argument

Dumping partition "recovery" to sd card (73 MB, 70 MiB):

dd: failed to open '/dev/sdb5': Invalid argument

Dumping partition "dtb" to sd card (31 MB, 30 MiB):

dd: failed to open '/dev/sdb6': Invalid argument

GPT fdisk (gdisk) version 1.0.3

Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help):

Recovery/transformation command (? for help):

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,

just hit the Enter key at the below prompt and your MBR partition table will

be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be

added to the hybrid MBR, in sequence: Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N):

Creating entry for GPT partition #1 (MBR partition #1)

Enter an MBR hex code (default 83): Set the bootable flag? (Y/N):

Unused partition space(s) found. Use one to protect more partitions? (Y/N):

Recovery/transformation command (? for help):

Disk size is 250085376 sectors (119.3 GiB)

MBR disk identifier: 0x18DE0928

MBR partitions:

Number Boot Start Sector End Sector Status Code

1 2048 250083327 primary 0xEE

2 1 2047 primary 0xEE

Recovery/transformation 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/sdb.

Caution: More than one 0xEE MBR partition found. This can cause problems

in some OSes.

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.

fun@ubuntu:~/Downloads/script$ lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

loop0 7:0 0 42.8M 1 loop /snap/gtk-common-themes/1313

loop1 7:1 0 20.2M 1 loop /snap/snapd/4023

loop2 7:2 0 51.7M 1 loop /snap/core18/1073

sda 8:0 0 178G 0 disk

├─sda1 8:1 0 177G 0 part /

├─sda2 8:2 0 1K 0 part

└─sda5 8:5 0 975M 0 part [SWAP]

sdb 8:16 1 119.3G 0 disk

└─sdb1 8:17 1 119.3G 0 part /media/fun/94218e48-b975-4b3e-8bcb-184a4d7a6ad5

sr0 11:0 1 1024M 0 rom

fun@ubuntu:~/Downloads/script$