Differences
This shows you the differences between the selected revision and the current version of the page.
howto:fun_plug 2007/12/11 13:03 | howto:fun_plug 2017/09/06 17:34 current | ||
---|---|---|---|
Line 9: | Line 9: | ||
</code> | </code> | ||
- | /usr/sbin/chk_fun_plug will check for file called fun_plug on the disks root and then executes it. | + | /usr/sbin/chk_fun_plug will check for file called fun_plug on the disks root and then execute it. |
<code perl> | <code perl> | ||
#!/bin/sh | #!/bin/sh | ||
Line 29: | Line 29: | ||
</code> | </code> | ||
- | //**Warning**: This was just background information how DSM-G600 will find fun_plug and how does it get executed. All scripts above this warning should **not** be entered into your fun_plug or any other scripts.// | + | //**Warning**: This was just background information about how DSM-G600 finds and executes fun_plug. All scripts above this warning should **not** be entered into your fun_plug or any other scripts.// |
===== Installing fun_plug ===== | ===== Installing fun_plug ===== | ||
There are 5 ways to setup a working fun_plug file: | There are 5 ways to setup a working fun_plug file: | ||
- To a new hard drive using Linux | - To a new hard drive using Linux | ||
- | - To a already partitioned hard drive using Linux | + | - To an already partitioned hard drive using Linux |
- | - To a already partitioned hard drive using Linux and Samba | + | - To an already partitioned hard drive using Linux and Samba |
- | - To a already partitioned hard drive using Windows and cygwin | + | - To an already partitioned hard drive using Windows and cygwin |
- To a running DSM using FTP from any Operating System | - To a running DSM using FTP from any Operating System | ||
Line 44: | Line 44: | ||
- Connect your new hard drive to a Linux (ext3 supported) PC. | - Connect your new hard drive to a Linux (ext3 supported) PC. | ||
- Run terminal as root user. | - Run terminal as root user. | ||
- | - Fire up fdisk using following command ''fdisk /dev/hd<hi cyan>x</hi>'' or ''fdisk /dev/sd<hi cyan>x</hi>'' if you have SATA or USB hard drive. The <hi cyan>x</hi> is your hard drive position, for example Primary Master is <hi cyan>a</hi>, Primary Slave is <hi cyan>b</hi>, Secondary Master is <hi cyan>c</hi> and Secondary Slave is <hi cyan>d</hi>. SATA and USB hard drives are most cases <hi cyan>a</hi>. | + | - Fire up fdisk using following command ''fdisk /dev/hdx'' or ''fdisk /dev/sdx'' if you have a SATA or USB hard drive. The x is your hard drive position, for example Primary Master is a, Primary Slave is b, Secondary Master is c and Secondary Slave is d. SATA and USB hard drives are usually a. |
- Now we are going to make a swap partition. | - Now we are going to make a swap partition. | ||
- | - When you are inside fdisk then press ''n'' | + | - When you are inside fdisk press ''n'' |
- Then ''p'' | - Then ''p'' | ||
- And then ''1'' | - And then ''1'' | ||
- And then ''Enter key'' | - And then ''Enter key'' | ||
- And finally ''+512M'' | - And finally ''+512M'' | ||
- | - Now we are going to make a ext3 partition for your files. You can also make more than one partition for your files. For example if you do not want to store your files to ext3 partition and you want to use fat32 instead, or if you want to use chroot environment and want to avoid [[http://forum.dsmg600.info/t19-Updated-28092006-Bugs.html|chmod bug at bootup]]. | + | - Now we are going to make an ext3 partition for your files. You can also make more than one partition for your files. For example if you do not want to store your files to ext3 partition and you want to use fat32 instead, or if you want to use a chroot environment and want to avoid [[http://dns323.kood.org/forum/t19-Updated-28092006-Bugs.html|the chmod bug at bootup]]. |
- Press ''n'' | - Press ''n'' | ||
- Then ''p'' | - Then ''p'' | ||
- Then ''2'' | - Then ''2'' | ||
- | - Then press ''Enter key'' | + | - Then press the ''Enter key'' |
- | - And now press ''Enter key'' if you want to make only one ext3 partition. If you are not sure what to do then you should press ''Enter key''. But if you want to make one or more extra partitions then you must figure out how you are going to spread your drive space between all those partitions you are going to make. For example if you want to store most of your files to FAT32 partition then you should enter ''+100M'' to make 100MB ext3 partition. | + | - And now press the ''Enter key'' if you want to make only one ext3 partition. If you are not sure what to do then you should press the ''Enter key''. But if you want to make one or more extra partitions then you must figure out how you are going to allocate your drive space among all those partitions you are going to make. For example if you want to store most of your files to a FAT32 partition then you should enter ''+100M'' to make a 100MB ext3 partition. |
- | - If you did choose to make more than one partition, to your files, then proceed with setp 17, otherwise go to step 18. | + | - If you did choose to make more than one partition for your files, then proceed with step 17, otherwise go to step 18. |
- | - Now press ''n'' then ''p'' after that ''3'' and now ''Enter key'' and ''Enter key'' to one more time. | + | - Now press ''n'' then ''p'' after that ''3'' and now ''Enter key'' and ''Enter key'' once more. |
- | - Now we are going to setup a file system type to swap partition. | + | - Now we are going to set the partition type to ''swap''. |
- Press ''T'' | - Press ''T'' | ||
- Then ''1'' | - Then ''1'' | ||
- And then ''82'' | - And then ''82'' | ||
- | - If you did choose to make more than one partition to your files then proceed with setp 23, otherwise go to step 24. | + | - If you chose to make more than one partition for your files then proceed with step 23, otherwise go to step 24. |
- | - Now you have to choose a file system to your extra partition. You can leave it to ext3 or change it to FAT32. To change it FAT32 then press ''T'' then ''3'' and then ''c'' | + | - Now you have to choose a file system for your extra partition. You can leave it as ext3 or change it to FAT32. To change it FAT32, press ''T'' then ''3'' and then ''c'' |
- Now you can review your partition table by pressing ''p'', if it looks good then press ''w'' to write changes to hard disk. If you think something went wrong then press ''q'' and start again, starting with step 3. | - Now you can review your partition table by pressing ''p'', if it looks good then press ''w'' to write changes to hard disk. If you think something went wrong then press ''q'' and start again, starting with step 3. | ||
- Now we are going to format newly created partitions. | - Now we are going to format newly created partitions. | ||
- | - To format swap partition run ''mkswap /dev/hd<hi cyan>x</hi>1'' | + | - To format the swap partition run ''mkswap /dev/hdx1'' |
- | - Next we are going to format ext3 partition with following command line ''mke2fs -j /dev/hd<hi cyan>x</hi>2'' | + | - Next we are going to format the ext3 partition with the following command line ''mke2fs -I 128 -j /dev/hdx2'' |
- | - And if you did choose to make a second partition to your files then we must format this one also. If you did choose it to be FAT32, before at the 23rd step, then you must run ''mkdosfs /dev/hd<hi cyan>x</hi>3'' | + | - And if you chose to make a second partition to your files then we must format this one also. If you chose it to be FAT32 at the 23rd step, then you must run ''mkdosfs /dev/hdx3'' |
- | - And finally we are going to make fun_plug file to your ext3 partition. | + | - And finally we are going to copy the fun_plug file to your ext3 partition. |
- | - We need first mount ext3 partition with this command line ''mkdir /mnt/dsmg600disk || mount /dev/hd<hi cyan>x</hi>2 /mnt/dsmg600disk'' | + | - We first mount the ext3 partition with this command line ''mkdir /mnt/dsmg600disk || mount /dev/hdx2 /mnt/dsmg600disk'' |
- | - Now create empty fun_plug file with this command ''touch /mnt/dsmg600disk/fun_plug'' | + | - Now create an empty fun_plug file with this command ''touch /mnt/dsmg600disk/fun_plug'' |
- And now we are going to make it an a executable with this command ''chmod 777 /mnt/dsmg600disk/fun_plug'' | - And now we are going to make it an a executable with this command ''chmod 777 /mnt/dsmg600disk/fun_plug'' | ||
- Now run ''ls -la /mnt/dsmg600disk/fun_plug'' to make sure that we did it correctly. You should see <code>-rwxrwxrwx 1 root root 0 some-date-and-time /mnt/dsmg600disk/fun_plug</code> | - Now run ''ls -la /mnt/dsmg600disk/fun_plug'' to make sure that we did it correctly. You should see <code>-rwxrwxrwx 1 root root 0 some-date-and-time /mnt/dsmg600disk/fun_plug</code> | ||
- | - Optionally if you like you can also install [[:howto:telnet|telnet]] here. | + | - Optionally you can also install [[:howto:telnet|telnet]] here. |
- | - Now we are almost done, just need to unmount ext3 partition with ''umount /mnt/dsmg600disk'' command. | + | - Now we are almost done, we just need to unmount ext3 partition with ''umount /mnt/dsmg600disk'' command. |
- | - And now you can take out your hard drive from your computer and install it to in your DSM-G600. | + | - And now you can take out the hard drive from your computer and install it in your DSM-G600. |
- | ==== 2. To a already partitioned hard drive using Linux ==== | + | ==== 2. To an already partitioned hard drive using Linux ==== |
- Take your hard disk out of your DSM-G600. | - Take your hard disk out of your DSM-G600. | ||
- Connect your already partitioned hard drive to a Linux (ext3 supported) PC. | - Connect your already partitioned hard drive to a Linux (ext3 supported) PC. | ||
- Run terminal as root user. | - Run terminal as root user. | ||
- | - We need first mount ext3 partition with this command line ''mkdir /mnt/dsmg600disk || mount /dev/hd<hi cyan>x</hi>2 /mnt/dsmg600disk''. The <hi cyan>x</hi> is your hard drive position, for example Primary Master is <hi cyan>a</hi>, Primary Slave is <hi cyan>b</hi>, Secondary Master is <hi cyan>c</hi> and Secondary Slave is <hi cyan>d</hi>. SATA and USB hard drives are most cases <hi cyan>a</hi>. | + | - We need first mount ext3 partition with this command line ''mkdir /mnt/dsmg600disk || mount /dev/hdx2 /mnt/dsmg600disk''. The x is your hard drive position, for example Primary Master is a, Primary Slave is b, Secondary Master is c and Secondary Slave is d. SATA and USB hard drives are most cases a. |
- Now create empty fun_plug file with this command ''touch /mnt/dsmg600disk/fun_plug'' | - Now create empty fun_plug file with this command ''touch /mnt/dsmg600disk/fun_plug'' | ||
- And now we are going to make it an a executable with this command ''chmod 777 /mnt/dsmg600disk/fun_plug'' | - And now we are going to make it an a executable with this command ''chmod 777 /mnt/dsmg600disk/fun_plug'' | ||
Line 92: | Line 92: | ||
- And now you can take out your hard drive from your computer and install it back to your DSM-G600. | - And now you can take out your hard drive from your computer and install it back to your DSM-G600. | ||
- | ==== 3. To a already partitioned hard drive using Linux and Samba ==== | + | ==== 3. To an already partitioned hard drive using Linux and Samba ==== |
- Boot up your DSM-G600. | - Boot up your DSM-G600. | ||
- Mount DSM-G600 share using following command line ''mount -t smbfs -o username=admin //<insert dsmg IP here>/HDD_a /mnt/somedir'' | - Mount DSM-G600 share using following command line ''mount -t smbfs -o username=admin //<insert dsmg IP here>/HDD_a /mnt/somedir'' | ||
Line 101: | Line 101: | ||
- | ==== 4. To a already partitioned hard drive using Windows and cygwin ==== | + | ==== 4. To an already partitioned hard drive using Windows and cygwin ==== |
- ... | - ... | ||
\\ | \\ | ||
Line 121: | Line 121: | ||
- quit ftp: quit | - quit ftp: quit | ||
- | and your done. You may edit the fun_plug via samba (windows share) from now on, the permissions will stick. | + | and you're done. You may edit the fun_plug via samba (windows share) from now on, the permissions will stick. |