LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-15-2012, 07:33 AM   #1
nebeneffekt
LQ Newbie
 
Registered: Nov 2012
Posts: 19

Rep: Reputation: Disabled
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.
 
Old 11-15-2012, 07:37 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
 
Old 11-15-2012, 08:41 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by acid_kewpie View Post
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.

Last edited by johnsfine; 11-15-2012 at 08:43 AM.
 
Old 11-15-2012, 08:51 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Quote:
Originally Posted by johnsfine View Post
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.
 
Old 11-15-2012, 10:31 AM   #5
nebeneffekt
LQ Newbie
 
Registered: Nov 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
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 . 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.
 
Old 11-15-2012, 10:35 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
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

Last edited by johnsfine; 11-15-2012 at 10:39 AM.
 
1 members found this post helpful.
Old 11-15-2012, 10:39 AM   #7
nebeneffekt
LQ Newbie
 
Registered: Nov 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
i was in windows and moved the linux "/" partition. I have a Linux Mint live USB. So i will just check google.
 
Old 11-15-2012, 11:51 AM   #8
nebeneffekt
LQ Newbie
 
Registered: Nov 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
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.

Last edited by nebeneffekt; 11-15-2012 at 11:57 AM.
 
Old 11-15-2012, 01:03 PM   #9
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by nebeneffekt View Post
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?
 
Old 11-15-2012, 01:09 PM   #10
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 366

Rep: Reputation: 73
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?
 
Old 11-15-2012, 01:15 PM   #11
nebeneffekt
LQ Newbie
 
Registered: Nov 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
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 View Post
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.

Last edited by nebeneffekt; 11-15-2012 at 01:25 PM.
 
Old 11-15-2012, 01:35 PM   #12
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by nebeneffekt View Post
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.

Last edited by johnsfine; 11-15-2012 at 01:45 PM.
 
Old 11-15-2012, 01:45 PM   #13
nebeneffekt
LQ Newbie
 
Registered: Nov 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
[QUOTE=johnsfine;4830196]
Quote:
Originally Posted by nebeneffekt View Post
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
 
Old 11-15-2012, 02:31 PM   #14
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 366

Rep: Reputation: 73
Quote:
Originally Posted by nebeneffekt View Post
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 View Post
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.

Last edited by Lennie; 11-15-2012 at 02:37 PM.
 
Old 11-15-2012, 02:35 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,638

Rep: Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] joining 2 unallocated spaces kox444 Linux - General 9 08-17-2012 05:48 PM
How i make unallocated spaces in the usb stick ? lse123 Linux - Newbie 5 05-12-2009 12:26 AM
LXer: kgdb, To Merge Or Not To Merge LXer Syndicated Linux News 0 02-05-2008 07:10 PM
LXer: KHTML Vs Webkit: To Merge or Not To Merge LXer Syndicated Linux News 0 10-27-2007 07:41 AM
convert and merge a fat32 to ext3 and then merge w/ another ext3? nkoplm Linux - General 3 03-23-2006 11:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration