PDA

View Full Version : Still have a problem with removing Ubuntu



asdex
11-06-2013, 09:28 PM
Hi, I have a bit od a mess on my drive. I have Win8 and decided to go to Linux. I install Ubuntu but found problems with it. I then installed Mint and have been using it since. I want to remove Ubuntu and give Mint more disk space. I tried this before and wreaked Grub and had to install a copy of Mint 8 that I had on Cd to get Grub working again so I could access Mint 13 I think it is. I have a picture from Gparted of the drives. The bit I went wrong was when trying to update Grub after deleting Ubuntu. I'm not sure I deleted either. Any ideas on what to do? I could format the drive, reinstall Win 7 and then install Mint but I have a good set up with Mint and not enought diskspace to backup things.
Thanks,

Nick G
11-06-2013, 09:46 PM
This should be a pretty easy problem to fix.
First, boot into Windows, and make a live CD, or USB (use a ubuntu based distro, Ubuntu/Linux mint will work fine, an currently supported version is best, Ubuntu 12.04/10, or Mint 13/14.). Then, delete the partition on your main hard drive thay has Ubuntu on it. You should then be able to increase the size of the Linux Mint partition. Now, Linux Mint will be the size you want it to be, but you won't be able to boot into Linux.

To fix this, boot into the Live USB you made, and follow the steps http://www.noobslab.com/2012/10/installrecover-grub-from-linux-live-cd.html

asdex
12-06-2013, 08:54 AM
Hi, thanks for your reply. I'll give that a go after the weekend when I'm not needing the computer so much.
Hopefully it will all go according to plan.
Thanks,

beama
12-06-2013, 02:23 PM
why not use gparted its a non destructive linux partitioning tool, download the iso, make a bootable usb, use unetbootin to make the bootable usb ( it even has the distro listed in its downlaodable distro dropdown), you should be able to delete move resize etc to your hearts content, just make sure you do it to the right partitions. as per usual before doing anything like this backup any data you don't want to lose and be preprepared for a complete reinstall if things go wrong

asdex
12-06-2013, 09:27 PM
Ok that is the problem I guess. When I looked at GParted (print screen attached) I can reconise the Windows partitions but don't know which of the rest to delete.There is 5 linux partitions and two are swap files. Can I delete one and which one is Ubuntu's and which Mint? I think sda6 is Mint as it has the mount point / thing.Will sda7 be Ubuntu?
Cheers,

johnd
12-06-2013, 09:44 PM
Suggestion - boot into the distro you are keeping and use df -h to find which partitions belong to that OS?

beama
13-06-2013, 09:03 AM
if john suggestion dosnt work try sudo mount or sudo fdisk -l at a terminal prompt, when prompted for password type in your password

Nick G
13-06-2013, 10:21 AM
Ok that is the problem I guess. When I looked at GParted (print screen attached) I can reconise the Windows partitions but don't know which of the rest to delete.There is 5 linux partitions and two are swap files. Can I delete one and which one is Ubuntu's and which Mint? I think sda6 is Mint as it has the mount point / thing.Will sda7 be Ubuntu?
Cheers,
Was the Gparted screenshot taken from inside Mint?

If so, my hunch would be /dev/sda6 is your Mint partition, and /dev/sda5 is your Mint swap. Only a guess though, as johnd said df -f will work much better than y educated guess ;)

Rod J
13-06-2013, 04:35 PM
This is where labelling partitions is helpful to identify them.

You can label them in Linux via GParted or in a terminal. For example:


sudo e2label /dev/sda6 Mint

If you have booted into Mint and GParted says sda6 is mounted as / then it follows that Mint's root is sda6. Also, whichever swap partition is shown as locked belongs to the version of Linux you have booted into.

asdex
13-06-2013, 10:42 PM
Hi thanks for that information. I have been able to name all the partitions except the Mint Swap. Should do though. I have also downloaded Mint 15 so might be able to use that as a live disk then update.
Cheers

johnd
13-06-2013, 10:47 PM
You don't need to worry about the swaps - I think any booted version of Linux will use any swap partitions it sees.

Nick G
14-06-2013, 09:16 AM
You don't need to worry about the swaps - I think any booted version of Linux will use any swap partitions it sees.
Correct, Linux will detect and use swap's automatically.

Having said that, two swap partitions is unnecessary.

asdex
15-06-2013, 11:31 AM
Hi all, never that easy with Linux. I booted into Ubuntu from a USB drive and run GParted. I couldn't delete the Ubuntu partition beacuse it said I had to unmount all above sda7 which was sda8 the Ubuntu swap file which was locked. So I resized the Ubuntu partition to get some more GB for my Mint partition. Now I can't resize the Mint partition and grab the spare unalocated space. Do I need to format it first to Ex4?
Have attached a picture.
Thanks

asdex
15-06-2013, 11:49 AM
Found the "swap off" and deleted the partitions ok. Now just to combine...

asdex
15-06-2013, 11:54 AM
Too easy. Now the Grub thing...

asdex
15-06-2013, 12:10 PM
The menu Grub actually was there and worked ok but in Mint, the Linux partition wasn't showing the size. I though I would do the reinstall Grub thing but got this:
See the sudo mount /dev/sda6/mnt command didn't work.

root@ubuntu:~# sudo fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x68a2f05f

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 3074047 1536000 27 Hidden NTFS WinRE
/dev/sda2 3074048 1251194934 624060443+ 7 HPFS/NTFS/exFAT
/dev/sda3 1439490048 1465147391 12828672 17 Hidden HPFS/NTFS
/dev/sda4 1251196926 1439490047 94146561 5 Extended
/dev/sda5 1431164928 1439490047 4162560 82 Linux swap / Solaris
/dev/sda6 1251196928 1431162879 89982976 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 4008 MB, 4008706048 bytes
118 heads, 53 sectors/track, 1251 cylinders, total 7829504 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x488c5001

Device Boot Start End Blocks Id System
/dev/sdb1 * 8064 7829503 3910720 c W95 FAT32 (LBA)
root@ubuntu:~# sudo mount /dev/sda6/mnt
mount: can't find /dev/sda6/mnt in /etc/fstab or /etc/mtab
root@ubuntu:~#

Rod J
15-06-2013, 04:02 PM
Well, you've got me thoroughly confused (not hard to do admittedly!).

I'm guessing you are having problems with grub. Not sure what you are trying to do with the mount command but the syntax you are using is wrong (it should be "sudo mount /dev/sda6 /mnt" you need the space between sda6 and /mnt). I'm guessing you have booted with a live USB/CD and are trying to fix grub from there. Correct?

Rod J
15-06-2013, 04:21 PM
I'm guessing you are having problems with grub because you installed Ubuntu first (and installed grub on the MBR of drive sda), then installed Mint. So, Ubuntu would have been in control of grub. You then deleted the Ubuntu partition so now grub is confused (if it works at all) and you can't get Mint to correct the problem.

Nick G
15-06-2013, 04:35 PM
I'm guessing you are having problems with grub because you installed Ubuntu first (and installed grub on the MBR of drive sda), then installed Mint. So, Ubuntu would have been in control of grub. You then deleted the Ubuntu partition so now grub is confused (if it works at all) and you can't get Mint to correct the problem. Yea, think he's following the instruction in the link in post 2 to reinstall grub. Must admit, the space doesn't show up exceptionally well in the steps.

asdex
15-06-2013, 08:00 PM
Hi yes that sounds correct. Windows 8 the installed Ubuntu the Mint.
I have everything going now. Sorted out partitions. I have the Windows C and a Backup D and Mint and a Swap. All looks correct in Windows but not in Mint. GParted shows one unallocated space. Picture attached. Grub still looks ok but after all my partition changes in Wndows, GParted in Mint is having trouble seeing them.
Any ideas on how to fix this? Seems something needs a refresh.
Thanks,

asdex
15-06-2013, 08:06 PM
Just noticed the partitions show in Computer Picture attached.
Cheers,

Nick G
15-06-2013, 09:04 PM
Simple as it sounds, have you tried reinstalling Gparted?

asdex
15-06-2013, 09:17 PM
No, I'll give that a go.
Cheers

Rod J
15-06-2013, 09:18 PM
I think the partition table is screwed up somehow.

What does sudo fdisk -l show now?

asdex
15-06-2013, 09:25 PM
No, just the same as before.