Announcement

Collapse
No announcement yet.

[SOLVED]How do I link Primary to logical Partitions

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED]How do I link Primary to logical Partitions

    How do I link my sda2 and sda3 Primary partitions to my sda5 Logical Partition, I mounted sda5 as /home/oceans-n-peril and both Ubuntu on sda3 and Kubuntu on sda2 are given that same name.

    I am trying to get things set-up for sharing a /home folder of Documents, music and Photo's~Pictures.
    fdisk -l from Ubuntu>
    Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
    255 heads, 63 sectors/track, 182401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000008af

    Device Boot Start End Blocks Id System
    /dev/sda1 1 1459 11717632 82 Linux swap / Solaris
    /dev/sda2 * 1459 8754 58593280 83 Linux
    /dev/sda3 8754 16048 58593280 83 Linux
    /dev/sda4 16049 182402 1336231937 5 Extended
    /dev/sda5 16049 46443 244140032 83 Linux
    /dev/sda6 46443 52521 48827392 83 Linux
    /dev/sda7 52522 58600 48827392 83 Linux
    /dev/sda8 58600 70758 97654784 83 Linux
    /dev/sda9 70758 82915 97654784 83 Linux
    /dev/sda10 82916 182402 799122432 83 Linux

    df -h from Ubuntu>
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 56G 6.3G 46G 12% /
    none 7.9G 716K 7.9G 1% /dev
    none 7.9G 288K 7.9G 1% /dev/shm
    none 7.9G 96K 7.9G 1% /var/run
    none 7.9G 0 7.9G 0% /var/lock

    df -h from Kubuntu
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 56G 4.2G 49G 8% /
    none 7.9G 712K 7.9G 1% /dev
    none 7.9G 2.7M 7.9G 1% /dev/shm
    none 7.9G 92K 7.9G 1% /var/run
    none 7.9G 0 7.9G 0% /var/lock
    /dev/sda5 230G 435M 218G 1% /home

    For some reason it looks like sda2 is still the boot and sees the /home partition but the sda3 [Ubuntu] does not.
    However the Ubuntu is controlling the boot loader screen.
    Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

    #2
    Re: How do I link Primary to logical Partitions

    if i have this correctly you have (on one disk) two installs. one ubuntu and one kubuntu and you want them to share the same home folder (sda5)

    very simply edit your /etc/fstab and add a mount line for sda5 tobe mounted as /home.

    the line will be something like this


    UUID=########-####-####-####-############ /home ext4 defaults 0 2

    but you will need to find out the uuid of the sda5 partiton (prolly ezset to find via gparted)

    remember to do this for both os's and as root .

    edit i noticed that your /home is mounted correctly on your kubuntu install , in that case you can copy the line from kubuntu's /etc/fstab file to ubuntu's /etc/fstab
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

    Comment


      #3
      Re: How do I link Primary to logical Partitions

      A bit of confusion here; partition type has nothing to do with linking, mounting a partition to a particular location is not "linking" at all, it's mounting, and neither has anything to do with which install is controlling grub.

      I point this out because using the correct terminology will help you avoid confusion as you progress down the linux path to enlightenment

      You can mount your home to the Ubuntu install as sithlord says or use device names as in /dev/sda5 instead of UUID's. You could also link from your Ubuntu home to the Kubuntu home by mounting sda5 somewhere and then linking into the directories you want to access.

      You can also change which install controls grub with grub-install.

      Details of these exciting options await your illuminating your desires!

      Please Read Me

      Comment


        #4
        Re: How do I link Primary to logical Partitions

        Originally posted by sithlord48
        if i have this correctly you have (on one disk) two installs. one ubuntu and one kubuntu and you want them to share the same home folder (sda5)

        edit i noticed that your /home is mounted correctly on your kubuntu install , in that case you can copy the line from kubuntu's /etc/fstab file to ubuntu's /etc/fstab
        You are correct about wanting both OS's to share the same /home and I think your edit is what will hopefully be the simple solution. If I understand correctly I should open Konsole in Kubuntu and run
        sudo fstab then copy that down and exit and open Ubuntu and terminal and run sudo fstab and paste? Or am I off the mark here; my terminal experience is still limited and I could use a few more directions on how to do this correctly.
        Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

        Comment


          #5
          Re: How do I link Primary to logical Partitions

          Originally posted by oshunluvr
          You can mount your home to the Ubuntu install as sithlord says or use device names as in /dev/sda5 instead of UUID's. You could also link from your Ubuntu home to the Kubuntu home by mounting sda5 somewhere and then linking into the directories you want to access.

          You can also change which install controls grub with grub-install.
          My sda5 is mounted as /home/[computer name] and both OS's have the same computer name. Not clear on how to actually do this via the /etc/fstab stuff though.
          Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

          Comment


            #6
            Re: How do I link Primary to logical Partitions

            fstab, like everything else in linux, is just a file.

            You need to edit the fstab in Ubuntu and copy the /home line from the fstab in Kubuntu. To keep this simple I will assume you will boot to Kubuntu and do this from there.

            In order to do this, you must:

            1. Mount Ubuntu somewhere.
            2. View /etc/fstab
            3. Edit /etc/fstab from Ubuntu to add the mount command and save.
            4. Clear out the Ubuntu /home
            5. Done.

            1. Open a terminal and create a mount point for your Ubuntu install, then mount Ubuntu to it. I will use /mnt/Ubuntu for this example. Here are the two commands:

            sudo mkdir /mnt/Ubuntu
            sudo mount /dev/sda3 /mnt/Ubuntu


            2. Open Dolphin and navigate to /etc and open fstab with a double-click. Find the line referring to /home and copy (highlight, then right-click-copy or CTRL-v) the whole line.

            3. Back in the terminal window, open the Ubuntu fstab for editing:

            kdesudo kate /mnt/Ubuntu/etc/fstab

            Now paste in the copied line below the mount for / and save and close both kate windows.

            4. Back in the still open Dolphin window, navigate to your Ubuntu home and move everything from it to your current /home. Don't forget hidden files and directories. This will attempt to over-write some things already in your home. I would skip over-writting of any current files. Once the move is complete, you might want to save those items not moved (because they already existed in your current home), create a new directory in your home and move them there to save them for later reference. Once your Ubuntu home is empty, delete your user directory. This should leave your Ubuntu /home totally empty.

            5. Rebooting to Ubuntu should result in a normal boot with no noticeable differences from before. The df or mount commands will show your new /home mount.

            Another thing to note: Most text files in linux that the system uses require or should have an empty line at the end. It's good policy to ensure avoiding needless errors by making sure there is a blank line at the end of the file before you save.

            Please Read Me

            Comment


              #7
              Re: How do I link Primary to logical Partitions

              OK, printed it out, gone to go to do, will add results in a while.

              Things seemed to go OK until I tried to boot into Ubuntu, after log-in screen I just get the wallpaper that is the default [I have not made any changes. The Gnome GUI does not appear so I have to reboot by the re-start button on my tower.

              I then changed the boot flag from sda2 to sda3 location with the KDE partition manager and tried to reboot with the same results.

              I can not figure out how to get the Ubuntu partition to boot up now, any ideas of what I can do in Kubuntu to fix this?
              I am going to switch the boot flag back but I do not think it will help. Just realized I cannot do that while partition is active. Need help regaining boot of sda3.


              Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
              255 heads, 63 sectors/track, 182401 cylinders
              Units = cylinders of 16065 * 512 = 8225280 bytes
              Sector size (logical/physical): 512 bytes / 512 bytes
              I/O size (minimum/optimal): 512 bytes / 512 bytes
              Disk identifier: 0x000008af

              Device Boot Start End Blocks Id System
              /dev/sda1 1 1459 11717632 82 Linux swap / Solaris
              /dev/sda2 1459 8754 58593280 83 Linux
              /dev/sda3 * 8754 16048 58593280 83 Linux
              /dev/sda4 16049 182402 1336231937 5 Extended
              /dev/sda5 16049 46443 244140032 83 Linux
              /dev/sda6 46443 52521 48827392 83 Linux
              /dev/sda7 52522 58600 48827392 83 Linux
              /dev/sda8 58600 70758 97654784 83 Linux
              /dev/sda9 70758 82915 97654784 83 Linux
              /dev/sda10 82916 182402 799122432 83 Linux
              oceans-n-peril@oceans-n-peril:~$ sudo df -h
              Filesystem Size Used Avail Use% Mounted on
              /dev/sda2 56G 4.2G 49G 8% /
              none 7.9G 712K 7.9G 1% /dev
              none 7.9G 2.7M 7.9G 1% /dev/shm
              none 7.9G 92K 7.9G 1% /var/run
              none 7.9G 0 7.9G 0% /var/lock
              /dev/sda5 230G 874M 217G 1% /home
              Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

              Comment


                #8
                Re: How do I link Primary to logical Partitions

                Well, this is the sort of problem that occurs when you try and have the same home directory shared among different installs. That's why most of us prefer not to share home directories and just link to data instead.

                For example, unless you select a wallpaper that is available to both installs or use a link to the same location and use a common name - wallpaper will always fail - and that's just one example.

                Terminology: If you're reaching the log-in screen, you have in fact booted Ubuntu. Where it is failing is the logging-in, which means your Kubuntu desktop settings are incompatible with your Ubuntu install.

                You should probably remove the /home line from your Ubuntu /etc/fstab and reboot into Ubuntu and rebuild your desktop as it was before. Once you get that working again, post back and we'll set up links to your data directories instead. It's really much safer that way.

                Please Read Me

                Comment


                  #9
                  Re: How do I link Primary to logical Partitions

                  I was away for a few, I reran the sudo mkdir and mount commands and it in K and now I have booted to Ubuntu.

                  If I understand correctly the boot-loader is getting confused or is Ubuntu getting confused?

                  I know I am confused.

                  The /home is working correctly right now. I have only a very few small documents from either OS and can now read them in both. If I understand though you are saying I might have these issues as ongoing and reoccurring?

                  I'm trying to figure out how to avoid the launch of the OS's trouble but not sure if that is the right term.
                  Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

                  Comment


                    #10
                    Re: How do I link Primary to logical Partitions

                    Originally posted by oshunluvr

                    You should probably remove the /home line from your Ubuntu /etc/fstab and reboot into Ubuntu and rebuild your desktop as it was before. Once you get that working again, post back and we'll set up links to your data directories instead. It's really much safer that way.
                    I am in Ubuntu right now, I am not sure what to do, will I need to be in Kubuntu to " remove the /home line from your Ubuntu /etc/fstab"

                    I do not understand why the boot-loader would be accessing information from sda2 when booting sda3 or vice-a-versa and why it would be looking into sda5 at all.
                    Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

                    Comment


                      #11
                      Re: How do I link Primary to logical Partitions

                      the boot loader has nothing to do with your home directory (and BTW on 99% of hardware, grub doesn't care if the boot flag is set or not either)

                      The issues you may encounter will be when some setting in Kubuntu is different than the same setting in Ubuntu or not applicable to both installs. For the most part, you should be OK. One area that comes to mind is networking, but as long as both are working - no need to mess with it.

                      Document sharing will not be an issue as long as both programs are on the same version. In other words, when you update Kubuntu, update Ubuntu the next time you boot to it.

                      Again, to the "booting" and grub: grub doesn't know or care where your home is. Once it launches the kernel boot process, it's done it's job. Whether or not your install completes booting successfully or you can or can't log in has nothing to do with grub.

                      Please Read Me

                      Comment


                        #12
                        Re: How do I link Primary to logical Partitions

                        I think you're still confusing booting with logging in.

                        Please Read Me

                        Comment


                          #13
                          Re: How do I link Primary to logical Partitions

                          Originally posted by oshunluvr
                          I think you're still confusing booting with logging in.
                          I believe you are hitting the proverbial 'nail on the head'

                          So I should have given the installs different names? What should I have done with the sda5 as far as mount and label.

                          I have purposely not done any music,pictures or large Documents loads. I do plan to network by next summer so I am trying to take my time and get both OS's set-up and working smoothly. I wanted to o with just K but ATI writes the drivers for Gnome and I did not want to try to run Gnome in KDE even if it did work.

                          I'm thinking reinstall Ubuntu and rename the sda5 at the same time. Waiting for your advice, ^pm
                          Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

                          Comment


                            #14
                            Re: How do I link Primary to logical Partitions

                            Are both installs booting and logging in OK now? If so, do you want to keep it as-is or revert to the previous set-up?


                            Very simply:

                            grub launches the boot process> kernel boots the system> login manager launches desktop

                            Please Read Me

                            Comment


                              #15
                              Re: How do I link Primary to logical Partitions

                              I'll be back in a few minutes or so going to reboot to K then reboot to U a few times to see if things still hang in U.

                              OK, two full cycles of reboot worked OK, I'm in Kubuntu now.
                              Would it be better that I use a different name for the two systems [OS] even though they are on separate partitions? I am thinking that might have been some kinda conflict but not sure, and if them being the same is OK then what should I do as far as sda5 an the sharing of /home data from both systems in regards to just Doc.'s,Pictures and Music. I plan to use digiKam in both and Banshee in both and Braseo [sp?] in both.
                              Gigabyte GA-990XA-UD3: ATI Fire-Pro V4800; Phenom II X4 970 3.5 Ghz; G.Skill Sniper DDR3 1600 4 x 4GB; WD Caviar Black 1.5 TB;CM 690 case w/9 fans and 6-switch rheobus plus 2 optical drives [ROM & RW]

                              Comment

                              Working...
                              X