M
M
Malik2020-12-14 23:41:32
linux
Malik, 2020-12-14 23:41:32

How to expand the size on the disk where ubuntu is installed?

Good day! I need to expand the size of the partition on which ubuntu is installed due to other empty partitions, when installing ubuntu allocated little space now I need more, help me decide

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Cheremisin, 2020-12-15
@leahch

Use gparted - a graphical utility. You better save yourself!!! Yes, run with sudo

V
Valdemar Smorman, 2020-12-15
@smorman

You can also use mount, df, dd, e2fsck and resize2fs

V
Valentin Sudakov, 2020-12-18
@svsd_val

There are 2 ways:
1. To a cold one (when the main system is turned off and its disk is not used in place with its partition) (this method is simple and the probability of breaking something is very small)
1.1. Boot from the installation disk of any Linux
1.2. Run gparted (if not installed) in it:
1.3. Delete / reduce unnecessary sections
1.4. Expand the desired partition
2. Hot (when the main OS and its screw are used in a place with its partition) (this method is for the case when you need to do this and there is no way to reboot or boot from another OS, it is for those who understand what they are doing)
2.1 . Go to fdisk
2.2. Delete unwanted partitions
2.3. Remember the parameters of the main partition (the one on which Ubuntu is located and from which it is launched), writing them down on a piece of paper (positions and type of fs).
2.4. Delete main partition
2.5. Create a new partition by specifying the (recorded/remembered earlier) starting position
2.6. Save changes
2.7. You can execute commands to rescan screws and partitions (see below) (you can just reboot)

for i in `find /sys -iname 'scan' | grep host`; do echo echo "'- - -' >$i"; echo "- - -" >$i; done;
echo 1 > /sys/block/sdX/device/rescan

2.8 Execute resize2 /dev/sdXX and after that the whole space will be available to the system.
There is, of course, method number 3, but it is already tied to LLVM ....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question