as on the original firmware the usb file gadget is used to make the back side port work. This gadget can only work with disk image files and not disk partitions like /dev/sda9
Current it uses the file /share/1000/disk.image.1 to connect to the back side usb port.
This file is created when using the create image command in the web interface.
You can of course replace that by another file, just remove the disk image using the web interface and put a file in the directory /share/1000 with name disk.image.1 (of course via SSH access)
Ypu could create a disk image of 50 GB your self using these commands after accessing NAS via SSH (Putty)
Create basic a image file of 50 GB
- Code: Select all
/bin/dd if=/dev/zero bs=1M count=50000 of=/share/1000/disk.image.1
Create a partition in this 50 GB image
- Code: Select all
/sbin/fdisk -S 63 -H 255 -C 6500 /share/1000/disk.image.1
this command will open fdisk, give the following commands in fdisk to create 1 partition using the whole disk image
(do not create more partitions as file gadget won't like that)
- Code: Select all
n
p
1
1
6500
t
83
w
The last command w is necessary to write the table to the image, if you don't do that no changes are made to the image
Now you have a disk image with partition identified as native Linux.
Please note that the numbers in these command are for a 50 GB file if you want to make another size you need to adapt the numbers. (in dd count and in fdisk the number of cylinders typically you need 130 cylinders per GB (notice the number 6500)
Now connect your nwsp2 to your TV using back side usb port and switch to device mode manually.
The TV should recognize the disk now but it will be unformatted and you can format it using your TV.
The fact that the original image as made by the firmware can not be formatted is because the partition identifier is set for FAT32 by the firmware when creating the image, apparently your TV cannot change that. Now that you have a image with a Linux partiton inside it should be able to format it. You can not format it on the NAS itself as it doesn't has the commands to format XFS partitions in the firmware. But an unformatted disk image is no problem for the file gadget. Your TV or PC will see it as unformatted drive.
PS creating a 50 GB disk image will take a while. You could start with on image of 5 GB to see if it works. If you do that then the parameter count in the dd command should be 5000 instead of 50000 and the number of cylinders used in the fdisk part should be 650 instead of 6500 (two places)
PS2 when rebooting the nas it will use auto switch mode by default. So after reboot you mus set it to manual again
PS 3 if you switch to host mode you probably will get the mount error and the image will not be available as share but that won't affect anything else on the NAS
PS 4 If you use the remove image command in the webinterface your image will be gone and you will need to recreate it
PS5 Be careful with dd en fdisk commands, if you make a mistake in the syntax you can easily destroy all data in a partition that you did not intended. Don't say I didn't warn you (nick name of the dd command = dead disk)