Alright guys, I'm gonna bring everyone up to speed. To recap, I have Ubuntu 16.04 installed on my Acer Aspire laptop, and I'm trying to repartition my HDD so that I can install Kali alongside Ubuntu. I have a logical volume, so instead of shrinking my partition with GParted I'm using LVM (Logical Volume Manager) to resize my logical volume to make room for Kali.
I'm currently operating from a live USB, and this is what I've inputted so far in my terminal:
Code:
root@kali:/# vgdisplay
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 465.28 GiB
PE Size 4.00 MiB
Total PE 119112
Alloc PE / Size 119112 / 465.28 GiB
Free PE / Size 0 / 0
VG UUID L9I4nG-cyEt-QIXq-Ebfe-DW87-hC2G-6dMjJA
and
Code:
root@kali:/# lvdisplay
--- Logical volume ---
LV Path /dev/ubuntu-vg/root
LV Name root
VG Name ubuntu-vg
LV UUID 7U7bqA-eqAo-qpwE-7pAs-LVTA-NAGB-eBnDew
LV Write Access read/write
LV Creation host, time ubuntu, 2016-05-24 23:16:18 +0000
LV Status NOT available
LV Size 459.46 GiB
Current LE 117622
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/ubuntu-vg/swap_1
LV Name swap_1
VG Name ubuntu-vg
LV UUID FkWWZD-xKhm-N3ni-qVJe-mgne-lr6R-Q1I9HV
LV Write Access read/write
LV Creation host, time ubuntu, 2016-05-24 23:16:18 +0000
LV Status NOT available
LV Size 5.82 GiB
Current LE 1490
Segments 1
Allocation inherit
Read ahead sectors auto
I actually had to reactivate my logical volume in order to resize it, which I did using GParted.
Then, in terminal:
Code:
root@kali:/# sudo lvreduce --resizefs -L 150G /dev/ubuntu-vg/root
fsck from util-linux 2.27.1
/dev/mapper/ubuntu--vg-root: 491973/30113792 files (0.2% non-contiguous), 9245533/120444928 blocks
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on /dev/mapper/ubuntu--vg-root to 39321600 (4k) blocks.
The filesystem on /dev/mapper/ubuntu--vg-root is now 39321600 (4k) blocks long.
Size of logical volume ubuntu-vg/root changed from 459.46 GiB (117622 extents) to 150.00 GiB (38400 extents).
Logical volume root successfully resized.
root@kali:/#
Success! I reduced my logical volume sda5 with 'lvreduce.' As a precautionary note, if you're following along and want to shrink your Logical Volume as well, I would advise to do as I did, and shrink the filesystem simultaneously with --resizefs option. As you can see I shrunk my volume by about one half, by 150G.
My next step is to now create another volume for Kali to install into.