Reply
Thread Tools
Jef91's Avatar
Posts: 191 | Thanked: 129 times | Joined on Dec 2009 @ Bloomington, IL
#1
I am trying to add a couple of lines to my /etc/fstab so I can have my media card automount when my device boots, however I have discovered that the /etc/fstab is autogenerated/reset every time my N900 starts... Is there a way I can make changes to my fstab in Maemo?

Thanks,
~Jeff
 
Posts: 40 | Thanked: 18 times | Joined on Dec 2009
#2
Since fstab is autogenerated I think one of the easiest ways to do it is to add your mount commands to /etc/event.d/rcS-late (I think that's where it is)

I think you'll see where the fstab is autogenerated, just add your mount commands after it

(edited to change /etc/init.d/rcS-late to /etc/event.d/rcS-late)
 
Posts: 207 | Thanked: 119 times | Joined on Nov 2009 @ Pittsburgh, PA, USA
#3
It is in "/etc/event.d/rcS-late" generation of new fstab happened in line:
sfdisk -l /dev/mmcblk0 | awk \
-v home_opts="$home_opts" -v fat_opts="$fat_opts" \
-f /usr/lib/genfstab.awk > $tmp_fstab
If you want to modify existing lines you (/home and /home/user/MyDocs) you should modify file /usr/lib/genfstab.awk

General parameters for mounting all ext3 and FAT stored in file /etc/default/mount-opts

But look like you just want to add line to fstab you need to add line
echo "whatever you wish here" >> /etc/fstab
to file "/etc/event.d/rcS-late" after line "rm -f $tmp_fstab"

command for mounting will be better to add just before line
"# We can safely continue booting now."

Happy New Year!!!!
 

The Following User Says Thank You to mikhmv For This Useful Post:
Jef91's Avatar
Posts: 191 | Thanked: 129 times | Joined on Dec 2009 @ Bloomington, IL
#4
Alrighty, so I was able to edit my /etc/event.d/rcS-late to get it to add the following two lines to my /etc/fstab:
Code:
/dev/mmcblk1p2 /usr ext3 defaults 0 0
/dev/mmcblk1p3 /var ext3 defaults 0 0
However upon restarting the device these two partitions where not auto-mounted as they should have been.

So I took your other piece of advice and instead add the commands t manually mount the partitions right before the # We can safely continue booting now... And well, that successfully bricked my phone again (haha third I've done that in the last two days now).

Anyone have suggestions on what I can do to get my /usr and /var to mount to a different partition? This is a fair simple thing to do on any other Linux distro so I am irked that Maemo 5 is giving me so many issues with it >.<

Regards,
~Jeff
 
Posts: 207 | Thanked: 119 times | Joined on Nov 2009 @ Pittsburgh, PA, USA
#5
look like playing with this file very easy can brick your phone! My bricked now too (http://talk.maemo.org/showthread.php...517#post449517). I hope somebody will give advice how to debrick device without flashing....

You didn't mention that you want to play with /usr and /var

I successfully tried to modify MyDocs to ext3 before by changing /usr/lib/genfstab.awk. For mounting i used (final line in fstab):

/dev/mmcblk0p1 /home/user/MyDocs ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0

and for mounting command:
/bin/mount /home/user/MyDocs

EDIT:
Don't convert MyDocs to ext3..... Camera not working if MyDocs other than FAT32
 
Jef91's Avatar
Posts: 191 | Thanked: 129 times | Joined on Dec 2009 @ Bloomington, IL
#6
Originally Posted by mikhmv View Post
look like playing with this file very easy can brick your phone! My bricked now too (http://talk.maemo.org/showthread.php...517#post449517). I hope somebody will give advice how to debrick device without flashing....
Haha, if you figure that out please let me know... I've re-flashed my device three times now... thankfully it saves my address book and calender when I re-flash the phone.

IMO this is why Maemo should have a fail-safe/recovery terminal like most other distros...

~Jeff
 
Posts: 543 | Thanked: 181 times | Joined on Aug 2009 @ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
#7
Jef91 see: http://wiki.maemo.org/User:Ruskie#Repartitioning And the forum post linked from there. You'll get quite exact info on how to do it :)

And again what's with the "that other distros have" ???

If you mean init=/bin/bash or init 1 etc... then yeah... tat is a valid boot state but that is NOT a recovery terminal. It's normal system bootup.
__________________
For any repos or anything else I might have working on my N900 see:
http://wiki.maemo.org/User:Ruskie
A quick list of what I have in the repos
zsh|xmms2|fcron|gtar|gcoreutils

Last edited by ruskie; 2010-01-02 at 10:12.
 

The Following User Says Thank You to ruskie For This Useful Post:
Jef91's Avatar
Posts: 191 | Thanked: 129 times | Joined on Dec 2009 @ Bloomington, IL
#8
Originally Posted by ruskie View Post
Jef91 see: http://wiki.maemo.org/User:Ruskie#Repartitioning And the forum post linked from there. You'll get quite exact info on how to do it
OMG! Thank you! I've been trying for the last two days to get this little bugger repartitioned!

~Jeff
 
Posts: 207 | Thanked: 119 times | Joined on Nov 2009 @ Pittsburgh, PA, USA
#9
Originally Posted by ruskie View Post
Jef91 see: http://wiki.maemo.org/User:Ruskie#Repartitioning And the forum post linked from there. You'll get quite exact info on how to do it

And again what's with the "that other distros have" ???

If you mean init=/bin/bash or init 1 etc... then yeah... tat is a valid boot state but that is NOT a recovery terminal. It's normal system bootup.
In one of your posts I have seen that using /usr on eMMC is slower. Is it significantly slower?
 
Posts: 543 | Thanked: 181 times | Joined on Aug 2009 @ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
#10
You notice it on bootup when all the desktop icons aren't yet there. But after that usually not even noticable.
__________________
For any repos or anything else I might have working on my N900 see:
http://wiki.maemo.org/User:Ruskie
A quick list of what I have in the repos
zsh|xmms2|fcron|gtar|gcoreutils
 

The Following User Says Thank You to ruskie For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 14:33.