Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2008, 08:09 AM
pepecito pepecito is offline
Member
 
Join Date: Nov 2005
Location: Torino, Italy
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to pepecito
Default Automount a second drive at boot time (or start time)
Hi all,
I have the need of get my second drive ad1s1 ntfs labeled 'data' already mounted when I log in PCBSD 7.0.1.
You may say that's easy, and I agree with you, really! I've been doing such things with previous version of PCBSD (since 0.7.3!!!) and I've been always able to get a number of mount point across my home network and local drives successfully mounted, thus the possibility to share data between different PC and also between different OS's on the same PC.

Well, sorry for the preamble, but just to say that I'm not new to this.

Ok, this is the scenario:

HD1:
ad0s1 fat32 (DELL resources)
ad0s2 ntfs (dual boot with XP)
ad0s3 PCBSD 7.0.1 (with its '/' and 'swap')
ad0s4 not used (too small to be used!)

HD2:
ad1s1 ntfs

The HD2 is correctly recognized and works properly:
1. is available as 'place' in dolphin;
2. when I click on it (under dolphin) it gets mounted under /media/data;
3. even not clicking on it I can mount it using the mount sheel command;

Since now every thing is ok.

Now the point:

I want that the ad1s1 HD labeled 'data' to be already mounted, because some applications, scripts, and so on, may need the path to it, and if not mounted the path doesn't exist and I gets errors.

To get this I considered 2 ways (later a thid way):

WAY1: use fstab!
PRO: HD should gets mounted at boot time, thus providing access to it ASAP.
CON: not user friendly setup, error on HD2 will interrupt the boot.
I got: NOTHING! Even if everything seems fine, in my mount point I get simply nothing! I tried with more mount pint, under mnt, home, /, and so on.
Tests: I tried mount -a and worked!
More: When rebooting, the mount point disappear, it has been deleted!

WAY2: use a script!
PRO: no problem at boot time, can perform specific test/checks if required (if one is able to shell-scripting).
CON: not user friendly.
I got: the script (under usr/local/etc/rc.d) run properly, and mount the second HD successfully, but after login, when I try to browse the mount point i get NOTHING! Just the same as WAY1.
Tests: I tried to manually run the script, and worked!
More: same as WAY1.

WAY3:
Later I discovered the possibility within KDE to execute some start scripts. There were already 2 of them available, but trying to make a 3rd simple script and let it run at startup gave me no results.

Is there something I'm missing? I'm really frustrated with this!
Could it be something related to HAL?

Any help will be appreciated!
Reply With Quote
  #2  
Old 11-04-2008, 10:07 AM
pepecito pepecito is offline
Member
 
Join Date: Nov 2005
Location: Torino, Italy
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to pepecito
Default Re: Automount a second drive at boot time (or start time)
It looks like someone else has got the same problem, even if in freebsd 6.2 instead of 7,...
BTW, this is the link: http://stackoverflow.com/questions/1...d-at-boot-time
:?
Reply With Quote
  #3  
Old 11-30-2008, 05:27 PM
MadonnaMia MadonnaMia is offline
Junior Member
 
Join Date: Nov 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Automount a second drive at boot time (or start time)
Hi buddy,
I also saw the disappearing of mount points, when I tried mounting NTFS partition with fstab. I did following to resolve this:

Modified fstab by adding a line for the partition:
/dev/ad0s4 /mnt/windata ntfs rw,auto,locale=en_US.UTF-8 0 0
- ntfs-3g filesytem type doesn't work directly, would need some more tuning
- btw setting the locale for mounting the filesystem is very useful (windows afaik uses UTF-8 when naming files), if your file names use some specific characters

Linked fuse.ko module from /usr/local/modules to /boot/kernel:
ln -s /usr/local/modules/fuse.ko /boot/kernel
And made it load on the start:
echo 'fusefs_load="YES"' >> /boot/loader.conf
- don't use adding fusefs_enable="YES" to /etc/rc.conf, because it will load the module too, but later during the booting process, after the actual mount of filesystems

Then just replace the mount_ntfs script with the direct link to /usr/local/bin/ntfs-3g:
cd /sbin && mv mount_ntfs mount_ntfs.pcbsd
ln -s /usr/local/bin/ntfs-3g mount_ntfs
- the mount_ntfs script should actually do the mounting of ntfs partition with ntfs-3g, but this doesn't work for me and I think it is suited for the HAL mounting in Dolphin


This should do the job for you. I hope I haven't forgotten anything.

Cheers, Jiri
Reply With Quote
  #4  
Old 12-13-2008, 10:53 PM
rodrigocastrillon rodrigocastrillon is offline
Junior Member
 
Join Date: Dec 2008
Location: São Paulo, Brazil
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Automount a second drive at boot time (or start time)
Mmmm...
A little question almost-not-to-do-with-the-title

I've edited my fstab file to mount my ext3(home) partition at boot time, the mounting works, but question marks are replacing my file's "á, ç, é, etc." characters. This is a charset error, but I tried the "locale=en_US.UTF-8", "utf8", "iocharset=utf8" and none of them are accepted.

Can someone give me a hint?

BTW, PCBSD just convinced me to switch from Linux to BSD lol! Great work guys!
Reply With Quote
  #5  
Old 12-14-2008, 04:53 AM
TerryP TerryP is offline
Senior Member
 
Join Date: Nov 2005
Location: Ga. USofA
Posts: 7,906
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to TerryP Send a message via AIM to TerryP Send a message via Yahoo to TerryP
Default Re: Automount a second drive at boot time (or start time)
FreeBSDs file system is basically indifferent, as long as a bytes still 8 bits on the i386/amd64... I would kind of hope ext2fs is likewise, because afaik, mount_ext2fs doesn't support any -o options beyond what the standard mount utility does.
Reply With Quote
  #6  
Old 12-14-2008, 02:51 PM
rodrigocastrillon rodrigocastrillon is offline
Junior Member
 
Join Date: Dec 2008
Location: São Paulo, Brazil
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Automount a second drive at boot time (or start time)
Yep... I've read the MAN pages of the mount and ext2fs commands. Mount command accepts locale options, but in ext2f's MAN there is no locale option.
I thought ext2fs was just like ntfs3g, that support the locale option...
But this is not a end-of-the-world issue... I'll keep diggin' a solution and post here as sooon as I get some directions.

Tks buddy!
Reply With Quote
  #7  
Old 12-14-2008, 06:04 PM
TerryP TerryP is offline
Senior Member
 
Join Date: Nov 2005
Location: Ga. USofA
Posts: 7,906
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to TerryP Send a message via AIM to TerryP Send a message via Yahoo to TerryP
Default Re: Automount a second drive at boot time (or start time)
The way things are with FreeBSD, you basically have a semi-abstract file system with various implementations of file system foo that do the leg work.


Generally when you call mount -t fstype [args] it handles what it understands and forwards the rest to mount_fstype, unless mount understands how to mount it; mount_fstype being a more specific program to the file system type (e.g. mount_nfs, mount_ext2fs). Some file systems tend to use a locale or charset option to specify the encoding to use for file name conversions (ntfs, msdosfs, cd9660), but UFS just treats it as 8-bit charactors, and leaves it to programs to figure out the encoding/charset/locale stuff.


The ext2fs drivers and utilities for FreeBSD don't seem to support an option for it. You can however set the LANG and LC_CTYPE variables to your encoding and (hopefully since KDE3 could) specify it in KDE4s control center. In the case of software, something unicode aware can be helpful.
Reply With Quote
  #8  
Old 12-14-2008, 09:13 PM
rodrigocastrillon rodrigocastrillon is offline
Junior Member
 
Join Date: Dec 2008
Location: São Paulo, Brazil
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Automount a second drive at boot time (or start time)
:mrgreen: :mrgreen: :mrgreen: U're right!!! This is nothing to do with the mount command or with mount options. Unix/Linux file systems are pretty smart asses.

I realized that my gtk apps was showing me the correct files and folders names, bu KDE wasn't. Then I dug a little and edited my ".login_conf" file:

Quote:
# $FreeBSD: src/share/skel/dot.login_conf,v 1.3 2001/06/10 17:08:53 ache Exp $
#
# see login.conf(5)
#
me:\
:charset=UTF-8:\
:lang=pt_BR.UTF-8:
Then I logged off and logged in back, and tada!!! lol

I think that a little "how to" about this would help new PCBSD (international) users, but usually BSD/Linux users are smart enough to figure out what's wrong.

Another idea is that the development guys should build some kind of app/script that edit the ",login_conf" file according to KDE's locale configuration. Cuz before the fix, my KDE was in Brazilian portuguese, but I could not type special characters (á, é, ü, etc) in the terminal and Dolphin wasn't "reading" corretly my filenames.

Well, that's all for now and thanks a lot for the help.
Reply With Quote
  #9  
Old 12-14-2008, 11:38 PM
TerryP TerryP is offline
Senior Member
 
Join Date: Nov 2005
Location: Ga. USofA
Posts: 7,906
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to TerryP Send a message via AIM to TerryP Send a message via Yahoo to TerryP
Default Re: Automount a second drive at boot time (or start time)
Originally Posted by rodrigocastrillon
I think that a little "how to" about this would help new PCBSD (international) users, but usually BSD/Linux users are smart enough to figure out what's wrong.

This is documented in the FreeBSD handbook :-)


I English and a varity of programming languages are my interface, and all my keyboards are US QWERTY style; so I've no idea what the installer does for localization. I do know this though, if it does not setup the environment correctly for the user, they are really cheating people -- unless the installers intent is to just let them use a keyboard and the correct time setting lol.


Sometimes I really wonder....
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu aims for ten-second boot time with 10.04 dejamuse The Lounge 0 06-10-2009 06:31 PM
[1.4Beta]wrong time in kopete, but right system tray time bestename General Bug Reports 3 08-03-2007 05:53 PM
Speed up PC-BSD boot time antik Tips and Tricks 3 03-25-2007 08:56 AM
KDM at boot time FreeBSD Help 0 12-17-2006 04:16 AM
boot time thomas General Questions 9 12-04-2006 04:41 PM


All times are GMT. The time now is 07:13 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.