WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Persistent USB  (Read 4986 times)

Offline johns420

  • Newbie
  • *
  • Posts: 5
Persistent USB
« 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.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Persistent USB
« Reply #1 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.


Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Persistent USB
« Reply #2 on: October 27, 2009, 06:18:45 AM »
I have my mount command in .profile since mount can be done form normal user.
dCore user

Offline johns420

  • Newbie
  • *
  • Posts: 5
Re: Persistent USB
« Reply #3 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?

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Persistent USB
« Reply #4 on: October 27, 2009, 09:39:19 AM »
open the control panel and press help
dCore user

Offline johns420

  • Newbie
  • *
  • Posts: 5
Re: Persistent USB
« Reply #5 on: October 27, 2009, 09:49:56 AM »
No control panel/gui, when I boot its just a command line.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Persistent USB
« Reply #6 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?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline johns420

  • Newbie
  • *
  • Posts: 5
Re: Persistent USB
« Reply #7 on: October 27, 2009, 09:55:16 AM »
MC 2.4.1, probably in the wrong spot....

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Persistent USB
« Reply #8 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
The only barriers that can stop you are the ones you create yourself.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Persistent USB
« Reply #9 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?
dCore user

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Persistent USB
« Reply #10 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
« Last Edit: October 31, 2009, 07:47:58 AM by curaga »
The only barriers that can stop you are the ones you create yourself.