LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to merge 2 unallocated spaces? (https://www.linuxquestions.org/questions/linux-software-2/how-to-merge-2-unallocated-spaces-4175437255/)

nebeneffekt 11-15-2012 06:33 AM

how to merge 2 unallocated spaces?
 
i want merge this 2 unallocated spaces, seen in the picture below.

http://extreme.pcgameshardware.de/me...allocated.jpeg

is it possible with gparted? i tried it but i nowhere found there such an option to do this.
i running also windows, maybe there is a possibility to do this there.

with regards.

acid_kewpie 11-15-2012 06:37 AM

well under Linux you can use the space combined with an LVM config containing them both. You may be able to move partitions around, but i'd advise you don't and just use LVM.

johnsfine 11-15-2012 07:41 AM

Quote:

Originally Posted by acid_kewpie (Post 4829958)
well under Linux you can use the space combined with an LVM config containing them both. You may be able to move partitions around, but i'd advise you don't and just use LVM.

In this case, I'm pretty sure you couldn't combine those spaces with LVM, because sda1, sda2 and sda4 are all ordinary primary partitions (no extended partition). So with or without LVM there is no way to even use both unallocated chunks (much less combine them) without moving sda4.

If you were booted from a Linux liveCD (rather than booted from sda4) then the partition manager would be able to move sda4 to the beginning or end of the available space, merging the net available space, which could then be turned into a single primary partition (if you only want one more partition) or I think it could be turned into an extended partition if you want more than one more partition.

acid_kewpie 11-15-2012 07:51 AM

Quote:

Originally Posted by johnsfine (Post 4829996)
In this case, I'm pretty sure you couldn't combine those spaces with LVM, because sda1, sda2 and sda4 are all ordinary primary partitions (no extended partition). So with or without LVM there is no way to even use both unallocated chunks (much less combine them) without moving sda4.

Oh, yes I see now... oh that's a shame. I'd just cut the 2gb adrift in that case.

nebeneffekt 11-15-2012 09:31 AM

now i moved the the ext4 partition. i made it in windows with aoemei, because i had it open. aomei said, parition was moved succesfully (the unlallocated partition where then "merged" together), but now i see the GRUB was been damaged :D. now i dont know how to fix it. sure i could reinstall my linux system, because it was fresh installed. but i would prefer to learn how to fix the grub.

johnsfine 11-15-2012 09:35 AM

I don't recall how to repair grub, but it has been described many times in this forum, so I expect it shouldn't be too hard to find using this forum's search tool, but probably even easier to find using google.

You will need a Linux liveCD. Most Linux install CD's are also liveCDs. Did you move the partition from inside Windows because you happened to have Windows booted or because you don't have a Linux liveCD?

Do you know whether you had grub vs. grub2? The repair method is different. Current versions of Ubuntu default to installing grub2.

First hit on "repair grub" in google was a page telling you how to repair grub2 in Ubuntu:
https://sites.google.com/site/easylinuxtipsproject/grub

nebeneffekt 11-15-2012 09:39 AM

i was in windows and moved the linux "/" partition. I have a Linux Mint live USB. So i will just check google.

nebeneffekt 11-15-2012 10:51 AM

so i did this:
http://www.howopensource.com/2012/05...4-live-cd-usb/
with the live linux mint.

but it doesnt work. i says it has repaired succesfully. but during boot there is no option to choose between linux or windows. so straight away after booting windows tries to start, bu cant.

an error appears: status 0xc00000f

i tried to start from windows7 live usb, to start there from dos-prompt: with bootrec.exe /fixmbr but that doesnt help.


maybe i should try someting with linux live usb?
or the last solution to reiinstall everything.

johnsfine 11-15-2012 12:03 PM

Quote:

Originally Posted by nebeneffekt (Post 4830127)

A bit more detail might help us understand what went wrong.

For example, there seem to be important choices on the "GRUB location" tab of that tool.

The OS to boot by default: I expect you want your Linux system sda4 and similarly the grub you want to reinstall is in your Linux partition sda4.

The most important thing being fixed is the first part of GRUB, which you need to put in the default sda

So what did you do with the various tabs of that program.

Also I've never seen that particular program before, so I don't know whether it repairs grub or grub2. Of course I also don't know which you had. With a complete enough "repair" of grub or grub2, it wouldn't matter which you had before, because the old one would be replaced.

What Linux had you installed? Your first post was tagged Ubuntu, but your liveUSB is Mint?

Lennie 11-15-2012 12:09 PM

I googled your error and got a lot of hits. Something in Windows is broken. (Usually caused by CCleaner and similar programs, according to one of the hits.) Here is an article about it and how to fix it.

You tried to fix it with 'bootrec.exe /fixmbr', that means you have overwritten mbr. You'll need to reinstall Grub again.

You told us what program you used to fix grub, but you didn't tell us anything about what you actually did with that program...

What distro do you use?

nebeneffekt 11-15-2012 12:15 PM

i made exactly that what was written on the page:
http://www.howopensource.com/2012/05...4-live-cd-usb/

i connected the usb (live linux mint) to the netbook, booted from usb, connected to the internet, started the terminal and followed this orders:

Quote:

sudo add-apt-repository ppa:yannubuntu/boot-repair
Quote:

sudo apt-get update
Quote:

sudo apt-get install -y boot-repair
Quote:

boot-repair
then this repair window apeared and i hit the button: "recommended repair"



and yes, then no boot option for linux appaers.
and windows tries to boot and exactly the screen appears which you posted:

Quote:

Originally Posted by Lennie (Post 4830171)
Something in Windows is broken. (Usually caused by CCleaner and similar programs, according to one of the hits.) Here is an article about it and how to fix it.


johnsfine 11-15-2012 12:35 PM

Quote:

Originally Posted by nebeneffekt (Post 4830177)
i hit the button: "recommended repair"

I would expect your situation is too complicated for the defaults chosen by "Recommended Repair".

That is the reason, that page goes on to suggest "Advanced Options" and to show you the choices you need to look at within advanced options.

nebeneffekt 11-15-2012 12:45 PM

[QUOTE=johnsfine;4830196]
Quote:

Originally Posted by nebeneffekt (Post 4830177)
i hit the button: "recommended repair"/QUOTE]

I would expect your situation is too complicated for the defaults chosen by "Recommended Repair".

That is the reason, that page goes on to suggest "Advanced Options" and to show you the choices you need to look at within advanced options.

and then i tried to do that too, but i cant really access "GRUB LOCATIONS" nor "GRUB OPTIONS". Its just not possible to click that.

what i try to do next is trying to get windows back to working with:
http://www.prime-expert.com/articles...ation-data.php

then maybe again i try to play with GRUB. But maybe it wont make any sense (maybe wont work anyway), because the whole linux partition was moved as a whole from one harddsik space to another? maybe better to reinstall it?

if windows cant be fixed, there will be anyway the need to reinstall everything de novo on the Harddisk :(
luckily i have no important data there. just tedious to reinstall some of the programms

Lennie 11-15-2012 01:31 PM

Quote:

Originally Posted by nebeneffekt (Post 4830206)
and then i tried to do that too, but i cant really access "GRUB LOCATIONS" nor "GRUB OPTIONS". Its just not possible to click that.

Then I wouldn't trust that gui-tool... It's actually not difficult to do it the manual way.
Boot up the Live CD and run in terminal:
Code:

sudo mount /dev/sda4 /mnt
cd /mnt
sudo mount --bind /dev dev
sudo mount --bind /proc proc
sudo mount --bind /sys sys
sudo chroot . /bin/bash
grub-install /dev/sda
update-grub
exit
sudo umount dev
sudo umount proc
sudo umount sys

This is an easy way to set up chroot, and it's enough for this task. For a "full chroot" you need to mount a few more things. (There are lots of guides about it if you want to learn about it.)

This should be enough if your settings for Grub is right. You change it in the file /etc/default/grub. After you change that file you need to run 'update-grub' (inside the chroot). If you still have problems after this, show us what's in that file. (Now I'm just assuming you're running Ubuntu, but you haven't told us...)

Fix Windows before doing this, in case Windows overwrites mbr.


Edit:
Quote:

Originally Posted by nebeneffekt (Post 4830206)
then maybe again i try to play with GRUB. But maybe it wont make any sense (maybe wont work anyway), because the whole linux partition was moved as a whole from one harddsik space to another? maybe better to reinstall it?

That in itself is not a problem. You can move a Linux system around - move the partition, transfer it to another partition and even to another computer. Usually the only thing needed to get it booting from it's new place is fixing grub, and change the file /etc/fstab if it's moved to another partition/machine.

yancek 11-15-2012 01:35 PM

Your Mint partition was sda4. You moved it to ??, you haven't indicated which partition it is now on. A small part of Grub is in the master boot record and it points to the boot files on the partition on which you had Mint. Since you moved the partition, Grub can't find the files. You could boot the Mint CD and run: sudo fdisk -l (Lower case Letter L in command) and post that or you could go to the site below, read the directions on using the bootinfoscript, run it and post the output, a results.txt file here. It needs to be run from Linux.

http://sourceforge.net/projects/bootinfoscript/

Someone should then be able to give you simple steps to reinstall Grub.


All times are GMT -5. The time now is 02:03 AM.