Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
That tells you the UUIDs for that distributions partitions. Then you use something like the ls command I gave to see which number (sda1 ect.) they correspond to.
Then, once you know the sda* number you can use something like a gparted live CD to shrink and grow partitions as you want -- bear in mind data loss may occur so back up anything important before doing that.
You already have all the UUIDs in the bootinfoscript. Look at the section "blkid output". The UUD you posted above (post #14) is for sdb9 which doesn't exist. I would guess you deleted sdb7 which will then change sdb8 to sdb7 and sdb9 to sdb8. Your two Mint installations are on sda6 and sdb6 according to the bootinfoscript so you would simply mount those partitions from Kubuntu if that is what you are booted to and take a look at the files to see which one contains the data you want. Both of those partitions are LVM which I've never used so I'm not sure if the method to mount is different. You should be able to use the command: lvdisplay or sudo lvdisplay to get info on the volumes.
You could take a look at the link below which has some info on it or do a google on mounting LVM.
There is nothing in the bootinfoscript to indicate you have two installs of Kubuntu but it clearly shows two of Mint, I would guess Mint 13 but definitely not the most recent release.
I used the live CD but I couldn't work out how to give the unallocated memory back to my Kubuntu partition
If you mean unallocated "disk space", you can't the way it is currently set up as the only unallocated space on the second drive is at the beginning of the Extended partition. If you look at the drive partition section in the bootinfoscript which you can also see using fdisk, you can see that the difference between the start of the Extended partition and the first logical partition on it is 2049629945 sectors which comes out to about 97GB. Create a logical partition there.
If you look at the grub.cfg file on Kubuntu (sdb8) you will see entries for Mint (sdb6), Ubuntu(sdb7 and sdb9). I would suggest that you first run: sudo update-grub from the booted Kubuntu so these entries are accurate. sdb7 shows as a swap partition and sdb9 doesn't exist so those menuentries cannot be correct.
Did you not save a copy of the bootinfoscript? All the UUID info in your last post was already in the results.txt file?
Notice that in your various grub.cfg files you will not see an entry for sdb5. What is that, a data partition, a failed Kubuntu install?
If you want to extended your Kubuntu partition which appears to be on sdb8, it is possible to do that but that will involve moving not just the beginning of the partition to the left but also the data inside sdb8 which will increase the risk of data loss. Before doing this, you would obviously have to get whatever data you might have on sdb5 and the Mint sdb6 off the partitions as it will be overwritten.
The first step would be to update grub and then get any data you want to save off whichever hard drive you have it on.
I used the live CD but I couldn't work out how to give the unallocated memory back to my Kubuntu partition. How do I do that.
That's because I said "ls -la" which will show you which UUID corresponds to which partition.
Once you know that you use gparted on a live distribution to remove the partition you don't want and expand the existing partitions.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
So, you now know that sdb8 and sdb9 correspond to swap and root partition of the OS you are logged into. You can do the same for the other OS you want to keep then you know which partitions you want to keep. After that you just open gparted in a live distribution and remove the partitions you don't want (after having run update-grub in one of the OSs you want to keep to ensure that you can still boot to it, as mentioned above).
A better way to get UUID and device names is the blkid command. Note in your last post you have the UUID and device name for partitions on the sdb drive while the output of blkid shows both drives. Again, the output of all this info was already in the bootinfoscript output.
The next thing I would suggest is to determine which partition you are currently on. I'm guessing sdb8 for your Kubuntu but you can determine that by opening a terminal and entering the following command:
Code:
df -h
Filesystem Size Used Avail Use Mounted on
/dev/sdb3 30G 11G 18G 39% /
In the instance above you can see this is the / of the filesystem under Mounted On and that it is /dev/sdb3. If yours shows sdb8, that is where your Kubuntu is so don't make any changes to whichever partition this shows as if you use a Live CD to make changes.
I don't use LVM so I have no idea what those messages about LVM mean. Second, did you post the entire output? The reason I ask is that it shows only one instance of vista on sda3 while your earlier grub.cfg output from the bootinfoscript showed vista on both sda3 and sdb3. Do you have a working version of vista on both drives
Since you have your data all saved and nothing on sda you want to keep other than vista, you can delete sda5 and sda6 and create a single logical partition (sda5) with a Linux filesystem format (ext4). Make sure you don't make any changes to the first three partitions with vista on. Also, using whatever partition manager, you need to make sure that sda5 and sda6 are unmounted before you act on them.
You would then need to create a mount point for this partition in Kubuntu, the standard place being the /mnt directory so as an example so you don't need to call it sda5: sudo mkdir /mnt/sda5
Then put an entry in /etc/fstab of Kubuntu for that partition if you want it available on boot. Lots of examples available doing an online search depending upon what parameters you want for the partition.
I don't know what you had on sdb5 and your Mint appeared to also be on sdb6 per bootinfoscript so if you have all your data off these partitions, just format them and create a mount point and entries in /etc/fstab for them. If sdb8 is your Kubuntu, it is over 90GB which is more than enough for a root partition and sdb5 and sdb6 are 352 and 250GB so you can create mount points for them to be used as data partitions and again, an /etc/fstab entry. If you decide to format sdb5 and 6, make sure they are unmounted as it won't work otherwise.
You could also delete sdb5, sdb6 and sdb7 and then resize sdb8 by moving it to the left, to the beginning of the Extended partition. This usually works but takes longer as you are moving not only the partition but all the data in it and it is a higher risk of failure and loss of data including having an unbootable machine since you will be moving the boot files. Doing this would give you one 700GB partition. You could shrink the root partition and create data partitions but the previous suggestion of formatting the current drives would be a lot simpler.
So first determine the Kubuntu partition with df -h as there is no way for us to know that.
And again, is the vista on sdb functional?
The vista was functional a few days ago (I haven't tried since then). However for some reason it seems to think there are two vistas when I start up but only one works.
I think I posted the whole output of the bootscript I will try again.
#!/bin/bash
VERSION='0.72';
RELEASE_DATE='29 July 2015';
LAST_GIT_COMMIT_SHORTLOG='';
LAST_GIT_COMMIT_DATE='';
################################################################################
# #
# Copyright (c) 2009-2010 Ulrich Meierfrankenfeld #
# Copyright (c) 2011-2012 Gert Hulselmans #
# Copyright (c) 2013-2015 Andrei Borzenkov #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to #
# deal in the Software without restriction, including without limitation the #
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or #
# sell copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in #
# all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS #
# IN THE SOFTWARE. #
# #
################################################################################
# #
# Current developer: Andrei Borzenkov #
# #
# Past developer: Gert Hulselmans #
# Past developer: Ulrich Meierfrankenfeld (meierfra) (ubuntuforums.org) #
# Past contributor: caljohnsmith (ubuntuforums.org) #
# #
# Hosted at: https://github.com/arvidjaar/bootinfoscript #
# Forked from: http://sourceforge.net/projects/bootinfoscript/ #
# #
# The birth of Boot Info Script: #
# http://ubuntuforums.org/showthread.php?t=837791 #
# #
# Tab width: 8 spaces #
# #
################################################################################
## Check if the script is run with bash as shell interpreter.
if [ -z "$BASH_VERSION" ] ; then
echo 'Boot Info Script needs to be run with bash as shell interpreter.' >&2;
exit 1;
fi
## Display help text ##
#
# ./bootinfoscript -h
# ./bootinfoscript -help
# ./bootinfoscript --help
help () {
cat <<- HELP
Usage Boot Info Script:
-----------------------
Run the script as sudoer:
sudo ${0} <outputfile>
or if your operating system does not use sudo:
su -
${0} <outputfile>
When running the script, without specifying an output file, all the output
is written to the file "RESULTS.txt" in the same folder as the script.
But when run from /bin, /sbin, /usr/bin, or another system folder, the file
"RESULTS.txt" is written to the home directory of the user.
When the file "RESULTS.txt" already exists, the results will be written to
"RESULTS1.txt". If "RESULTS1.txt" exists, the results will be written to
"RESULTS2.txt", ...
To get version number, release date, last git commit and git retrieval date
of this script, use (no root rights needed):
${0} -v
${0} -V
${0} --version
To get this help text, use (no root rights needed):
${0} -h
${0} -help
${0} --help
To automatically gzip a copy of the output file, use (root rights needed):
${0} -g <outputfile>
${0} --gzip <outputfile>
To write the output to stdout instead of a file, use (root rights needed):
${0} --stdout
The last development version of Boot Info Script can be downloaded, with:
(no root rights needed)
${0} --update <filename>
If no filename is specified, the file will be saved in the home dir as
"bootinfoscript_YYYY-MM-DD_hh:mm:ss".
HELP
exit 0;
}
## Download the last development version of BIS from git: ##
#
# ./bootinfoscript --update <filename>
#
# If no filename is specified, the file will be saved in the home dir as
# "bootinfoscript_YYYY-MM-DD_hh:mm:ss".
update () {
local git_ref_url='https://api.github.com/repos/arvidjaar/bootinfoscript/git/refs/heads/master'
local git_commit_url='https://api.github.com/repos/arvidjaar/bootinfoscript/git/commits'
local git_contents_url='https://github.com/arvidjaar/bootinfoscript/raw/master/bootinfoscript'
# Check if date is available.
if [ $(type date > /dev/null 2>&1 ; echo $?) -ne 0 ] ; then
echo '"date" could not be found.' >&2;
exit 1;
fi
# Get current UTC time in YYYY-MM-DD-hh:mm:ss format.
UTC_TIME=$(date --utc "+%Y-%m-%d %T");
if [ ! -z "$1" ] ; then
GIT_BIS_FILENAME="$1";
else
GIT_BIS_FILENAME="${HOME}/bootinfoscript_${UTC_TIME/ /_}"
fi
# Check if wget or curl is available
if [ $(type wget > /dev/null 2>&1 ; echo $?) -eq 0 ] ; then
printf '\nDownloading last development version of Boot Info Script from git:\n\n';
LAST_GIT_COMMIT_ID=$(wget -O - "${git_ref_url}" | sed -ne 's/^.*"sha": "\(.*\)".*$/\1/p');
LAST_GIT_COMMIT=$(wget -O - "${git_commit_url}/$LAST_GIT_COMMIT_ID");
wget -O "${GIT_BIS_FILENAME}" "${git_contents_url}";
elif [ $(type curl > /dev/null 2>&1 ; echo $?) -eq 0 ] ; then
printf 'Downloading last development version of Boot Info Script from git:\n\n';
LAST_GIT_COMMIT_ID=$(curl "${git_ref_url}" | sed -ne 's/^.*"sha": "\(.*\)".*$/\1/p');
LAST_GIT_COMMIT=$(curl "${git_commit_url}/$LAST_GIT_COMMIT_ID");
curl -o "${GIT_BIS_FILENAME}" "${git_contents_url}";
else
printf '"wget" or "curl" could not be found.\nInstall at least one of them and try again.\n' >&2;
exit 1;
fi
# First date is Author, second date is Commit
LAST_GIT_COMMIT_DATE=$(echo "${LAST_GIT_COMMIT}" | sed -ne 's/^[[:space:]]*"date": "\(.*\)"[[:space:]]*$/\1/p' | tail -1);
LAST_GIT_COMMIT_SHORTLOG=$(echo "${LAST_GIT_COMMIT}" | sed -n -e '/^[[:space:]]*"message":/ { s/^[[:space:]]*"message": "\(.*\)",[[:space:]]*$/\1/ ; s/\\n.*$// ; p }');
# Set the retrieval date in just downloaded script.
sed -i -e "4,0 s@LAST_GIT_COMMIT_SHORTLOG='';@LAST_GIT_COMMIT_SHORTLOG='${LAST_GIT_COMMIT_SHORTLOG}';@" \
-e "5,0 s/LAST_GIT_COMMIT_DATE='';/LAST_GIT_COMMIT_DATE='${LAST_GIT_COMMIT_DATE}';/" \
"${GIT_BIS_FILENAME}";
printf '\nThe development version of Boot Info Script is saved as:\n"%s"\n\n' "${GIT_BIS_FILENAME}";
exit 0;
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.