Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[NOT YET SOLVED]: Acessing the Mac OSX from Gentoo
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Fri May 11, 2018 7:38 pm    Post subject: [NOT YET SOLVED]: Acessing the Mac OSX from Gentoo Reply with quote

Hi,
I need to mount Mac partition on my Gentoo laptop to perform some operations.
Googling found this, but I don't know if its up to date.

Is there any relatively recent guide to how to mount OSX partition in Gentoo?
Kernel options, additional packages, troubleshooting, etc? Or the one I referenced is good?

Thank you.


Last edited by ONEEYEMAN on Thu May 24, 2018 3:31 pm; edited 2 times in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6525
Location: Saint Amant, Acadiana

PostPosted: Fri May 11, 2018 8:03 pm    Post subject: Reply with quote

I've tried this once. The filesystem module loaded, I still could not access the files. It wasn't important for me and I didn't try hard, but something made me think the filesystem was encrypted. Maybe macOS encrypts without even asking the user. Just my 2¢.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19617
Location: here

PostPosted: Fri May 11, 2018 8:05 pm    Post subject: Reply with quote

But what file system hfs or apfs?
For hfs there is support in kernel
Code:
# grep HFS /usr/src/linux/.config
CONFIG_HFS_FS=m
CONFIG_HFSPLUS_FS=m
CONFIG_HFSPLUS_FS_POSIX_ACL=y


For apfs not idea never tried but I find a project for fuse
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Sat May 12, 2018 11:23 pm    Post subject: Reply with quote

Hi,
fedeliallalinea wrote:

But what file system hfs or apfs?
For hfs there is support in kernel
Code:

# grep HFS /usr/src/linux/.config
CONFIG_HFS_FS=m
CONFIG_HFSPLUS_FS=m
CONFIG_HFSPLUS_FS_POSIX_ACL=y



Do I have to install anything for it to work?
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Sat May 12, 2018 11:34 pm    Post subject: Reply with quote

I also tried this:

Code:

igor@IgorReinCloud ~/dbhandler $ ssh igorkorot@192.168.1.3:/dbhandler/dbhandler < git pull
bash: git: No such file or directory
igor@IgorReinCloud ~/dbhandler $ git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/oneeyeman1/dbhandler
   667ca95..4a93607  master     -> origin/master
Updating 667ca95..4a93607
Fast-forward
 libdbwindow/databasecanvas.cpp | 1 +
 1 file changed, 1 insertion(+)


which should execute the git command from the Gentoo machine remotely on the Mac, but that attempt failed.

Maybe there is a better way?

Thank you.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6840

PostPosted: Sat May 12, 2018 11:54 pm    Post subject: Reply with quote

ONEEYEMAN wrote:
Maybe there is a better way.

Never put my hands on OSX, but i'm pretty it have nfsd no?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19617
Location: here

PostPosted: Sun May 13, 2018 7:39 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Do I have to install anything for it to work?

Maybe sys-fs/hfsutils, but I have to check on my system at work
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Sun May 13, 2018 12:22 pm    Post subject: Reply with quote

ONEEYEMAN wrote:
Code:
igor@IgorReinCloud ~/dbhandler $ ssh igorkorot@192.168.1.3:/dbhandler/dbhandler < git pull
bash: git: No such file or directory

ONEEYEMAN ... you're redirecting stdin from a (non-existant) file ("git") on localhost, so the command to be exectuted on 192.168.1.3 is taken as input. You're also providing path for some unknown reason, in short your syntax is wrong ...

Code:
% ssh igorkorot@192.168.1.3 "cd /dbhandler/dbhandler ; git pull"

That said, this is altogether different from "mount[ing] mac partition" as "partition" is not "filesystem", the former is a section of disk, and the later is the path on which the disk is mounted (in comon parlance the "mount point"). So, if you access the machine remotely then any "mounting" (and so the ability to read/write to that filesystem) is provided by macOS.

So, what is it you need to do, mount the (HFS, HFS+, APFS) filesystem from linux, or access that filesystem from a remote host?

HTH & best ... khay
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19617
Location: here

PostPosted: Sun May 13, 2018 12:35 pm    Post subject: Reply with quote

Other thing I think you can not write on hfs+ if the journaling is active
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Sun May 13, 2018 2:40 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Other thing I think you can not write on hfs+ if the journaling is active

fedeliallalinea ... yes, but you can disable the journal via "Disk Utility" (gui) or "diskutil" (cli) ... still, this wouldn't matter at all if ONEEYEMAN is accessing the filesystem remotely, which at the moment isn't clear.

best ... khay
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Sun May 13, 2018 4:34 pm    Post subject: Reply with quote

Hi,
khayyam wrote:

ONEEYEMAN wrote:

Code:

igor@IgorReinCloud ~/dbhandler $ ssh igorkorot@192.168.1.3:/dbhandler/dbhandler < git pull
bash: git: No such file or directory


ONEEYEMAN ... you're redirecting stdin from a (non-existant) file ("git") on localhost, so the command to be exectuted on 192.168.1.3 is taken as input. You're also providing path for some unknown reason, in short your syntax is wrong ...

Code:

% ssh igorkorot@192.168.1.3 "cd /dbhandler/dbhandler ; git pull"



The command above will connect to the machine, switch to the directory and will execute "git pull" from the remote machine.
The trouble is I am running OSX 10.8 which have an outdated version of Git/OpenSSL. And so when I try to run git from Mac it fails with the authentication issue, since GitHub switched from 1.0 to 1.2 certs.

So, since I can successfully run "git" on Gentoo, I thought to do this:

1. Connect (or mount to) OSX machine (192.168.1.3).
2. Switch directory on the remote to ~/dbhandler/dbhandler.
3. Execute "git pull" from the Gentoo machine to update remote repository that is located on Mac.

This is my end goal - perform step #3.

Thank you.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Sun May 13, 2018 9:37 pm    Post subject: Reply with quote

ONEEYEMAN wrote:
So, since I can successfully run "git" on Gentoo, I thought to do this:

1. Connect (or mount to) OSX machine (192.168.1.3).
2. Switch directory on the remote to ~/dbhandler/dbhandler.
3. Execute "git pull" from the Gentoo machine to update remote repository that is located on Mac.

ONEEYEMAN ... as macOS provides ssh it should be as simple as enabling CONFIG_FUSE_FS and using net-fs/sshfs to "sshfs mount" the remote filesystem to the gentoo machines filesystem ... and then do whatever operations are required ('git pull', etc).

Code:
% mkdir dbhandler-local
% sshfs igorkorot@192.168.1.3:/dbhandler/dbhandler dbhandler-local
% cd dbhandler-local
% git pull
% fusermount -u dbhandler-local

HTH & best ... khay
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1353
Location: KUUSANKOSKI, Finland

PostPosted: Sun May 13, 2018 9:47 pm    Post subject: Reply with quote

Be careful with HFS. If you move files out of HFS to a linux partition you'll lose the resource forks of the files. This includes HFS+ too and maybe even APFS.
I did backups from my old Macintosh to my linux machine back in the days... It didn't turn out well when I needed to accees the files later...
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12805

PostPosted: Sun May 13, 2018 10:37 pm    Post subject: Reply with quote

Wouldn't it be easier to update Git/OpenSSL on the Mac so that it works directly with modern servers? There are probably other advantages to this, likely including security fixes.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Sun May 13, 2018 11:04 pm    Post subject: Reply with quote

Hi
khayyam wrote:

ONEEYEMAN wrote:

So, since I can successfully run "git" on Gentoo, I thought to do this:

1. Connect (or mount to) OSX machine (192.168.1.3).
2. Switch directory on the remote to ~/dbhandler/dbhandler.
3. Execute "git pull" from the Gentoo machine to update remote repository that is located on Mac.

ONEEYEMAN ... as macOS provides ssh it should be as simple as enabling CONFIG_FUSE_FS and using net-fs/sshfs to "sshfs mount" the remote filesystem to the gentoo machines filesystem ... and then do whatever operations are required ('git pull', etc).

Code:

% mkdir dbhandler-local
% sshfs igorkorot@192.168.1.3:/dbhandler/dbhandler dbhandler-local
% cd dbhandler-local
% git pull
% fusermount -u dbhandler-local

HTH & best ... khay[


Almost there:

Code:

IgorReinCloud mac # git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/oneeyeman1/dbhandler
   45bef9b..082bbf4  master     -> origin/master

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@IgorReinCloud.(none)')


I didn't have to do that when I was able to run git from my Mac directly.
And when I am updating my repo on Gentoo I am providing the id/password pair.

Why it didn't ask me for credentials? And what should I do to fix that error?

P.S.: I tried to run those command on my Mac machine locally, but it didn't help.

Thank you.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Mon May 14, 2018 1:32 am    Post subject: Reply with quote

Hu wrote:
Wouldn't it be easier to update Git/OpenSSL on the Mac so that it works directly with modern servers? There are probably other advantages to this, likely including security fixes.

Hu ... there are package managers for macOS (like homebrew) that would allow you to do this, but I'd have to question the reason for using macOS at all when there is a linux machine on hand :)

ONEEYEMAN wrote:
Code:
fatal: unable to auto-detect email address (got 'root@IgorReinCloud.(none)')

ONEEYEMAN ... what is the FQDN of IgorReinCloud? Please provide the output of 'hostname --fqdn' and 'grep "^127" /etc/hosts'.

best ... khay
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Mon May 14, 2018 3:21 am    Post subject: Reply with quote

khayyam wrote:

Hu wrote:

Wouldn't it be easier to update Git/OpenSSL on the Mac so that it works directly with modern servers? There are probably other advantages to this, likely including security fixes.

Hu ... there are package managers for macOS (like homebrew) that would allow you to do this, but I'd have to question the reason for using macOS at all when there is a linux machine on hand :)

Well, I have OSX 10.8 and it looks like Apple won't supply latest version of OpenSSL for this version.
I can do it manually, but it is more pain to operate with 2 versions of the same software.

khayyam wrote:

ONEEYEMAN wrote:

Code:

fatal: unable to auto-detect email address (got 'root@IgorReinCloud.(none)')


ONEEYEMAN ... what is the FQDN of IgorReinCloud? Please provide the output of 'hostname --fqdn' and 'grep "^127" /etc/hosts'.


Here is the output:

Code:

IgorReinCloud mac # hostname -fqdn
hostname: invalid option -- 'q'
Usage: hostname [-v] {hostname|-F file}      set hostname (from file)
       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)
       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name
       hostname [-v]                         display hostname

       hostname -V|--version|-h|--help       print info and exit

    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y

    -s, --short           short host name
    -a, --alias           alias names
    -i, --ip-address      addresses for the hostname
    -f, --fqdn, --long    long host name (FQDN)
    -d, --domain          DNS domain name
    -y, --yp, --nis       NIS/YP domainname
    -F, --file            read hostname or NIS domainname from given file

   This command can read or set the hostname or the NIS domainname. You can
   also read the DNS domain or the FQDN (fully qualified domain name).
   Unless you are using bind or NIS for host lookups you can change the
   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is
   part of the FQDN) in the /etc/hosts file.


It looks like those options are exclusive.

Code:

IgorReinCloud mac # grep "127" /etc/hosts
127.0.0.1   IgorReinCloud   IgorReinCloud   localhost


Thank you.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Mon May 14, 2018 9:08 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Code:
IgorReinCloud mac # hostname -fqdn
hostname: invalid option -- 'q'
[...]
 -f, --fqdn, --long    long host name (FQDN)

ONEEYEMAN ... '--fqdn', not '-fqdn' ...

ONEEYEMAN wrote:
Code:
IgorReinCloud mac # grep "127" /etc/hosts
127.0.0.1   IgorReinCloud   IgorReinCloud   localhost

OK, so your canonical name is not a FQDN ...

/etc/hosts:
127.0.0.1   IgorReinCloud.local   IgorReinCloud   localhost

EDIT ... wait a minute, why does the above prompt say "IgorReinCloud mac"? This should be the machine from which the sshfs is run, not the "mac".

HTH & best ... khay
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Mon May 14, 2018 11:41 am    Post subject: Reply with quote

Hi,
khayyam wrote:

ONEEYEMAN wrote:

Code:

IgorReinCloud mac # hostname -fqdn
hostname: invalid option -- 'q'
[...]
 -f, --fqdn, --long    long host name (FQDN)


ONEEYEMAN ... '--fqdn', not '-fqdn' ...


Code:

IgorReinCloud mac # hostname --fqdn
IgorReinCloud


khayyam wrote:

ONEEYEMAN wrote:

Code:

IgorReinCloud mac # grep "127" /etc/hosts
127.0.0.1   IgorReinCloud   IgorReinCloud   localhost


OK, so your canonical name is not a FQDN ...

/etc/hosts:
127.0.0.1   IgorReinCloud.local   IgorReinCloud   localhost

EDIT ... wait a minute, why does the above prompt say "IgorReinCloud mac"? This should be the machine from which the sshfs is run, not the "mac".


Because the mountpoint is "/mnt/mac".
Or you are asking wjy it is displaying "IgorReinCloud"? I thought it is how sshfs works...

Thank you.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Mon May 14, 2018 2:47 pm    Post subject: Reply with quote

ONEEYEMAN wrote:
Because the mountpoint is "/mnt/mac".

ONEEYEMAN ... due to your PS1 its path is trunctated, and without any seperator it's not clear what part of the prompt is what ...

Code:
[root@aporia: ~]# mkdir /mnt/mac ; cd /mnt/mac
[root@aporia: /mnt/mac]#

ONEEYEMAN wrote:
Or you are asking wjy it is displaying "IgorReinCloud"? I thought it is how sshfs works...

No, I was asking why I saw 'IgorReinCloud mac', I was thinking it may have been the macOS machine as macOS isn't strict about spaces, and I couldn't see why 'mac' would be there ... anyhow, did you adjust /etc/hosts to what I provided above? ... the following suggest you haven't:

ONEEYEMAN wrote:
Code:
IgorReinCloud mac # hostname --fqdn
IgorReinCloud

That should be a FQDN ("fully qualified domain name") and it isn't.

best ... khay
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Tue May 15, 2018 1:04 am    Post subject: Reply with quote

khay,
I modified /etc/hosts and "git pull" finished successfully.

Thank you.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Tue May 15, 2018 1:22 am    Post subject: Reply with quote

ONEEYEMAN ...

you're welcome ... please mark the thread '[SOLVED]'.

best ... khay
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Thu May 24, 2018 3:30 pm    Post subject: Reply with quote

khayyam wrote:

ONEEYEMAN wrote:

Code:

IgorReinCloud mac # hostname -fqdn
hostname: invalid option -- 'q'
[...]
 -f, --fqdn, --long    long host name (FQDN)


ONEEYEMAN ... '--fqdn', not '-fqdn' ...

ONEEYEMAN wrote:

Code:

IgorReinCloud mac # grep "127" /etc/hosts
127.0.0.1   IgorReinCloud   IgorReinCloud   localhost


OK, so your canonical name is not a FQDN ...

/etc/hosts:

127.0.0.1   IgorReinCloud.local   IgorReinCloud   localhost

EDIT ... wait a minute, why does the above prompt say "IgorReinCloud mac"? This should be the machine from which the sshfs is run, not the "mac".

HTH & best ... khay


OK, so I modified the /etc/hosts file by changing "IgorReinCloud" to "IgorReinCloud.local" and everything was good, until I needed a reboot.
After the reboot I lost an internet connection - ping was not working anymore.

Removing ".local" restored it, but unfortunately this is not the solution I'm looking for.

What am I missing? Why the network access was lost after that change?

Thank you.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6210
Location: Room 101

PostPosted: Thu May 24, 2018 4:36 pm    Post subject: Reply with quote

ONEEYEMAN wrote:
OK, so I modified the /etc/hosts file by changing "IgorReinCloud" to "IgorReinCloud.local" and everything was good, until I needed a reboot. After the reboot I lost an internet connection - ping was not working anymore.

ONEEYEMAN ... please provide output of the failed ping, etc, saying the network isn't working tells us nothing. Also, the output of the following (with the supposedly "not working" configuration).

Code:
# egrep '^127' /etc/hosts
# cat /etc/resolv.conf
# ip route
# ip addr show
# ping -c 1 1.1.1.1

best ... khay
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2754

PostPosted: Fri May 25, 2018 3:16 am    Post subject: Reply with quote

Hi,
I tried to reproduce it again and failed.
Right now I booted inside the modified /etc/hosts and I do have a network access/Internet with the IP address.

I will try to monitor this and hopefully will hit it at some point.

Thank you and sorry for the noise.

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum