Announcement

Collapse
No announcement yet.

Partition table entry confusion (the story continues) [SOLVED]

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

    Partition table entry confusion (the story continues) [SOLVED]

    So here I am again after http://kubuntuforums.net/forums/inde...opic=3098527.0 was solved.

    I tried to repartition my hard drive in my Laptop with Kubuntu 8.04 installed with the help of the gparted live CD 0.3.9-4 (http://gparted.sourceforge.net/livecd.php).

    At the beginning the partitions looked like this:
    Code:
    /dev/sda1 swap 1.5 GB
    free space 20 GB
    /dev/sda3 Linux system ext2 20 GB
    free space 40 GB
    So, what I wanted to do is making my Linux partition bigger. The free space results from formerly installed windows partitions. (That's also why my Linux partition is /dev/sda3.) In fact I wanted and want to have a swap partition at the beginning about 3 GB big (because I have 1.5 GB RAM), a 10 GB big partition for / and the rest in a separate partition for /home (as it was suggested by Imilano in the above mentioned thread):
    Code:
    /dev/sda1 swap 3 GB
    /dev/sda2 ext3 for / 10 GB
    /dev/sda3 ext3/xfs for /home rest
    So here is the new adventure:

    First step: Backup
    As I found out, you can copy a partition with gparted, so I thought: Yeah, now I'm save! So I made a copy of /dev/sda3 to the very end of the hard drive:
    Code:
    /dev/sda1 swap 1.5 GB
    free space 20 GB
    /dev/sda3 Linux system ext2 20 GB
    free space 20 GB
    /dev/sda2 copy of /dev/sda3 20 GB
    This went very well and my system still booted without problems after that. So I moved to the next step.

    Second step: Resize swap partition and create partition for /
    Next, I wanted to make the swap partition /dev/sda1 bigger and create a 10 GB partition right after it. This went smoothly, too:
    Code:
    /dev/sda1 resized swap 3 GB
    /dev/sda4 new partition for / 10 GB
    free space 10 GB
    /dev/sda3 Linux system ext2 20 GB
    free space 20 GB
    /dev/sda2 copy of /dev/sda3 20 GB
    So, now comes the crucial part: Making my system partition bigger. For safety reasons I divided this step, because I thought that first moving /dev/sda3 to the left (towards the start of the /dev/sda) and then making it bigger may be safer. (Don't know, if this is true...) To be on the safe side, I tried to boot my system after step two, successfully.

    Third step: Move /dev/sda3
    Code:
    /dev/sda1 resized swap 3 GB
    /dev/sda4 new partition for / 10 GB
    /dev/sda3 Linux system ext2 20 GB
    free space 30 GB
    /dev/sda2 copy of /dev/sda3 20 GB
    Went well and the boot test showed no error.

    Fourth step: Resize /dev/sda3
    Here I had the biggest doubts, but I felt safe because of the backup partition. Though, everything went well:
    Code:
    /dev/sda1 resized swap 3 GB
    /dev/sda4 new partition for / 10 GB
    /dev/sda3 Linux system ext2 40 GB
    /dev/sda2 copy of /dev/sda3 20 GB
    I added a journal to /dev/sda3 as mentioned in the link provided by Snowhog in the other thread:
    Code:
    /dev/sda1 resized swap 3 GB
    /dev/sda4 new partition for / 10 GB
    /dev/sda3 Linux system now ext3 40 GB
    /dev/sda2 copy of /dev/sda3 20 GB
    After this I could boot and I was satisfied. But, wait, why is KTorrent still saying that I have not enough free space?! 'df -h' revealed to me, that I was actually on /dev/sda2, so the copy of my old partition /dev/sda3...
    A few changes to /etc/fstab resulted in funny contradictory statements of 'df -h' and 'sudo fdisk -l' where the naming of the partitions (i.e. /dev/sda*) was not the same! So I had the situation, that the 40 GB partition (which should be my old, but resized /dev/sda3) was shown as /dev/sda2...
    I figured, that changes to /etc/fstab are only on the specific partition and that I would have to tell GRUB, which partition to boot from, but how? The /boot/grub/menu.lst is there twice (40 GB partition and copied 20 GB partition), so which one is loaded and where is this information stored?

    So, in short, what I want is the following:
    1) Make sure that the 40 GB is the partition my system boots from and that I didn't loose data.
    2) Understand the system behind the naming /dev/sda* and make it convenient (i.e. renumbering the partitions from the start of the hdd)
    3) Copy / to the newly created 10 GB partition and make sure, that my system boots from there with my /home still on the 40 GB partition
    4) Remove / from the 40 GB partition (so that only /home remains), remove backup partition at the end of the hdd, resize 40 GB to the maximum (to the end of the hdd)

    Uff, a lot happened, apparently. Thanks for reading so far, hope you can help me out again.

    Cheers,
    Cornelius

    #2
    Re: Partition table entry confusion (the story continues)

    Copying/moving existing partitions results in UUID issues. Once booted and logged in, open a console and type:
    Code:
    sudo blkid
    Note the UUID for each of your partitions. Edit fstab and menu.lst and change accordingly.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Partition table entry confusion (the story continues)

      Hello,
      'sudo blkid' gives me:
      Code:
      /dev/sda1: TYPE="swap" UUID="d3587f87-9da3-4357-9b2f-6132fa40c17e"
      /dev/sda2: UUID="665f3931-b07d-4db8-bd09-8050bf361196" TYPE="ext2"
      /dev/sda3: UUID="665f3931-b07d-4db8-bd09-8050bf361196" SEC_TYPE="ext2" TYPE="ext3"
      /dev/sda4: UUID="78abf00c-0429-4d3e-934d-893102a43963" SEC_TYPE="ext2" TYPE="ext3"
      So /dev/sda2 and /dev/sda3 have the same UUIDs. I don't understand how I can circumvent this with changes in the /etc/fstab and/or /boot/grub/menu.lst. Please give me some details, what you mean by "change accordingly". (And: Which menu.lst will be read out at boot time? Because there are two, one on /dev/sda3 and one on /dev/sda2.)
      Is there a way to change the partition numbering /dev/sda*?

      Thanks and cheers,
      Cornelius

      Comment


        #4
        Re: Partition table entry confusion (the story continues)

        "/dev/sda2 copy of /dev/sda3 20 GB"

        Okay, so it appears that you still have the "old" copy still on the HD. That accounts for the duplicate UUIDs for sda2 and sda3.

        If it were me, I'd boot with GParted LiveCD and delete sda2 - it is only a copy of what is now sda3.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Partition table entry confusion (the story continues)

          Originally posted by Snowhog
          If it were me, I'd boot with GParted LiveCD and delete sda2 - it is only a copy of what is now sda3.
          I did so and it went fine. Thanks!

          Another question: In two days Kubuntu 8.10 is released, right? Can I install it on a new partition and use my /home of 8.04? Or are the config files etc. too different, so that I should manually copy valuable data to a new /home? Since I wanted to have the system and /home on different partitions, I'm not sure what to do.

          Nice would be, if I had still the old system (so 8.04 for now) and could boot into 8.10, too.

          Comment


            #6
            Re: Partition table entry confusion (the story continues)

            Originally posted by cornelius

            Can I install it on a new partition and use my /home of 8.04?
            You could, but I wouldn't. /home is where all of your desktop configuration settings go, which are read by the system upon logging in. Depending on what all packages you use, you'll confuse your most-recently booted OS, and yourself.

            If you want your data to be in a common location, that's fine. Put it on other partition(s), in directories named "Docs", "Pics", "Music", "Videos" or whatever, and symlink them into the /home folder of each OS. This way, each OS can be on a smaller partition -- say 8GB - 10GB, complete with its /home directory, and there will be no settings confusion.

            Comment


              #7
              Re: Partition table entry confusion (the story continues)

              Another question: In two days Kubuntu 8.10 is released, right? Can I install it on a new partition and use my /home of 8.04?
              Sure, that is what I do.
              Just make sure to mount the /home partition as /home without formating using the manual partitioning tool at install and set up a new user for Intrepid.
              You can then copy over the config files (kontact, firefox, TB, etc) as needed.
              HP Pavilion dv6 core i7 (Main)
              4 GB Ram
              Kubuntu 18.10

              Comment

              Working...
              X