minibike12 wrote:Hmm, ok.
So i should use nwsp2 custom firmware with the losetup?
Yes, I think so.
Can you explain losetup a bit more?
How to calculate offset etc?
I have an 4096 advanced format drive.
The offset is the offset in bytes, on the device /dev/sda. The needed offset is dependent on the used disk space. I had a look at the installation instructions
here. I suggest you to follow the instructions, and also use the provided GPT supporting kernel. (GPT support is not really necessary, but maybe also large disk support is added, which *is* needed).
But when building the partition table, let partition 4 end at cylinder 400, and also partition 8. (fdisk will automagically propose cylinder 400 as ending cylinder for partition 8). When you have build your disk following the instructions, plug it in the nas, and boot. If it boots, the bootloader is not choked.
Now, login via ssh, and create the loop device. Our disk is filled upto cylinder 400, and one cylinder is 8001KiB, which makes 3277209600 bytes. To be safe, I suggest to use 3686809600 as offset, which is a multiple of 4096.
So create the loop device:
- Code: Select all
losetup -o 3686809600 /dev/loop0 /dev/sda
Create a filesystem
- Code: Select all
mke2fs -j /dev/loop0
and mount it
- Code: Select all
mkdir /tmp/mountpoint
mount /dev/loop0 /tmp/mountpoint
The command 'df' should now show an almost 3TB partition, which is 97% free, or something like that. Now unmount the partition, and reboot the box
- Code: Select all
umount /tmp/mountpount
reboot
When the box has rebooted, re-create and mount the loop device:
- Code: Select all
losetup -o 3686809600 /dev/loop0 /dev/sda
mkdir /tmp/mountpoint
mount /dev/loop0 /tmp/mountpoint
If this works without complaints, I suppose it's all gonna work.
But some help of fvdw is needed. I looked at the scripts in his firmware, and actually I couldn't find where the data partition is being mounted, and so I also don't know where to inject this code. But so far you can try if the bootloader can be tricked, and if the filesystem on the loopdevice survives a reboot.