LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tri-boot to Dual-boot (https://www.linuxquestions.org/questions/linux-newbie-8/tri-boot-to-dual-boot-4175427095/)

XP105 09-13-2012 12:24 PM

Tri-boot to Dual-boot
 
Hello all.
I've recently installed Ubuntu onto my laptop, which already had Windows 7 and Kubuntu on it (I realised later that this might not have been the best way to do it) and I was planning to install Ubuntu over Kubuntu, but couldn't figure out which Partitions were safe to remove, and which weren't, so I just resized Kubuntu to minimum, and put Ubuntu in it's space. Now, I would like to know what I can do to remove Kubuntu, without removing Ubuntu, and screwing up GRUB? I assume I'm going to have to change something the the GRUB file list thingy (can't remember what it's called, but the list that is loaded when GRUB starts and asks what you want to boot). So, what do I remove, and in what order?
Thanks in advance,
XP105

yancek 09-13-2012 12:57 PM

You haven't posted enough details. Do all three systems boot now? Do you want to get rid of Kubuntu and keep windows and Ubuntu? Do you want to delete the Kubuntu partition or do you just want to remove the entry in the boot menu (grub.cfg file in /boot/grub/ directory)? Boot either Kubuntu or Ubuntu and run this command from a terminal and post the output: sudo fdisk -l (lower case Letter L in the command)

colorpurple21859 09-13-2012 01:07 PM

Quote:

so I just resized Kubuntu to minimum, and put Ubuntu in it's space
How did you do this? What did you do to put Ubuntu in Kubuntu's space? If I understand what you did, but not sure, you need to boot into Ubuntu and reinstall grub to the mbr Of your hard drive and rerun update-grub before removing Kubuntu. This link tells how. https://help.ubuntu.com/community/Grub2/Installing to reinstall grub under Item 2. One other note if you redo your hard drive partitioning after removing Kubunut(ie deleting a preexisting partition) will cause booting problems.

XP105 09-13-2012 01:32 PM

@yancek
I would like to remove the whole Kubuntu partition, but I just want to be sure that removing the partition will not screw up the booting. The operating systems all boot correctly. Here's the output:
Code:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20811488

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1          5      40131  de  Dell Utility
/dev/sda2  *          6        1918    15360000    7  HPFS/NTFS
/dev/sda3            1918      21615  158216446    7  HPFS/NTFS
/dev/sda4          21615      38914  138952705    5  Extended
/dev/sda5          21615      22260    5182156  83  Linux
/dev/sda6          38206      38914    5684224  82  Linux swap / Solaris
/dev/sda7          22260      37552  122834944  83  Linux
/dev/sda8          37553      38205    5244928  82  Linux swap / Solaris

Partition table entries are not in disk order

@colorpurple21859
I did a Side-By-Side install of Ubuntu, which took space from Kubuntu based on the amount I dragged the partition along (there was a mouse drag option for it).
Also, I'm not entirely sure I understand what you mean by updating before I remove Kubuntu. Isn't my GRUB updated already? Or do I have to manually update it? I had GRUB installed prior to installing Ubuntu (when I dual-booted windows 7 and Kubuntu) and it updated the list itself (in fact, I am currently in Ubuntu right now).

colorpurple21859 09-13-2012 02:07 PM

If grub was installed to the MBR during the Ubuntu Installation then You should not have to reinstall grub to the mbr. If You didn't install grub during the ubuntu installation or installed it to a partition, then Kubuntu's grub will still be in the MBR and will cause problems when kubuntu is removed. Running
Quote:

update-grub
updates the grub menu you see when the computer first boots, if you have installed/uninstalled other distros. Whether or not deleting a partition will cause booting problems will depend on if Ubuntu's partition number change's after deleting the partition.

XP105 09-13-2012 05:50 PM

I suppose I could just edit the command in GRUB is that does happen, and just change the number to the new number. Thanks then.

yancek 09-13-2012 06:53 PM

You have two Linux partitions, sda5 and sda7. If you have Kubuntu on sda5 and delete it from Ubuntu you will not be able to boot Ubuntu as its partition will change from sda7 (assuming that is where it is based upon partitions sizes?) to sda6. I would think that if you were booted into Ubuntu and deleted Kubuntu on sda5 and then ran os-prober and update-grub you would be alright. Posting your Ubuntu grub.cfg would give more information to make a recommendation, from Ubuntu if you use the Ubuntu bootloader?

EDDY1 09-13-2012 08:56 PM

Yancek is correct you will also have to edit /etc/fstab also before rebooting.
Post current /etc/fstab for Ubuntu.

EDDY1 09-13-2012 08:59 PM

Also you'll want to get something like gparted & resize your Ubuntu installation atleast /home

XP105 09-13-2012 09:00 PM

I understand what you meant now. Deleting Kubuntu would mean that the GRUB file that was there would not exist, stopping GRUB from working correctly (I forgot that the files were kept on there, and not on the boot partition). I couldn't get update-grub to work due to a mounting error. I've decided to just start from scratch and delete my partitions through windows, fix the mbr, then dual boot it from there (am currently installing Ubuntu now).
Thanks for all the help, but it seemed like it was more trouble than it was worth given how much easier a clean install of it seemed (I didn't want to cause more damage by screwing up the boot and not being able to access anything).
XP105

EDDY1 09-13-2012 09:17 PM

You can repair grub from grub prompt
http://karuppuswamy.com/wordpress/20...-cd-for-grub2/


All times are GMT -5. The time now is 06:49 PM.