Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You have a pretty straightforward situation here. The extended partition (sda4) goes to the limit of the disk---thus all the space on the disk is useable. Any partition editor should be showing that you have ~ 21.5 GB free space at the end of sda7. (thus there should be no issue resizing sda7)
How much of sda3 is being used?
If I were to set up a 500GB disk from scratch (for dual-boot), I would give Windows no more than ~ 20GB. I would then have a partition for shared data (with modern Linux distros, you can use any format for this--including NTFS--but the most common formats are FAT and ext2 or 3. You can install a driver in Windows to access ext2 and 3)
Using a live CD I shrunk /dev/sda7 and I have 9.77 Gb of free space.
However I can not increase the size of /dev/sda5 - I can only shrink it.
Unfortunately, you shrunk sda7 leaving its start position unchanged. gparted would have let you shrink it leaving its end position unchanged. That would have left less to do.
Now you need to move sda7 so the unpartitioned space is before it instead of after it.
Then you need to move sda6 so the unpartitioned space is before it instead of after it. But since sd6 is swap, if you don't have any suspend to disk data in it at the time you repartition, it is likely easier to delete it and then recreate it, rather than move it.
Then you can expand sda5.
All that can be done in the liveCD similar to the way you shrunk sda7.
Unfortunately, you shrunk sda7 leaving its start position unchanged. gparted would have let you shrink it leaving its end position unchanged. That would have left less to do.
Now you need to move sda7 so the unpartitioned space is before it instead of after it.
Then you need to move sda6 so the unpartitioned space is before it instead of after it. But since sd6 is swap, if you don't have any suspend to disk data in it at the time you repartition, it is likely easier to delete it and then recreate it, rather than move it.
Then you can expand sda5.
All that can be done in the liveCD similar to the way you shrunk sda7.
Thanks that makes sense. I moved sda7 which take a very very long time - However sda6 is locked so I can not do anything.
Any ideas?
Code:
sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x70000000
Device Boot Start End Blocks Id System
/dev/sda1 1 8 64228+ 6 FAT16
/dev/sda2 9 1314 10485760 7 HPFS/NTFS
/dev/sda3 * 1314 30965 238176090+ 7 HPFS/NTFS
/dev/sda4 30966 60801 239657670 5 Extended
/dev/sda5 30966 31984 8185086 83 Linux
/dev/sda6 31985 32493 4088511 82 Linux swap / Solaris
/dev/sda7 33769 60801 217142541 83 Linux
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.