Boot problem with dual system [SOLVED]

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Boot problem with dual system [SOLVED]

Post by riki »

I made a bad move this afternoon installing Julia alongside LMDE. Grub is not working and although I edited StartUp-Manager several times to boot one distro or the other, it now only boots LMDE. So I would like to delete Julia and return the disk space back to LMDE. I am not too familiar with GParted and would be grateful if somebody could guide me through the process. LMDE has 126.1GB and Julia 117.8GB with their respective Swap partitions. I am not sure what the 3 small unallocated partitions are there for.Thanks.
Last edited by riki on Fri Dec 03, 2010 7:41 am, edited 1 time in total.

lauren
Level 5
Level 5
Posts: 602
Joined: Thu Nov 26, 2009 10:50 am

Re: Boot problem with dual system

Post by lauren »

Hi!
If you want to see a graphical overview, start GParted, if not installed:

Code: Select all

sudo gparted
and you see

Code: Select all

... you can install it by...
Maybe you should take screenshots of GParted and attach part(s).
lauren
lauren
Notebook: BIOS Linux multiboot
Netbook: EFI Linux multiboot

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

Lauren, here is the screenshot:

Image

lauren
Level 5
Level 5
Posts: 602
Joined: Thu Nov 26, 2009 10:50 am

Re: Boot problem with dual system

Post by lauren »

Hi riki!
1. The 3 unallocated partitions: no problem, it's normal, I would not look after.
2. The 2 swap partitions: As a normal user you only need one, even for 3 or 4 distributions. The size could be a problem. Do you use "suspend to disk"? Then the size should be about 1,5 * RAM, otherwise about 2 GB, for 32 bit 2 GB is the maximum.
3. I see that you don't have an own root and an own home (in the future I would create these 2 partitions for each Linux).
4. Where do you write from, where did you made the screenshot? Your shot shows, that this is a primary partition (sda1) with boot flag. It should be root- LMDE.
5. Your extended partition, sda2, is a container for the logical partitions 6, 7, 5; sda6 is root-Julia, if the answer 4. is "yes".
I know the next steps, but I'm waiting for the answer.
lauren
lauren
Notebook: BIOS Linux multiboot
Netbook: EFI Linux multiboot

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

The screenshot is from LMDE, I can't open Julia. LMDE is on the primary partition.

lauren
Level 5
Level 5
Posts: 602
Joined: Thu Nov 26, 2009 10:50 am

Re: Boot problem with dual system

Post by lauren »

Okay, let's begin.
Start GParted, click on /dev/sda5 (although number 5, it's the last logical partition), then Partition -> x Delete.
Now you see the advantage of GParted. The operation is not executed: you can "undo last operation" (try that!) or "Apply all operations".
Make sure, that you don't delete a wrong partition. Then delete sda5! Afterwards delete sda7 and (if you really want) sda6. At the moment I don't remember, if the 2 unallocated partitions in the extended partition disappear (I suppose) or if you must delete them too (not the first one!).
lauren
lauren
Notebook: BIOS Linux multiboot
Netbook: EFI Linux multiboot

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

Why can't I just delete sda6? sda5 won't delete! sda6 gives me the option to format to ext4, would that reinstate the disk space to LMDE?

User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4578
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Boot problem with dual system

Post by Aging Technogeek »

I see sda5 is a swap partition from the Gparted screenshot. Swap partitions are always mounted if they are on. Gparted will not work on a mounted partition.

Right click on sda5. you should get a drop down menu with one entry being "Swapoff". Click this to turn off and unmount the swap partition. Once it is unmounted, you can delete it
Registered Linux User 483387

lauren
Level 5
Level 5
Posts: 602
Joined: Thu Nov 26, 2009 10:50 am

Re: Boot problem with dual system

Post by lauren »

It's true - I forgot that I always use GParted live CD, where I never have problems with mounted partitions.
lauren

Edit: @riki
If you want to grow up your sda1 (LMDE) the best way is to delete - as last step - the extended partition, grow up sda1 and afterwards create a new swap.
Last edited by lauren on Thu Dec 02, 2010 2:29 pm, edited 1 time in total.
lauren
Notebook: BIOS Linux multiboot
Netbook: EFI Linux multiboot

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

Aging Technogeek wrote:I see sda5 is a swap partition from the Gparted screenshot. Swap partitions are always mounted if they are on. Gparted will not work on a mounted partition.

Right click on sda5. you should get a drop down menu with one entry being "Swapoff". Click this to turn off and unmount the swap partition. Once it is unmounted, you can delete it
It looks as if sda5 is the swap partition of LMDE which I don't want to damage.

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

sda6 gives me the option to format to ext4, would that reinstate the disk space to LMDE?

User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4578
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Boot problem with dual system

Post by Aging Technogeek »

EDIT
riki,
Follow the directions in the post I made below. They are more detailed and I thought a little and came up with a simpler procedure.




As long as you retain one swap partition, it does not really matter where it is. Since both swap partitions are logical partitions inside of sda2, your extended partition, if you want to remove sda2 and return all the space to LMDE, you will have to delete both swap partitions in any case.

If you want to do this, the first step is to delete sda5, shrink sda2 to free up the unallocated space created, and create sda3 - a primary partition the same size as sda5 was and designated as swap.

Now you have a swap partition outside of the extended partition so you can just delete everything inside of sda2, then delete sda2.

This will leave a large block of unallocated space where sda2 used to be. Use the resize/move function of Gparted to expand sda1 to enclose all of the unallocated space. Now you have a hard drive with only LMDE and a swap partition on it.

Since LMDE was booting when you started and you did not touch the leading edge of sda1 where grub lives, you should still be able to boot into LMDE.

If not, post a new topic and we will fix Grub.
Last edited by Aging Technogeek on Thu Dec 02, 2010 3:33 pm, edited 1 time in total.
Reason: provide updated information
Registered Linux User 483387

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

Reached the point of total confusion! Can't see how to proceed. And BTW the swap partitions were created by default when installing the distros. I want to delete Julia and reinstate the disk space to LMDE but it doesn't look as if it's that easy,

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

OK thanks Aging Technogeek. I'll follow your instructions, after dinner, and come back with, hopefully, just LMDE on the HD like it was before messing about JULIA.

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

One question Aging Technogeek before I proceed: how will I be creating sda3?

User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4578
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Boot problem with dual system

Post by Aging Technogeek »

EDIT
This procedure is simpler than the one above but the end result is the same. I also included more detailed instructions here.


It is not really that difficult, you are just unfamiliar with Gparted so it's a little scary thinking about deleting partitions and maybe deleting the wrong one.

First, right click on sad5 and select "Swapoff".

Second, make sure that all logical partitions (sda numbers 5 and higher) are unmounted. Just right click on each in turn and if the Unmount command is active in the drop down menu, click it. sda7 is a swap partition so you will click swapoff instead of unmount.

Now click on sda5 and go to the Partition menu at the top of the page. Select Delete. A message area will appear at the bottom of the partition table telling you that "You are about to delete sda5. Do you really want to do this?" or words to that effect.

Click the green check mark in the tool bar to apply the operation. It may take a little time to delete the partition.

Delete sda 6 and sda7 the same way.

Now you have an empty extended partition sda 2. Make sure it is not mounted, then delete it the same way.

Click on sda1 and select "Resize/Move". You will get a graphical representation of you hard drive showing sda1 and a large amount of free space following it. Set your mouse on the right edge of sda1 - you should get a double headed arrow indicating that you can move the boundary. When you get it, click and hold the left mouse button and drag the boundary to the right to enlarge sda1. Watch the dialogue box labeled "Free space Following" to determine when to stop enlarging. The box reads in MegaBytes so stop when it gets to 5500 (this last 5.5 GB will be your swap space).

Click on the green check mark to apply the change.

Once sda1 is resized, click on that last 5500 MB of free space and select "New" from the partition menu (this partition will be labeled sda2 by Gparted). In the window, do not change any of the boxes referring to partition size ("Free space preceding", "New size"[should be 5500 or there about], "Free space following"). "Create as" - Primary partition, "File System" - linux-swap, Label - leave blank (the partition will automatically be labeled Swap). Click "Add" to send the change to the main program. Click the green check mark to apply and you are done. LMDE now owns the entire drive with a 5.5 GB swap space at the end.
Last edited by Aging Technogeek on Thu Dec 02, 2010 3:37 pm, edited 2 times in total.
Reason: add information
Registered Linux User 483387

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

Done it, partially. I now have 3 entries:

unallocated unallocated 1.00MB

/dev/sda1 ext4 117.42GB

unallocated unallocated 115.46

However, I can't get the mouse to drag to the right to recover the free space. Can't see "Resize/Move", it's greyed out.

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

Somehow, I have managed a swap partition of 5+GB but still can't find a way to claim the 110GB of unallocated free space for sda1. I'll sit tight until you come back. Thanks.

Edit. fdisk -l now reading:


Device Boot Start End Blocks Id System
/dev/sda1 * 1 15329 123127450 83 Linux
/dev/sda2 29709 30401 5566522+ 82 Linux swap / Solari

Edit 2. On rebooting I am now getting:

ERROR: NO SUCH PARTITION.

Grub Rescue>_

User avatar
riki
Level 4
Level 4
Posts: 448
Joined: Thu Jun 03, 2010 4:57 pm
Location: UK
Contact:

Re: Boot problem with dual system

Post by riki »

Update. With a live CD I have reclaimed the unallocated free space for LMDE but still getting grub rescue error. Help!

User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4578
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Boot problem with dual system

Post by Aging Technogeek »

EDIT
I see you figured out part of the solution on your own. Good going! You can skip the first paragraph and go directly to reinstalling Grub.

The reason you can't claim the 110 GB freed up by deleting sda2 is that you are working from the LMDE partition. That means this partition is mounted and Gparted will not work on a mounted partition. Sorry, I forgot that when I was writing the procedure for you. To claim that 110 GB, you must boot from the install CD and run Gparted from the live desktop. That will let you unmount sda1 and resize it.

You installed Mint 10 after LMDE so Mint 10 rewrote Grub to look to Mint 10 on sda6 for boot instructions. You will have to reinstall grub using the live CD.

To reinstall grub, try the procedure here

https://help.ubuntu.com/community/Grub2 ... m%20LiveCD

You already know the partition you are using, sda1, so you do not need to do the first step of running fdisk -l to find it.

The next step is to enter in terminal "sudo mount /dev/sda1 /mnt" (without the quotes)

Next run "sudo grub-install -- root-directory=/mnt/ /dev/sda" (no quotes)

Remember you are running from the live CD so there will be no request for a password.

Once the last command has run and the terminal has returned to the prompt, Close the terminal and shutdown the live CD session.

After removing the CD and letting the computer turn off, reboot. If everything worked, you should boot into LMDE. Once there, open a terminal and enter "sudo update-grub" just to make sure grub is properly set.
Registered Linux User 483387

Post Reply

Return to “Installation & Boot”