editing etc/fstab raspberry pi

Hi

I am trying to edit /etc/fstab on my raspberry pi volumio installation, to mount a new partition.
It works fine ; however when I reboot /etc/fstab is overwritten.

How do I stop this happening ?

Thanks
Richard.

This is because of a security check. To disable it,

sudo nano +1246 /var/www/inc/player_lib.php

you’ll see that

// (RaspberryPi arch) if ($arch == '01') { $a = '/boot/cmdline.txt'; $b = '/var/www/_OS_SETTINGS/boot/cmdline.txt'; if (md5_file($a) != md5_file($b)) { sysCmd('cp '.$b.' '.$a.' '); // /etc/fstab $a = '/etc/fstab'; $b = '/var/www/_OS_SETTINGS/etc/fstab_raspberry'; if (md5_file($a) != md5_file($b)) { sysCmd('cp '.$b.' '.$a.' '); $reboot = 1; } } }

comment it, making it become :

// (RaspberryPi arch) // if ($arch == '01') { // $a = '/boot/cmdline.txt'; // $b = '/var/www/_OS_SETTINGS/boot/cmdline.txt'; // if (md5_file($a) != md5_file($b)) { // sysCmd('cp '.$b.' '.$a.' '); // // /etc/fstab // $a = '/etc/fstab'; // $b = '/var/www/_OS_SETTINGS/etc/fstab_raspberry'; // if (md5_file($a) != md5_file($b)) { // sysCmd('cp '.$b.' '.$a.' '); // $reboot = 1; // } // } // }

And there you go. Let me know!

PS: a reboot is requested!

Can this be used to create a new partition on the SD card and mount it in the appropriate place to have a local/embedded library ?
If so:

  • what would be the best mount point ?
  • Are there any other modifications to do to have this local mount point also indexed ?

Thank you very much in advance for your answer.

BTW, as this is my first post… let me congratulate yall for the very very nice work done on this project.

FORZA !
Bests

Why not modifying the fstab_raspberry?

Thanks for the reply,

I solved it slightly differently , by adding my mount command to one of the other startup scripts, think it was etc/init.d/mount_all

That might not be he correct way , but it seemed to do the job.

For information I wanted a local store of music - I have built a jukebox using volumio - so I created another partition , and mounted it under /mnt/usb which meant I could then use standard volumio to add all the tracks to its library.

It’s working well for me - great work on this project !

Hi

I am new to this but I have managed to successfully mount a windows network drive (using cifs) by editing the /etc/fstab. However, when rebooting the fstab is overwritten and my network drive is no longer available Can I assume that by commenting out the section of player_lib.php as in the reply above it will be effective at ensuring that fstab is not overwritten during a reboot?

On another point, is there a method to save a playlist as a .pls file (or similar) so that it can be played again in the future?

Thanks and keep up the great work. I am impressed.