Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Quick question about gparted

  1. #1
    Join Date
    Sep 2008
    Location
    UK
    Beans
    130

    Quick question about gparted

    I have an Aspire One, and have successfully installed the superior Ubuntu 8.4.1 in addition to the supplied Linpus. I would now like to remove the partition Linpus is on, and return the space to the partition Ubuntu is using. It's a dual boot system, and Linpus is on the partition flagged as `boot`, so I'm thinking that if I simply delete the partition and expand the one Ubuntu is using then the system will no longer boot. The gparted documentation doesn't really elaborate on this sort of problem. Does anyone have any idea what I can do about this?

  2. #2

    Re: Quick question about gparted

    In GParted, you can change the boot to Ubuntu.
    Learning is not attained by chance, it must be sought for with ardor and attended to with diligence. Abigail Adams ( 1744 - 1818 ), 1780;

    My blog Poetry and More Free Ubuntu Magazine

  3. #3
    Join Date
    Sep 2008
    Location
    UK
    Beans
    130

    Re: Quick question about gparted

    Quote Originally Posted by Sef View Post
    In GParted, you can change the boot to Ubuntu.
    Will that move the boot menu stuff to the other partition? I'm worried it lives on the initial partition and it wont boot any more.

  4. #4
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Quick question about gparted

    Usually, when Ubuntu is installed second, the Ubuntu installer will overwrite the MBR with its own version of GRUB, and this GRUB will read the /boot/grub/menu.lst that resides in the Ubuntu partition.

    Therefore, usually the Ubuntu partition will be the one "controlling" the boot process.
    (And in general the last OS you install will control the boot process).

    However, if you are concerned that this may not be the case for you, you could do this:
    Boot into Linpus. Find the file called menu.lst. The path is probably /boot/grub/menu.lst,
    but if not, try to find it with any search tool you like, or type
    Code:
    locate menu.lst
    Now edit the menu.lst. (You'll need to be root.)
    Go about 2/3 of the way down until you find a stanza that looks somewhat like this:
    Code:
    title		Linpus
    root		(hd0,2)
    kernel		/boot/vmlinuz-2.6.22-14-generic root=UUID=03a507ee-cdac-4bd9-b438-eccd616b66ed ro 
    initrd		/boot/initrd.img-2.6.22-14-generic
    quiet
    The title line is what shows up in the GRUB menu at boot time.
    You can change it to whatever you like without disturbing the boot process.
    So change the title line to
    Code:
    title		Linpus Controls the Boot Process
    save and exit. Reboot. Get to the GRUB menu. If you see "Linpus Controls the Boot Process" as one of the boot options, then post back and we can give you instructions on copying Linpus's menu.lst to the Ubuntu partition and redirecting GRUB to boot from the Ubuntu partition.

    If you don't see "Linpus Controls the Boot Process" in the GRUB menu, it means Ubuntu's menu.lst is already controlling the boot process, and you are free to delete Linpus.

  5. #5
    Join Date
    Sep 2008
    Location
    UK
    Beans
    130

    Re: Quick question about gparted

    Thanks for the helpful reply!

    There is no such file on my linpus partition. I can't boot into linpus because I've made a mess of it (rather, i can boot into it but am then unable to get up a terminal or run any apps). I also can't edit files on that partition from within Ubuntu.

    What I can do is look for that file, and I can't see it. The closest I can see is grub.conf, in the boot/grub folder, which contains:


    -------
    default=0
    timeout=0
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    hiddenmenu

    title Linpus Linux RCD
    rootnoverify (hd0,0)
    kernel /boot/bzImage ro root=LABEL=linpus vga=0x311 splash=silent loglevel=1 console=tty1 quiet nolapic_timer nolapic_timer
    initrd /boot/initrd-splash.img

    -------

    If I look in the same place on my Ubuntu partition, I see the following in menu.1st (this is edited to what I believe to be the relevant, similar part):

    -------
    title Ubuntu 8.04.1, kernel 2.6.24-19-generic
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=c7dbc1e1-56a1-471d-8e6b-43b025fbc1a9 ro quiet splash
    initrd /boot/initrd.img-2.6.24-19-generic
    quiet

    title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=c7dbc1e1-56a1-471d-8e6b-43b025fbc1a9 ro single
    initrd /boot/initrd.img-2.6.24-19-generic

    title Ubuntu 8.04.1, memtest86+
    root (hd0,4)
    kernel /boot/memtest86+.bin
    quiet

    ### END DEBIAN AUTOMAGIC KERNELS LIST

    # This is a divider, added to separate the menu items below from the Debian
    # ones.
    title Other operating systems:
    root


    # This entry automatically added by the Debian installer for an existing
    # linux installation on /dev/sda1.
    title Linpus Linux RCD (on /dev/sda1)
    root (hd0,0)
    kernel /boot/bzImage ro root=LABEL=linpus vga=0x311 splash=silent loglevel=1 console=tty1 quiet nolapic_timer nolapic_timer
    initrd /boot/initrd-splash.img
    savedefault
    boot

    -------


    I'm 99% sure this must be the file responsible for the choices I get at boot time. I just can't tell from that whether or not I can delete the linpus partition. You're saying I can, by the sound of things. I'm just worried by the hd0,0 and hd0,4 things. If that's describing where to go to boot, and I delete a partition and grow the Ubuntu one to use its space, then presumably gparted needs to edit menu.1st to give it its new location, right?

    I've spent a fair bit of time playing with Ubuntu, installing, customizing and patching. Is there a tool which can backup the partition Ubuntu lives on to another partition, so if I were to make a mess of the OS in the future I could simply restore onto the boot partition?

    Thanks again for your time!
    Last edited by poldie; October 3rd, 2008 at 01:48 AM.

  6. #6
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Quick question about gparted

    Hi poldie, yes there are many ways to backup a partition. One way is to use
    Partimage: http://www.partimage.org/Main_Page. Here is a tutorial on how to use it: http://ubuntuforums.org/showthread.php?t=287522.

    Having good backups is always a great thing -- then you can try new things with a confidence that is otherwise unattainable.

    When you delete a partition, the device name (e.g. /dev/sda5) and the GRUB device number (e.g. hd0,4) of the remaining partitions do not change. I have resized partitions and the UUID of those partitions did not change either.

    Before you delete Linpus, however, perhaps boot into Ubuntu, then type
    Code:
    gksu gedit /boot/grub/menu.lst
    Now edit the Ubuntu boot stanza by changing:
    Code:
    title Ubuntu 8.04.1, kernel 2.6.24-19-generic
    to
    Code:
    title Ubuntu 8.04.1, kernel 2.6.24-19-generic (Hi!)
    or something

    Save, exit, and then reboot. If you see (Hi!), then I think deleting the Linpus partition will not disturb the boot process.

    When using GParted, you'll find that deleting a partition is a very quick operation, but resizing can take some time. I have read that resizing the left end point of a partition can take longer than resizing the right end point. How long depends on the size of the partition and the speed of your drive. Whatever you do, do not cancel GParted once it has begun resizing a partition -- doing so can result in a corrupted filesystem, the need to do recovery work, and quite likely some significant data loss.

    Realistically though, lots of people resize partitions using GParted without backing up first and have no problems. However, I'd feel more comfortable recommending this knowing you have a backup.

    Finally, although I don't think anything will go wrong after you delete the Linpus partition, if anything does, post back here and we should be able to help get you back up and booting.

  7. #7
    Join Date
    Sep 2008
    Location
    UK
    Beans
    130

    Re: Quick question about gparted

    Quote Originally Posted by unutbu View Post
    Realistically though, lots of people resize partitions using GParted without backing up first and have no problems. However, I'd feel more comfortable recommending this knowing you have a backup.
    I did the checks and confirmed it was the correct menu.lst, and successfully deleted that partition. Sadly, though, I can find no way of reclaiming the space it occupied - attempting a resize only lets me make it smaller. I think the old partition was ext2 and ubuntu created an ext3 one. I've checked out the documentation but it's not helping. I'm off to have another google, but I'd appreciate any advice from anyone who knows this.

    Cheers.

  8. #8
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Quick question about gparted

    Please post the output of
    Code:
    sudo fdisk -l
    This will list the partition table, and give us an idea of where the partitions are located on the drive.

    One thing that comes to mind which might be the problem is that you can not resize a mounted partition. For example, if you are trying to resize the Ubuntu partition, you can not do this while Ubuntu is running.

    If this sounds like your problem, then boot from the LiveCD, and launch GParted from there.

    If this isn't the problem, please post the output of "sudo fdisk -l".

  9. #9
    Join Date
    Sep 2008
    Location
    UK
    Beans
    130

    Re: Quick question about gparted

    Quote Originally Posted by unutbu View Post
    Please post the output of
    Code:
    sudo fdisk -l
    This will list the partition table, and give us an idea of where the partitions are located on the drive.

    One thing that comes to mind which might be the problem is that you can not resize a mounted partition. For example, if you are trying to resize the Ubuntu partition, you can not do this while Ubuntu is running.

    If this sounds like your problem, then boot from the LiveCD, and launch GParted from there.

    If this isn't the problem, please post the output of "sudo fdisk -l".
    I tried it from the live usb key install I used to install Ubunto in the first place - booted from that and tried with the partitions mounted and unmounted but I didn't seem to get any extra options either way and I couldn't expand the main partition larger than it currently is - I could just make it smaller.

    Here's the output (I did the fdisk from my regular boot into Ubuntu with the partitions mounted as usual.

    -------------
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x5fa38a47

    Device Boot Start End Blocks Id System
    /dev/sda2 14463 14593 1052257+ 82 Linux swap / Solaris
    /dev/sda3 1986 14462 100221502+ 5 Extended
    /dev/sda5 1986 14089 97225348+ 83 Linux
    /dev/sda6 14090 14462 2996091 82 Linux swap / Solaris
    -------------

    I've unmounted the partition I want to reclaim the space from, so it doesn't appear there. It's about 15 gigs. From running gparted I can see that sda5&6 are part of sda3 - I guess you can tell that from the start and end values.


    Thanks.

  10. #10
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Quick question about gparted

    Hm. To enlarge sda5, you must first enlarge sda3, the extended partition that contains sda5. That's a little tricky since you have to click on the thin colored border that encloses both sda5 and sda6.

    An easier way to select sda3 is to click on the words in the text area below the graphics. Click on the line that says the Filesystem is "extended".

    Then click on the Resize/Move button. Now it should allow you to enlarge the extended partition.

    After you enlarge the extended partition (sda3),
    you should be able to enlarge the logical partition (sda5).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •