Archive

Posts Tagged ‘link’

How to have both Mac Os X and Linux installed and share the same home directory files

February 27th, 2009 bodom_lx 2 comments

So much time since my last post! I’m sure that the best way to come back to blog posting is a nice tutorial.
I’m going to write how to have the same home directory shared between Mac Os X and Gnu/Linux. Let me call Gnu/Linux just Linux from now on.

A unique place for your working directory on both Mac Os X and Linux!

The configuration I’m proposing should be very confortable, as it works with symbolic links.
It lets you to boot either Mac Os X or Linux and have the same directories and files for your everyday use. Meanwhile, the important configuration files and directories (e.g. ~/Library for Mac Os X, ~/.config for Linux) are kept separately on their corresponding partitions.
Another advantage of this configuration is that you can have a small partition dedicated to Linux – let’s say 10GB but could be even less – just for installing the programs you need, while your videos, documents, music files are kept inside the biggest partition, the one for Mac Os X.

Disclaimer, assumptions

Basically, you will mount your Mac Os X root partition in Linux, and soft-link your important directories to your Linux home directory.
You will then use them as there were real directories in your Linux home directory. For this how to, there are a couple of things I assume that:

  • You have Linux installed and running natively on your Mac(Book). I’m going to give commands with sudo, so configure it if you’re not using Ubuntu-based distros!
  • You know your partition layout. The following is mine. I’m going to use it as example:

    disk0s2 /dev/sda2 MacOsx /
    disk0s3 /dev/sda3 Linux /
    disk0s4 /dev/sda4 Swap

  • You have a clean Linux home directory. This means that you don’t have directories whose names are in conflict with those on your Mac Os X home directory
  • You are going to disable file system journaling on your Mac Os X root partition! Please read carefully this Wikipedia page about journaling and this Apple page about HFS+ journaling if you need more information.

Boot Mac Os X

Follow these instructions under Mac Os X:

Open a Terminal.

Identify your Mac Os X root partition:

$ sudo diskutil list

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *111.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS MacOsX 99.9 Gi disk0s2
3: EFI 10.7 Gi disk0s3
4: Linux Swap 1.0 Gi disk0s4

Disable file system journaling for the partition:

$ sudo diskutil disablejournal disk0s2

Do a ls -n of your home directory to discover your user id uid:

$ ls -n

total 0
drwx——+ 11 501 20 374 25 Feb 17:43 Desktop
drwxrwxrwx+ 32 501 20 1088 26 Feb 18:19 Documents
drwxrwxrwx+ 8 501 20 272 26 Feb 18:06 Downloads
[Few Others ...]

My UID is 501. Keep your UID in mind, you will need it under Linux. You obtain the same results by using the command “id”.
Reboot your Mac.

Boot Linux

Follow these instructions in a linux shell.

Change your Linux user id (UID). To correctly share the same home directory between both OS, you need to have on Linux the same UID of your Mac Os X user.

sudo usermod -u <uid> <username>

(sudo usermod -u 501 bodom_lx in my case)

To have your new UID applied, either reboot or logout from every shell you opened, even from your desktop environment. Login again.

Create a directory in which you are going to mount Mac Os X root partition:

sudo mkdir /media/</strong>MacOsX</strong
sudo chmod 775 /media/</strong>MacOsX</strong>

put this line at the end of /etc/fstab, as root, with your favourite editor:

/dev/sda2 /media/MacOsX hfsplus rw,nosuid,nodev,uhelper=hal 0 0

Remember to change sda2 and MacOsX

Either reboot the system or type:

sudo mount /media/MacOsX

To mount your Mac Os X root directory in your mount point directory.

Now cd to your Linux home directory and begin to soft-link all of your important Mac Os X directories. Here are some of those I needed:

ln -s /media/MacOsX/Users/bodom_lx/Documents/ .
ln -s /media/MacOsX/Users/bodom_lx/Pictures/ .
ln -s /media/MacOsX/Users/bodom_lx/Projects/ .
[…and many more]
 

Don’t soft-link the Library directory.

Conclusions

Now you have the same important files shared on both Mac Os X and Linux, while the important hidden configuration files are kept in separate phyisical places.
You can listen to your Itunes mp3 collection on both operating systems. You can now develop programs under Gnu/Linux. You can reboot your machine to Mac Os X and take notes during the lectures, and so on! Hope you liked this how to, and comment it as well. Contact me if you find some mistakes or you’re in trouble!

Related posts

Morak, album Resurrecturi available for FREE

December 27th, 2008 bodom_lx 3 comments

After so many problems regarding studio registration, promotion, album printing, mastering, …, me and my group decided to release our fantastic self-produced EP Resurrecturi under a Creative Commons Free License!
Yes, you can download the whole album for free, under some conditions regarding the modification of the songs and making profit with them.

Check more details about the license here.

Morak - Resurrecturi Cover Art

Morak - Resurrecturi Cover Art

There is a torrent of Resurrecturi on mininova.
There is also a Vuze download.

update:

Other trackers are hosting the torrent, check the links and use the ones with more seeders :-)

mininova
vuze
isohunt
torrentreactor
torrentdownloads
mybittorrent
extratorrent
torrentdownloads
onlytorrents
btmon

Please spread this album on file-sharing programs like bittorrent and emule, it is legal and we encourage this behavior!

24 hours after the upload of the first torrent, we may say that there have been 361 downloads of the album! Great! The album has been uploaded using piratebay’s open tracker, which was censored by the Italian Government in August because of “anti-piracy policies”. Well, this album is 100% legal and more than 360 people can appreciate it for free thanks to this file sharing protocol..

update 2, http downloads
I also decided to put Resurrecturi on 3 file-hosting sites, to help those who are not able to use bittorrent. Please share those links, too! You can also send one single mp3 to a friend, as well as download the album from here and then share it on a p2p program :-) just help us!
Download Resurrecturi from:
mediafire
rapidshare
megaupload

Related posts

How to install MintMenu on Debian (lenny, sid)

November 23rd, 2008 bodom_lx 2 comments

I really like (and miss) Linux Mint Menu (mintmenu), so I installed it on my Debian Sid box and here is how I managed it:

  • Install mintsystem and mintmenu deb packages, either by adding mint repository to yout sources.list file or by downloading them from mint packages or simplier, by grabbing them from my blog
  • Help it to recognize your applications by symlinking some files in /etc/xdg/menus (as root):

    ln -s gnome-applications.menu applications.menu
    ln -s gnome-preferences.menu preferences.menu
    ln -s gnome-settings.menu settings.menu

  • Add mintMenu to your Gnome panel..

et voilà! Here are the two deb files I’m using:
mintsystem_61_all
mintmenu_4.2_all

Here is an updated screenshot:
MintMenu complete under Debian Sid

MintMenu complete under Debian Sid

If you also want to enable beagle or tracker, be sure to add the correct search command in the preferences of mintMenu (see the screenshot)

Related posts

New domain: from daniel.graziotin.net to task3.cc

September 21st, 2008 bodom_lx No comments

As I previously announced, I purchased a brand new domain for my stuff.
The blog is changing during the months, becoming more than a blog but less than a site.
That’s because I decided to buy the domain BD-things.net, because this site contains all of my things, files, thoughts, projects, publications.
The old address daniel.graziotin.net now redirects permanently here and every link should have been updated/rewritten. Please contact me if you encounter problems.
I also took BD-blog.net which points here, too, but I won’t renew it the next year.
Some things are different now, but you won’t notice it ;)
I obviously lost my decent position at Netcraft’s Most Visited Web Sites rank list, but I don’t care. It will be funny to advance with the new domain and reach a even better position!
I hope there will be a new beginning and a brand new life with BD-things!

Related posts

BD-blog advances 20000 positions in one month!

September 18th, 2008 bodom_lx No comments

BD-blog is currently at position 32755 in Netcraft Most visited web sites ranking. This means that I earned about 20k positions in just one month! This is thanks to the link of my review of GOS published on Distrowatch!

BD-blog site ranking, top 30000

BD-blog site ranking, top 30000

I’m very happy with these results but now I want to begin a new race with a brand new domain name! I’m tired of task3.cc, event if it brought me such great results and knowledge around the Net.
I will announce the new domain name very soon.

Related posts

EHLO Gnu/Linux, I’m back!

July 1st, 2008 bodom_lx 2 comments

After about 5 months of separation from my preferred operating system, the discontent brought by Mac Os X led me to a re-born love with Gnu/Linux.
I Installed Gentoo (~x86, not x86) on my MacBook, following some articles found on the Gentoo wiki and on Ubuntu wiki.
The result is the following:

Clean Desktop

Some things opened: Gnome Menu, Gnome Terminal, Nautilus, Scite

Features:

  • Gnome 2.22.2
  • MurrinaGilouche + Elementary Metacity (linklink)
  • black-white 2 Gloss Icons (link)
  • Screenlets [RingSensors] (link)
  • A wallpaper included in Gnome, still looking for the perfect one

Let’s have some fun with Gnu/Linux…again!

Related posts