vzhilov / WDMC-Ex2-Ultra

Enhanced Ram Disk and Linux Kernel for WD My Cloud Ex2 Ultra
31 stars 9 forks source link

Debian on an external storage #1

Open matrob opened 4 years ago

matrob commented 4 years ago

Is it possible to install debian on an USB drive to use all the disk space on the NAS?

vzhilov commented 4 years ago

Yes, sure.

I believe the USB drive will be detected as /dev/sdc1 and then last lines of /initrd/init will be:

mount -o rw /dev/sbc1 /mnt/root 2>&1 >/dev/null
if [ -h /mnt/root/sbin/init -o -e /mnt/root/sbin/init ]; then
  boot
else
  rescue_shell
fi

Internal RAM of the NAS will boot, then it will decrypt the NAS and then turn the further booting over to Debian on USB drive

matrob commented 4 years ago

Thanks for the working information. After correcting the small typo I could successfully start from /dev/sdc1.

mount -o rw /dev/sdc1 /mnt/root 2>&1 >/dev/null
if [ -h /mnt/root/sbin/init -o -e /mnt/root/sbin/init ]; then
  boot
else
  rescue_shell
fi
matrob commented 4 years ago

I have also evaluated another approach that is more flexible and does not rely on hard-coded /dev/sdX1 drive specifications. After further testing I will hopefully be able to release it soon.

vzhilov commented 4 years ago

I have changed the init script adding a little dialog with a boot option from external device

mnemonicj commented 2 years ago

Hello! Thank you for the great work. How can I set the boot to default, or permanent to /dev/md1? It is asking me everytime to choose. Thank you, Regards Rainer