Results 1 to 14 of 14

Thread: Installing Kali alonside Ubuntu. Dual-booting. Repartitioning Question

  1. #1
    Join Date
    2016-May
    Posts
    16

    Installing Kali alonside Ubuntu. Dual-booting. Repartitioning Question

    Ok so I've finally made the plunge into the murky waters of Linux from a lifelong stint in Microsoft-land, and although the culture-shock is strong, the allure of almost-complete control of the code I use, combined with the newness of this open kernel has definitively made me a believer in all things Linux.
    That said, I must brave the well-known snarkiness and general upturned-nosed forums of the said Linux forums to ask a question that will no doubt be looked upon as dubious in integrity, and/or redundant to the point of unbelievability due to its ubiquity. I have, for the record, looked for a good 2 hours in this, and other Linux-oriented forums and tutorial websites, and have yet to see a simple, step by step guide that answers my question.
    So please, if I am making a huge mistake by reposting this question because of it being answered multiple times in an assumed well-made response elsewhere, point me to this response, so I don't bother anyone. I truly cannot find a decent answer to my particular conundrum.
    I am currently running Ubuntu 16.04 on an Acer Aspire V3, with a 64bit processor and half a terabyte of space. I don't want to reinstall Ubuntu, as I've downloaded many packages and tweaked the OS to my liking; Also converting my OS back into an ISO would be out of the question because I don't want to do that.
    I also already have a working live USB of Kali (previously checked and is working).
    My Gparted system breakdown looks like this (screenshot):
    Screenshot from 2016-05-26 23-01-44.jpg

    What would be the easiest way to repartition my HDD and install Kali alongside my Ubuntu OS? I'm using Grub2 as a bootloader. I'm sure I'm forgetting more pertinent information; I'm not doing so on purpose so if I am, please tell me what to provide, as well as how to provide it, and I will as soon as possible.
    Thank you so much in advance!

    -Aquashift

  2. #2
    Join Date
    2016-May
    Posts
    16
    ScreenshotFromDUAnalyzer.jpg test pic A

    ScreenshotFromDUAnalyzerB.jpgScreenshotFromDUAnalyzerB.jpg test pic B

    I have no idea if you all can see these images that I'm uploading onto this thread. I used GIMP to resize the png here in pixels, as a test. However if I could get feedback from you all as to what you are seeing, it would be appreciated, because when I open the image up from the forum site, I get an image of very tiny dimensions - not big enough to see any relevant information.

  3. #3
    Join Date
    2016-May
    Posts
    16

    Another test

    I've uploaded some screenshots containing specs of my HD and my live USB to photobucket, hoping to circumvent any issues with seeing them clearly as inserted media:

    here is the picture of my HD filesystem as given by Gparted:
    http://s1033.photobucket.com/user/ckirby108/media/Screenshot%20from%202016-05-26%2023-01-44_zpskpflxbuc.png.html]

    and this is a screenshot of my working, bootable live Kali OS:


    These next two are of the HD and USB from the Disk Usage Analyzer program:


    and:


  4. #4
    Join Date
    2015-Jul
    Location
    /home/duxim
    Posts
    408
    just read a little. it is not hard task. for example this post could be helpfull
    https://forums.kali.org/showthread.p...li+triple+boot

    but as I sow from your pictures you don't have swap partition, then make it.
    just in gparted from right side, shrink main partition, and make space for Kali
    Repetitio est mater studiorum

  5. #5
    Join Date
    2016-Mar
    Location
    Warszawa
    Posts
    2
    That's right. Kali need place to work. You should go follow duxim instructions

  6. #6
    Join Date
    2016-May
    Posts
    16
    Quote Originally Posted by duxim View Post
    just read a little. it is not hard task. for example this post could be helpfull
    https://forums.kali.org/showthread.p...li+triple+boot

    but as I sow from your pictures you don't have swap partition, then make it.
    just in gparted from right side, shrink main partition, and make space for Kali
    Thank you duxim, very much

  7. #7
    Join Date
    2016-May
    Posts
    16
    Ok, so I am running into trouble (already). I am trying to shrink my extended partition. I am currently booted from a live USB, and I deactivated my HDD partition that I want to resize. Here is a picture of it:


    "]




    As you can see the partition I am trying to resize, sda5, has the filesystem lvm2 pv, inside the extended partition sda2, which is given here:






    ---

    The partition sda5, the one I'm trying to shrink, has been deactivated and has no running processes to interfere with its resizing. Here is a picture of my whole HDD, showing no key or mounted or otherwise busy icons that would disallow me from resizing it:






    When I try to resize sda5, the new window that pops up, but I can't reposition the slider up top, nor change the numbers. Gparted doesn't say 'why' I can't do anything, it just doesn't let me. I know that it's something I'm doing wrong, and not Gparted, because when I try to resize sda1, my boot partition, it allows me to just fine (don't worry, I haven't actually resized or done anything to my boot partition. Just showing that I *can* and that Gparted is functioning properly).
    Here is a shot of Gparted's resizing window for my sda5 partition:






    There is 0 MiB free space preceding the partition, which is my guess as to why I can't resize it. However I don't know if this is, in fact, the real problem. And if it is, I wouldn't know how to fix this, or where to go from there.
    Can anyone help me? I'm almost positive this is just a newbie mistake.


    To reiterate:
    I am trying to shrink my main HDD extended partition (lvm2 pv filesystem), so that I can create a swap partition, and also install Kali alongside my already installed Ubuntu 16.04 OS.
    I am trying to do this with Gparted, from a live USB. I've unmounted/deactivated my HDD so I can work with it, but Gparted will not allow me to resize my partition, possibly because it doesn't have any space preceding it, but I really don't know why.
    If someone could help me I would really appreciate it, thank you!

    -Aquashift
    Last edited by Aquashift; 2016-05-30 at 17:38. Reason: Made it more readable

  8. #8
    Join Date
    2016-May
    Posts
    16
    Ok so I found out the reason I can't resize my partition using Gparted is because I wasn't attempting to resize the physical partition, I was trying to resize the logical partition. Gparted doesn't resize logical partitions, so I have to use LVM, Logical Volume Management.
    *facepalm*
    I'm reading up on LVM's documentation, but if anyone is familiar with using it, and wants to lend a hand, it would be much appreciated.
    I'm still trying to resize my partition.
    On my command prompt:
    Code:
    aandk@aandk-Aspire-V3-731:~$ sudo lvs
      LV     VG        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
      root   ubuntu-vg -wi-ao---- 459.46g                                                    
      swap_1 ubuntu-vg -wi-ao----   5.82g 
    aandk@aandk-Aspire-V3-731:~$ sudo pvs
      PV         VG        Fmt  Attr PSize   PFree
      /dev/sda5  ubuntu-vg lvm2 a--  465.28g    0
    and..

    Code:
    aandk@aandk-Aspire-V3-731:~$ sudo 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 17:16:18 -0600
      LV Status              available
      # open                 1
      LV Size                459.46 GiB
      Current LE             117622
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           252:0
       
      --- 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 17:16:18 -0600
      LV Status              available
      # open                 2
      LV Size                5.82 GiB
      Current LE             1490
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           252:1
    and finallly

    Code:
    aandk@aandk-Aspire-V3-731:~$ sudo pvdisplay
    
      --- Physical volume ---
      PV Name               /dev/sda5
      VG Name               ubuntu-vg
      PV Size               465.28 GiB / not usable 0   
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              119112
      Free PE               0
      Allocated PE          119112
      PV UUID               YurnSO-2rQh-t0rk-Qpr1-TLdQ-1Ick-dowvL7

  9. #9
    Join Date
    2016-May
    Posts
    16
    I just got back from a mini-vacation, and I see that no one has yet replied to this new set of developments... If anyone is familiar with LVM (Logical Volume Manager), and wants to come along for the ride, feel free to..
    I keep wondering though, if I can get away with skipping this part, and just using GParted to shrink my drive somehow.. It would certainly be easier that way.
    @duxim:
    Where did you go, friend? Did you not see from my screenshots I provided that I couldn't use GParted? Or did you see that I still could, and if so, how?

    -- Edit:
    If anyone wants to follow along, I'm currently using http://askubuntu.com/questions/19612...hysical-volume as a guide.
    Last edited by Aquashift; 2016-06-01 at 02:17.

  10. #10
    Join Date
    2016-May
    Posts
    16
    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.

  11. #11
    Join Date
    2016-May
    Posts
    16
    So, can anyone chime in and let me know what to do next? Do I need to do anything else with LVM before I start my install of Kali?

  12. #12
    Join Date
    2016-May
    Posts
    16
    Ok I finally installed Kali alongside Ubuntu 16.04 successfully! I entered the following:

    Code:
    sudo lvcreate --size=86G -n kali ubuntu-vg
    to create a 86 Gb logical volume named kali inside the ubuntu-vg volume group.

    Then I created a file system on it:

    Code:
    sudo mkfs.ext4 /dev/ubuntu-vg/kali
    Then I installed Kali using the new logical volume for /. The existing swap was used for both.

    I'm not familiar with the Kali installer and what it is capable of, but I did use it correctly to create a working dualboot!

  13. #13
    Join Date
    2016-Jun
    Posts
    1
    Quote Originally Posted by Aquashift View Post
    Ok I finally installed Kali alongside Ubuntu 16.04 successfully! I entered the following:

    Code:
    sudo lvcreate --size=86G -n kali ubuntu-vg
    to create a 86 Gb logical volume named kali inside the ubuntu-vg volume group.

    Then I created a file system on it:

    Code:
    sudo mkfs.ext4 /dev/ubuntu-vg/kali
    Then I installed Kali using the new logical volume for /. The existing swap was used for both.

    I'm not familiar with the Kali installer and what it is capable of, but I did use it correctly to create a working dualboot!
    Hi mate!
    I joined this forum just to say thanks for persisting with and posting your efforts and to get a little clarification as I'm attempting to duel boot Kali alongside my already I stalled Ubuntu 16 OS.
    I used LVM as you did to create another logical Volume within ubuntu-vg formatted it as ext-4 and started the install process via Kali live USB.
    At the partitioning phase I had to use manual as Kali install keep referring to the USB stick as the biggest free data space. So I manually chose /dev/ubuntu-vg/Kali.
    Q. Did you have to set up a boot point or mount point? Did you have to change the LV in any way during the install as I keep going around in circles within the partitioning phase of Kali install.
    Thanks.
    Last edited by joeisgood99; 2016-06-12 at 07:48. Reason: Typo

  14. #14
    Join Date
    2016-May
    Posts
    16
    Quote Originally Posted by joeisgood99 View Post
    Hi mate!
    I joined this forum just to say thanks for persisting with and posting your efforts and to get a little clarification as I'm attempting to duel boot Kali alongside my already I stalled Ubuntu 16 OS.
    I used LVM as you did to create another logical Volume within ubuntu-vg formatted it as ext-4 and started the install process via Kali live USB.
    At the partitioning phase I had to use manual as Kali install keep referring to the USB stick as the biggest free data space. So I manually chose /dev/ubuntu-vg/Kali.
    Q. Did you have to set up a boot point or mount point? Did you have to change the LV in any way during the install as I keep going around in circles within the partitioning phase of Kali install.
    Thanks.
    Hey Joe,
    sorry for the huge delay, I don't check these forums as often as I used to.
    Yes I did have to set up a boot flag, as well as a swap partition. Can you be a little more explicit as to your going round in circles with the partitioning phase?

Similar Threads

  1. [HELP] Installing Kali Linux in UEFI mode (NO Dual-Booting)
    By farid110 in forum Installing Archive
    Replies: 15
    Last Post: 2018-06-09, 15:30
  2. Dual booting Kali with Ubuntu 16.04
    By setanxyz in forum Installing Archive
    Replies: 5
    Last Post: 2017-06-16, 20:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •