Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1769  / 2 Years ago, wed, september 28, 2022, 5:08:37

I'm running Ubuntu Server as a virtual machine with VirtualBox in Windows. Because I've ran out of space I resized the virtual machine size from 6 GB to 8 GB. But those 2 GB appear as "Free space" inside the Ubuntu OS.



I suspect I have to use "parted" to reallocate the "Free space".



Typing parted, then help, shows a list of commands. I want to list all partitions first so I type print free:



(parted) print free
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
32.3kB 1049kB 1016kB Free Space
1 1049kB 5638MB 5637MB primary ext4 boot
5638MB 5639MB 1048kB Free Space
2 5639MB 6441MB 802MB extended
5 5639MB 6441MB 802MB logical linux-swap(v1)
6441MB 8590MB 2149MB Free Space


So I want to append all Free space to number 1. How would I do that? I'm clueless :(


More From » 12.10

 Answers
7

1) You need to run gparted from Live CD/USB otherwise it can't unmount your Ubuntu partitions.



2) You can then resize the primary partition to include the free space behind it (2149MB).



The remaining 2 small free sections are parted's partitioning requirement I guess, you don't need to touch these.


[#27120] Thursday, September 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rinstracte

Total Points: 221
Total Questions: 114
Total Answers: 120

Location: France
Member since Fri, Jan 28, 2022
2 Years ago
;