UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
Please do not title threads as urgent. It isn't urgent for those that volunteer their time to answer questions on the forum. Without knowing how your drives(s) are currently partitioned it is difficult to provide help.
then delete any unnecessary garbage and reboot.
Next, clone the partition and re-size the copy with partitioning software.
Finally, migrate to the larger partition.
I tried gparted. But no use. I couldnt extend my root space. So, I ake an unallocated space of 7gb.
Now , I want to add it to root. I can use live usb.
Specify how to add unalloctaed space to root.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
If you have 7Gb free space you can easily, if not very quickly, get it to be contiguous.
I assume you have a / and a /home partition or you wouldn't be referring to the problem partition as /. If that assumption is wrong and you are indeed installed on one partition your problem is very different.
If you are installed on one partition, back up your data in some manner (DVD(s), usb stick(s) or external drive) and reinstall on / and /home using all unused space on your drive. Make / at least 10GB.
When posting a question it is good to have information on your hardware and what else is install on it. From what information you give this could be the only install or the 22nd install on anything from a rooted smart phone to a super computer. Kind of hard to give advice on that sort of information. Just something to keep in mind for the future so people don't have to waste their time and yours by asking for information.
Sure . I will update the hardware and fstab details now itself. I am having a lot of doubts now.
I will clear it now.
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2c33c43c
Device Boot Start End Blocks Id System
/dev/sda1 2048 31713279 15855616 27 Hidden NTFS WinRE
/dev/sda2 * 31713280 32430079 358400 7 HPFS/NTFS/exFAT
/dev/sda3 32430080 205310699 86440310 7 HPFS/NTFS/exFAT
/dev/sda4 205310761 625141759 209915499+ f W95 Ext'd (LBA)
/dev/sda5 205310763 399685631 97187434+ 7 HPFS/NTFS/exFAT
/dev/sda6 415216053 604657344 94720646 7 HPFS/NTFS/exFAT
/dev/sda7 620455936 625141759 2342912 82 Linux swap / Solaris
/dev/sda8 604657664 620443647 7892992 83 Linux
/dev/sda9 399687680 415215615 7763968 83 Linux
Partition table entries are not in disk order
Now , I have reinstalled by allocating 7gb to home.
My Question is ,in future If i want to expand root , how could i do that by taking space from other ntfs partitions.
I reckon , resize2fs comands have some sequence of steps.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Wow. I thought I was good at goofy partition tables. Going to have to take some lessons from you I think.
Inside your Extended partition why are there 2 ntfs partitions? How much unused space is in each of them? What is their function?
How much unused space is in your sda1 partition (16.GB ntfs diagnostic)? I suspect you probably have less then 10% of that used. Is it really the first partition on the drive?
How much unused space is on sda3 (88.5GB ntfs which should be your WinJerryLewis Pro install)?
/dev/sda1 is Sony Recovery partition of 15 gb (Usually hidden in windows for safety )
/dev/sda2 is i dont know.
/dev/sda3 is C drive for my Windows
/dev/sda4 is I dont know
/dev/sda5 is E for musics
/dev/sda5 is F for study
All other ext4 is my root and my swap.
Dude to be frank I want to know ore about these things . Partitions harddisks , but dont know where to start from.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Anything you do to the partitions will need done by gparted. I know people say it is not safe but that is bull. What you can't do is mess with your sda2 partition that needs to be set correctly in realation to the blocks on your drive. This can be done with gparted but I haven't a clue, don't use Windows so don't really study any thing to do with it.
Sda1, if installed sensibly would be your boot partition which is sda2.
Sda4 is your extended partition. In the MSDos partition table you are only allowed 4 primary partitions. This would mean that you could only have 4 partitions. This was fine when that partition table was developed in the early 90s and drives were very small. When BIG drives, like 10GB, were coming on there was a neat hack come up with that allows for more partitions. You could make an extended partition. This is a modified Primary partition. You create Logical partitions within the Extended partition.
This means that all your partitions sda5 and up are Logical partitions within sda4. Logical partitions always start with 5 and go up. I mention this because most of my drives have one Extended partition which is sda1 which includes the entire drive. All other partitions are Logical and start with sda5 so I have no sda2. 3 or 4. This gives me maximum flexibility in creating partitions.
Your sda1 partition and all others are perfectly "seen" under any Unix like OS like Linux. This doesn't matter but if you check it from gparted (easy graphical presentation of your drive) you will see a lot of unused space there and that could be resized by at least 50% if it was placed anywhere else on your drive without effecting your boot partition.
Sda3 is also probably bigger than it needs to be.
If I were you I would remove your Ubuntu install, backing up any data on it first. I would then, if you have enough unused space, resize, with gparted your sda3 drive to be smaller.
Then enlarge the sda4 partition to take up that space.
Move your sda5 and sda6 drives to one end of sda4 resizing them if needed.
This will give you a solid block of unused space in sda4 to put your Ubuntu install in.
If you are keeping your data in the ntfs partitions you really don't need much of a /home partition. 3 gigs would be plenty if you have no music or pictures or video saved there. All you really need it for is your ~/.foo files (hidden files - Ctrl + h will reveal them). They are important files as they are your user configuration of your system. They don't take up a lot of space though. They are text files except for your thumbnail cache.
If what ever you are doing is mainly in the system files of Ubuntu then you could make the entire rest of the unused space in sda4 for your ubuntu / partition.
Another thing to consider is an external drive for your data storage like your sda5 and 6 ntfs partitions. If you got such a drive you could use gparted to copy/paste those partitions to the external.
You would then have room for a comfortable Ubuntu install and an ext4 data partition. This is more secure on a box with Windows on it as anyone getting into your Windows would not be able to access the ext4 partition but you can drop any files from it to an ntfs partition if Windows really needs that file.
Ubuntu should have a damned good password on it. Anyone with access to it has complete access to any file, system or data, on your Windows install and with root permissions can do anything to them at all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.