Enter your email address:

Delivered by FeedBurner

Dual boot with two Linux, using the same home directory

I usually use in my Desktop at home Debian Etch (Stable), but as I also like Mandriva since I tested it, I wanted to install a dual boot system, with both Mandriva and Debian Etch, but I also wanted to have access to both file systems with the same permissions and even have the same /home partition for the two operating systems, so for this I needed to be sure to have the same user with the same UID and GUID in both systems.

To install this you will need Debian Installer and Mandriva Live CD, you can use this guide for any other combination of Linux, the real important things are:

  • Be sure to have the first Linux installing grub on the MBR
  • The second installed Linux should install grub on its root partition
  • Use the UID and GUID for the users on both Linux distros

You can also have a Dual boot PC with the same Distro, just to have one for experimenting and the second for your stable work.

I first installed Debian as explained in this manual to install Debian Etch, be sure to left space for Mandriva, so you will need to select manual partition on this screen

And from that point continue like this:

Select manual configuration, so you can decide how your disk is going to be partitioned.

Select the disk, you wish to use (In my case I have only one)

Create a new empty partition on the disk

Now select the empty partition just created

And create a new partition on it

I will create first the swap partition, which will be used by the two operating systems, this could not be a good idea if you plan to suspend to swap (if you are using a laptop) in that case create one swap per operating system.

This will be primary partition

I chose to put it at the beginning

And select it to be a swap type partition.

Accept changes

Select once again the free space

And create another partition

This time I chose 8 Gbytes for the /home directory

And once again at the beginning

And the mount point is /home

Accept changes

Select once again the free space to create a new partition

And create it

This time I will use this as the Debian / (root) partition

At the beginning

Mount point "/"

And Finally finish with this, see that there is an unassigned space, which I will later use for Mandriva

Write changes to the disk, and then boot from your Mandriva disk, as this is a live CD you will have to boot it, and then choose to install it, here is how to install it on this machine.

Click on "Live Install"

This window will appear on your screen, just click on "next"

Select custom partition, this is the important step :)

Select the unformated room of the disk, and assign it to "/" (root), and the swap, as the swap for this system also. (remember that if you are using a laptop it could be better to create another swap for this system.

Should look like this

Format only the root partition, as on the /home you may have already data, and it was formated by the first system installed in this case (Debian)

Select to install Debian on the root partition

Just click on finish

On finish again :), and reboot your PC, you will have to enter on your first system, and edit grub menu, in my case I entered Debian, and added this lines to my /boot/grub/menu.lst file

title Mandriva
root (hd0,5)
chainloader +1

where hd0 is my first disk (the only one in my case) and the 5 following it, is the partition as it starts from 0, 5 is the sixth partition, so this means that grub should look for another grub on partition /dev/sda6, where I have installed the Mandriva grub.

Check your /etc/password and take note of your UID and also from the /etc/group take note of the GUID for the users you will create on both systems.

UID and GUID means (User ID, and Group ID) and are the third column of the files mentioned above.

Once you have done this, reboot your system again and this time boot from the second operating system, for the first time you will have to end the configuration so you will find a screen like this (if you are installing Mandriva as the second operating system)

Configure your ethernet

I chose DHCP

Select the parameters you prefer

Select to start connection at boot

You are done with network

choose a good root password

Create your new user, this part is important, be sure you assign the same UID and GUID that this user have on your first installed operating system, otherwise you will have permission issues.

Now you are done this is how my Mandriva looks like, check that I have created a file called, my_test_file.txt

On this screen at Debian you can see the same file created with Mandriva, actually the desktop looks the same, except for the wallpaper.

Share/Save
 #

You said you have Debian installed first , by the look of the fiirst screen shots it does not appear that way (excuse me if I am wrong I am newbie at linux and trying to do a dual boot system with no luck for a few weeks now). In the first screen is it not supposed to be there the swap and root information fromthe debian installation?

 
 #

Nice article. Very useful. I found it annoying Fedora & CentOS & Red Hat will all give first regular user UID of 500. Any other distro that I have tried begins at UID 1000. PITA. Should this be a call for LSB? First user to start at UID 1000?

 
 #

TYI: the partitioning scheme can be ANY, and so it is with / (and /boot, /usr, /tmp, /var if you want to make some of them; see you won't get lost at them). You assign a single partition for /home for ANY of the distros, but *beware* making the same user names at various distros, otherwise you'll end up in a mess. a DEBIAN user space won't be compatible with that of Fedora, and Fedora's one with one of Slack; and moreover: even Debian and Ubuntu or Debian and Mepis userspaces are *not compatible* in that sense (it's all about settings storage, mail structure, etc - they differ much, and there are just miriades things you can't comprehend). I don't say the whole system go broken, but you'll be doomed for the constant error messages living :( The solution can be assigning user names corresponding to the OS - you'll do all the customisation separately, at each of one, but you'll save much more time the if you'd try to get it together.
This way, the content of the /home dir can me someting like this: /john-at-debian, /john-at-mandriva, /john-at-ubuntu, etc....
I hope it's clear to see what I mean....

 
 #

Sure it is clear enough, I have come into this "errors", but are not that complicated, as an example.
Fedora assigns the userID 500 while Debian and Ubuntu 1000, you have to take care of this, also one of the uses

./thunderbird
as the default directory, while the other uses
./mozilla-thunderbir

but with a

ln -s ./thunderbir ./mozilla-thunderbird

I have solved that, It is dangerous to have this configuration, but it is possible I have it with
Fedora / Mandriva / Debian and Ubuntu for almost 6 months, and no problems at all, well some little ones, if I assign a link in the pannel to Iceweasel on Debian it appears blank on the others, if I install the sensors applet for Gnome in Fedora, the others comply telling that sensors is not installed, but those things are just small things to me as my main goal is to be able to test all those distros (not in virtual machines) while still be able to read my emails with Thunderbird and access my bookmarks with firefox, mmmh maybe it is better to use Gmail as email, or any IMAP application or Thunderbird as IMAP and not as POP3 and delicious instead of Firefox bookmarks, but this is working for me, but you are right there are problems and I even think you can break the whole Gnome if you are not careful.

Thanks for your comments.

Guillermo Garron

 
 #

Hey, I'm trying to do just the basic single shared /home directory. I first installed Debian Etch and my hard drive now looks like this:

/dev/hda1 1GB Swap
/dev/hda2 20gb /home
/dev/hda3 10gb /
(all three partitioned just as this guide says)

I have 30 gig left on the hard drive that I want to be Fedora,but when I get to the installer, I go to manual partition and I don't know for sure how to answer the questions it asks me. Do I want the / partition for this to be extended or primary? When I tell it to partition it says it has to partition over my /dev/hda1 swap partition even though I'm not making any changes to it. Also, when I get to the screen to install Grub, it only shows Fedora in there and there is no option to install it to / instead of MBR. So I just backed out of it all because I didn't want to mess up my Debian install.

 
 #

Hi, please check it here
http://www.go2linux.org/forum/index.php?topic=8.0
Guillermo Garron

 
 #

Have already reviewed the UID and GID ideas here,
and this question goes beyond just the single shared /home partition.

Am wondering how to dual-boot through a single GRUB in a /boot partition on hda1, a) Debian Etch and b) Slackware 12.0 using multiple shared partitions ??

Here is how I imagine things would be set up :
_______________________________________________
Partitioning scheme using EIDE disk0/hda

  1. hda1 /boot with GRUB --- ext3
  2. hda2 (maybe Windows 2K/XP... no rush to do this)
  3. hda3 shared-swap --- swap
  4. hda4 Win95 Extended
  5. hda5 (maybe an NTFS5 partition for Win2K/XP)
  6. hda6 Debian's / --- ext3
  7. hda7 Slackware's / --- ext3
  8. Shared for both distros

  9. hda8 /tmp --- ext3
  10. hda9 /var --- jfs or reiserfs
  11. hda10 /usr --- jfs or reiserfs
  12. hda11 /home --- jfs or reiserfs
  13. hda12 /opt --- jfs or reiserfs

_______________________________________________

Installation order:
A. Debian Etch
B. Slackware 12.0

Assuming that the /boot/grub/grub.lst is edited properly for both distros, that partitions hda7 - hda12 are not reformatted during the second Slack install, and that the /etc/fstab's for the two distro are setup correctly for each distros' mount point locations, why would this NOT work????

 
 #

Hi, I have posted your question on the forum, so more people could discuss about it, I think is a real good question,

please register and read here.

http://www.go2linux.org/forum/index.php?topic=4.0

Guillermo Garron

 
 #

Hi,
thats some nice stuff you got going on,
I am curious was someone able to dual boot
Fedora Core 7 and Ubuntu Fiesty Fawn sharing the same
desktop home in gnome environment?
if so i would appreciate detailed infor on how
to do this.
cheers

 
 #

Hi,

I did with F7, Debian, Mandriva and Feisty all sharing the same home.

the trick is to keep the Uid and Gid the same for all, and also the grub configuration, where are you having problems? as it should work as explained above.

Guillermo Garron

 
 #

I have an Ubuntu/Debian dual-boot setup right now, but I used to have Fedora Core 6, Sabayon, Ubuntu 6.10, and Ubuntu 7.04 when it was unstable. I don't think it's necessary to have the GRUB in two different places. I've always just made sure that something with a Debian installer went last because it automagically sets up all other OSes in the main GRUB.

The UID & GID were a pain in the butt the first time around. RH-based stuff automatically starts at 500 and Debian-based stuff automatically starts at 1000.

 
 #

Hi! interesting information. I want something like that. I am using at home Ubuntu 7.04 (I am new in Linux world) I like so much, but I want to share the same hard disk with Mandriva one 2007 spring, because i tested it and a like it too. How can I do that?
I don't know how to proceed in the partitioning of the hard drive. I will thanks any help.

 
 #

Hi,

As Ubuntu is based on Debian you can install first Ubuntu as shown in this tutorial, and partition the disk as shown there, which is

make a partition for / (root)
another for /home (home)

and another for swap
be sure to left enough space for Mandriva, then proceed with mandriva exactly as shown in this tutorial.

If you are having any problems please specify me the problem, so I can better help you.

Guillermo Garron

 
 #

I´ve Installed Mandriva 2007 with openSUSE, sharing the same home, but when I´m Mandriva I can´t see the documents created with openSUSE and vice verse. The user are the same in both systems...

 
 #

For me with Mandriva en OpenSuse was the same thing, I could not even see the GNOME menu in OpenSUSE, I think it is because they manage different the GNOME, but I haven't go too much deep on this issue, if anybody has any clues?

Guillermo Garron

 
 #

great information.
can I do this for other OS also? I will use debian as one OS.
if I assign the same UID and GUID for both user will it work properly?

 
 #

Yes it should, as long as they are Linux It will work, maybe somethings could not work the same out of the box, but I think they could be fixed.

i.e.:
Ubuntu put thunderbird emails in $HOME/.mozilla-thunderbird
and Fedora in $HOME/.thunderbird

but I think this could configured.

Guillermo Garron

 
 #

I recently used PCLinuxOS and Ubuntu sharing a /home drive and had this problem.

I just created a link (ln -s ~/.mozilla-thunderbird ~/.thunderbird) and that sorted it.

Mind you I had Ubuntu installed a cpl months before PCLOS and had some issues mixing Gnome and KDE!

 
 #

Yeah, for sure mixing Gnome and KDE should not be as easy, it's been a long time I do not use KDE, but should not be easy to mix both

Guillermo Garron

 
 #

More like "it shouldn't be hard." Ubuntu allows you to install KDE (apt-get install kubuntu-desktop), XFCE (apt-get install xubuntu-desktop) or any other desktop. All you do is change the session at the login screen.

 
 #

I was talking about having a dual boot system i.e. Kubuntu and Fedora with Gnome, does the applications will work smooth?, I will have to try someday. :)
Thanks
Guillermo Garron

 

Navigation

For your laptop needs, visit LaptopLogic - the laptop review site with news, articles, tips and how-to's.

Recent comments