WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Auto-mounting a partition in cloud mode  (Read 3717 times)

Offline suicidal_orange

  • Newbie
  • *
  • Posts: 5
Auto-mounting a partition in cloud mode
« on: April 21, 2014, 10:28:51 AM »
I'm trying to remaster the smallest version of piCore so that it mounts the partition on the SD card and copies some config files off, so changes can be made by a Windows user.

I've tried adding it to fstab and adding a mount command in both bootsync.sh and bootlocal.sh but whatever I do the partition does not get mounted and any errors that may be displayed are gone before I have a chance to see them - adding a "sleep" to the script does not help. 

I know this goes against the idea of cloud mode but I only want it mounted for a few seconds, surely it's possible...

Any ideas what I'm missing?

EDIT: I'm missing that my script fails before it gets to the mount line...  Still intrigued as to why fstab is ignored though.
« Last Edit: April 21, 2014, 10:45:27 AM by suicidal_orange »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Auto-mounting a partition in cloud mode
« Reply #1 on: April 21, 2014, 10:56:17 AM »
It is not clear what do you want to do. Please be more specific and provide details. How is your SD card partitioned and from where do you want to copy files to where?
Béla
Ham Radio callsign: HA5DI

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

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1251
Re: Auto-mounting a partition in cloud mode
« Reply #2 on: April 21, 2014, 11:02:12 AM »
I just concatenate to fstab from the bootlocal script before mounting.
Then mount the partition.


Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11666
Re: Auto-mounting a partition in cloud mode
« Reply #3 on: April 21, 2014, 11:55:27 AM »
Hi suicidal_orange
Quote
... so changes can be made by a Windows user.
Make sure you use a simple text editor like  Notepad. After copying the files back, run  dos2unix  on them.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Auto-mounting a partition in cloud mode
« Reply #4 on: April 21, 2014, 11:55:38 AM »
I just concatenate to fstab from the bootlocal script before mounting.
Then mount the partition.

Working with partitions on the SD card or USB devices there are no reason to touch fstab. rebuildfstab command updates fstab and creates mounting points in /mnt during startup or via udev when a new device attached. But yiu can run it manually or from your script risk free any time.
Béla
Ham Radio callsign: HA5DI

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

Offline suicidal_orange

  • Newbie
  • *
  • Posts: 5
Re: Auto-mounting a partition in cloud mode
« Reply #5 on: April 21, 2014, 12:11:19 PM »
It is not clear what do you want to do. Please be more specific and provide details. How is your SD card partitioned and from where do you want to copy files to where?
I enlarged the default partition, it's the only one on the card.

All I want to do is boot, copy some files from /mnt/mmcblk0p1 to /dev/shm (seemed as good as anywhere...) then unmount the partition - I now have it working using the script.

Quote from: Rich
Make sure you use a simple text editor like  Notepad. After copying the files back, run  dos2unix  on them.
I was wondering if there would be issues, once it works I'd have tested.  Thanks for the heads up :)

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1251
Re: Auto-mounting a partition in cloud mode
« Reply #6 on: April 21, 2014, 01:10:10 PM »
Working with partitions on the SD card or USB devices there are no reason to touch fstab. rebuildfstab command updates fstab and creates mounting points in /mnt during startup or via udev when a new device attached. But yiu can run it manually or from your script risk free any time.

I meant for remote mounts. 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Auto-mounting a partition in cloud mode
« Reply #7 on: April 21, 2014, 01:18:04 PM »
What do you mean remote mount? Are we talking about samba, cifs, nfs, ... ?
Béla
Ham Radio callsign: HA5DI

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

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1251
Re: Auto-mounting a partition in cloud mode
« Reply #8 on: April 21, 2014, 03:22:57 PM »
What do you mean remote mount? Are we talking about samba, cifs, nfs, ... ?

SMB (cifs)