Manage Disk space
Liam Proven
lproven at gmail.com
Sat May 2 21:03:22 UTC 2020
On Fri, 1 May 2020 at 18:45, Zahid Rahman <zahidr1000 at gmail.com> wrote:
>
>
> Hi Liam,
>
> I have both operating systems installed on /dev/nvme0n1
> Disk /dev/nvme0n1: 238.49 GiB this is the faster type disk. if faster is SSD
>
> Disk /dev/sda: 931.53 GiB, this is the other physical disk I want to utilise
>
> I previously copied all my download folders (approx. 50gb) to /dev/sda (bigger disk) and deleted them from
> /dev/nvme0n1 , (alos emptied trash folder) but still low disk space error.
OK. Do you want to keep that stuff? If so, do you have anywhere else to put it?
> I mainly use OS ubuntu 19 these days.
OK.
> I want to able to install linux Kali after sorting out this disk space issue.
My advice: Don't.
I learned from Quora that Kali featured in the TV show "Mr Robot"
(which I have not seen).
Many people now want to learn Kali as a result. Don't. Forget it. It's
a specialist tool for experts. It is not a replacement for Ubuntu and
Ubuntu can, if you learn, do everything Kali can.
> Linux disk space workings partitions etc. are a bit of a mystery to me not as easy as file explorer.
> but after this exercise I will be ok.
If you are having difficulties with Ubuntu you *will not* be able to
use Kali *at all.*
Forget about it until you have reached a level of technical knowledge
and skill where you are answering other people's questions online, not
asking them.
I am very serious.
> sudo sfdisk -l output:
[Trimming all the Snap mounts etc.]
> Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors
> Disk model: SAMSUNG MZVLB256HAHQ-000H1
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: gpt
> Disk identifier: 677E7307-8D34-490B-9237-490987FCA637
>
> Device Start End Sectors Size Type
> /dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
> /dev/nvme0n1p2 1050624 1083391 32768 16M Microsoft reserved
> /dev/nvme0n1p3 1083392 285278207 284194816 135.5G Microsoft basic data
> /dev/nvme0n1p4 422522880 424620031 2097152 1G Linux filesystem
> /dev/nvme0n1p5 424620032 500117503 75497472 36G Linux LVM
> /dev/nvme0n1p6 285278208 422522879 137244672 65.5G Linux filesystem
>
> Partition table entries are not in disk order.
>
>
> Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
> Disk model: HGST HTS721010A9
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disklabel type: gpt
> Disk identifier: 4034D061-589A-4E0E-9820-AA0937A806C9
>
> Device Start End Sectors Size Type
> /dev/sda1 2048 1230847 1228800 600M EFI System
> /dev/sda2 1230848 3327999 2097152 1G Linux filesystem
> /dev/sda3 3328000 1953523711 1950195712 929.9G Linux LVM
OK. So there is no space on the 1TB disk for Windows at all, correct?
Is that what you want?
I see that you have used LVM. LVM makes it much more complicated to
configure your disk space. I do not use it and cannot help with it. As
far as I know, once you have LVM in place, you cannot remove it or
convert it to non-LVM.
Perhaps you chose to encrypt your disk. I also recommend against this.
It is hard to do, it kills performance, it make it difficult to
impossible to reconfigure your storage, and it is easier to use social
engineering to get someone to disclose their passwords than to crack
an encrypted disk, so nobody tries.
As such, what I recommend is this: you back up anything you want to
keep, including settings and so on.
Download a fresh copy of Ubuntu 20.04.
Boot the PC with this. Remove all the Ubuntu 19 partitions completely.
Remove LVM, disable encryption and remove all encrypted drives.
Make some new partitions with GParted *before* you run the installer.
• Make a single ext4 partition on the NVMe drive, in place of your
current 64GB LVM volume. Keep your Windows and EFI partition and the
1GB partition called /dev/nvme0n1p4 -- I suspect this is a /boot
partition or a BIOS GRUB partition. It would be useful if you could
find out and tell us.
Make 2 on the hard disk:
• 1 big ext4 partition filling most of the disk
• 1 small partition of type "linux swap" at the end, no bigger than 2x
as much RAM as you have.
Reinstall like this:
In the partitioning screen, click "something else".
First click on the new partition on the NVMe drive. Mark it "use as
ext4" and under "mount point" pick "/" -- this is where Ubuntu will be
installed. You can untick the box saying format the drive but that is
not important.
Then click on the new partition on the HDD. Again, pick "use as ext4".
Mount it as "/home".
It should automatically pick up the swap partition but you can check.
It should also automatically pick up the EFI partition, but if not,
select it and pick "EFI system partition" (or words to that effect) in
the drop-down menu.
If that little 1GB partition _is_ your BIOS BOOT partition, pick that
in the drop-down as well.
Optional: then click on the Windows drive. Pick "use as NTFS". Mount
it as "/windows" -- you must type that in the box.
Then install.
This will put your OS on the SSD, for speed. All your data will be
kept on the HDD, for the space, but this will not noticeable slow down
operation.
You will have 0.99TB of space for your data.
Because there is a swap partition, Ubuntu will not create a swap file
on the root drive, which is better for the life of your SSD.
And Windows should still work just as it does now, but all your
Windows files will be available when you are in Ubuntu if you go to
the folder called /windows in the root directory.
This is the simplest, fastest and most effective way to make use of your space.
When it's done, restore your data and any settings.
--
Liam Proven – Profile: https://about.me/liamproven
Email: lproven at cix.co.uk – gMail/gTalk/gHangouts: lproven at gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053
More information about the ubuntu-users
mailing list