Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: johns420 on October 26, 2009, 11:20:36 PM

Title: Persistent USB
Post by: johns420 on October 26, 2009, 11:20:36 PM
I have TinyCore installed to a flash drive and am able to boot from it.  Once booted, I can mount the local drives on the machine manually, but I need the drives to be mounted automatically. 

I have edited /etc/fstab and added in what I believed to be the necessary lines but when I restart the computer and boot again, the changes to fstab are not saved.

How do I make the changes stay or at least modify it enough to mount all drives in the system on boot.
Title: Re: Persistent USB
Post by: Jason W on October 26, 2009, 11:47:21 PM
If I was to mount a drive automatically, the easiest way would be to put "mount /dev/sda1" in /opt/bootlocal.sh and perform a backup so it would persist and run that command on next reboot.

Title: Re: Persistent USB
Post by: jls on October 27, 2009, 06:18:45 AM
I have my mount command in .profile since mount can be done form normal user.
Title: Re: Persistent USB
Post by: johns420 on October 27, 2009, 08:52:48 AM
If I was to mount a drive automatically, the easiest way would be to put "mount /dev/sda1" in /opt/bootlocal.sh and perform a backup so it would persist and run that command on next reboot.



Two questions on this method. 

1)  How would this work with an unknown computer?  Say it had 2 local drives or 2 paritions on the one drive.  Would it mount both or just the drive that is recognized as sda1

2)  You say perform a backup, how is this done?
Title: Re: Persistent USB
Post by: jls on October 27, 2009, 09:39:19 AM
open the control panel and press help
Title: Re: Persistent USB
Post by: johns420 on October 27, 2009, 09:49:56 AM
No control panel/gui, when I boot its just a command line.
Title: Re: Persistent USB
Post by: bmarkus on October 27, 2009, 09:53:08 AM
No control panel/gui, when I boot its just a command line.

Are you using TC or MC?
Title: Re: Persistent USB
Post by: johns420 on October 27, 2009, 09:55:16 AM
MC 2.4.1, probably in the wrong spot....
Title: Re: Persistent USB
Post by: curaga on October 30, 2009, 06:08:16 AM
Just mount via UUID. Then the drive can be mounted no matter what it is seen as on the computer.

mount -U uuid /mnt/somedir
Title: Re: Persistent USB
Post by: jls on October 31, 2009, 07:42:35 AM
Just mount via UUID. Then the drive can be mounted no matter what it is seen as on the computer.

mount -U uuid /mnt/somedir
I've noticed that while the usual mount command can be executed by the nomal user (for example tc), the above command must be run by root.
Any problem then with permissions in files/dirs?
Title: Re: Persistent USB
Post by: curaga on October 31, 2009, 07:45:42 AM
No, it's the unix philosophy. An user can only mount what The Superuser has told he can, by creating the directory, giving permissions, and adding an fstab entry saying that he can.

edit:
Example fstab line, if this is desired:
Quote
LABEL=MyStick      /mnt/sdc1    auto   defaults,noauto,users  0     0