LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   re-sizing partitions (https://www.linuxquestions.org/questions/linux-newbie-8/re-sizing-partitions-4175470508/)

sniper8752 07-22-2013 10:08 AM

re-sizing partitions
 
1 Attachment(s)
Is there any way that I can re-size this partition so that I have enough room?

haertig 07-22-2013 10:51 AM

You are currently using 175Mb in /boot. That's quite a bit. Do you have a bunch of kernels stored there? Chances are you could free up a lot of that /boot space by deleting things you don't need there. Much easier (and safer) than any resizing you might be considering, Make sure you know WHICH kernels you can safely delete - you don't want to delete the one you are actively booting! I only have one kernel stored on this particular machine I am on right now, and my usage in /boot is only 28Mb.

Code:

$ cd /boot
$ ls -l
total 23352
-rw-r--r-- 1 root root  791023 Apr 10  2012 abi-3.2.0-23-generic
-rw-r--r-- 1 root root  140279 Apr 10  2012 config-3.2.0-23-generic
drwxr-xr-x 3 root root    12288 Mar 11 22:53 grub
-rw-r--r-- 1 root root 14744253 Jun 26 21:52 initrd.img-3.2.0-23-generic
-rw-r--r-- 1 root root  176764 Nov 27  2011 memtest86+.bin
-rw-r--r-- 1 root root  178944 Nov 27  2011 memtest86+_multiboot.bin
-rw------- 1 root root  2884358 Apr 10  2012 System.map-3.2.0-23-generic
-rw-r--r-- 1 root root  4965840 Jul 10  2012 vmlinuz-3.2.0-23-generic
$ du -sh
28M        .
$


sniper8752 07-22-2013 11:03 AM

I will look into what exactly is in my boot partition.

sniper8752 07-22-2013 11:24 AM

1 Attachment(s)
attached is the listing of things in the boot partition.

haertig 07-22-2013 12:53 PM

You have four kernels there. Unless you have a special need for all of them, only one is really necessary. If you remove three of them, then do the update that you were initially attempting, that update will put a second kernel under /boot. You should have the space you need for that after deleting three, but be aware that you will once again have two after the update.

So we know which kernel you system is configured to boot (we don't want to delete that one!), post the contents of /boot/grub/menu.lst. This file may be called /boot/grub/grub.cfg on your system, or menu.lst may be a symlink to grub.cfg. Whatever ... post the contents of menu.lst if it exists, if not, post the contents of grub.cfg.

haertig 07-22-2013 12:56 PM

Also post the output of "uname -a". That will show which kernel is actually running. This would normally be the same kernel that is configured in menu.lst, but maybe not ... if the configured kernel couldn't boot and it's falling back to some other kernel.

Terminal_Meltdown 07-22-2013 03:31 PM

@ sniper8752

Partitions can be resize by using programs like gparted or other similar software. Be CAUTIOUS thought because when you're resizing patitions things may go wrong or not.

Backup any data you don't want to lose before messing with the partitions.

tommcd 07-22-2013 09:37 PM

I would recommend using a Parted Magic live CD for resizing partitions: http://partedmagic.com/
I have used Parted Magic many times to partition hard drives and resize partitions and it works very well in my experience. It has an easy to use graphical interface also.

John VV 07-22-2013 10:03 PM

from the image in the first post
If this was MY drive
i would back up important data
and repartition and reinstall

200 meg for /boot might be big , or NOT
200 M is about normal size

35 gig for / if there is enough drive space that is fine
but you do NOT need separate partitions /tmp and /opt
Also there is that 3.91 gig "sda8" unknown partition just taking up space

i would use something like this
with sda2 and Extended there is sda3,4 MISSING -- not good
so back up data and reformat sda2 to ext4 , reinstall
sda3 /boot -- 200 meg
sda4 /home -- 20 Gig ( and that is BIG, 15gig is an average size )
sda5 SWAP -- 1 gig to 4 gig if you have more that say 12 gig ram you can opt out of a swap partition, maybe
sda6 / -- the rest of the drive

haertig 07-23-2013 12:56 PM

Quote:

Originally Posted by John VV (Post 4994986)
... but you do NOT need separate partitions /tmp and /opt ...

How do you know that? When we don't know the environment this system is used in? The OP has not specified how this system is used, what it is used for, etc. It may not be an individual users desktop. At home on my individual user desktop I generally set up just one / partition and swap, but at work on production systems I often set up separate /, /boot, /tmp, /var, /opt, /usr, /usr/tmp, /home, /whatever and those are all typically built on LVM2, so I can resize them easily as needed.

haertig 07-23-2013 01:02 PM

Quote:

Originally Posted by John VV (Post 4994986)
... with sda2 and Extended there is sda3,4 MISSING -- not good ...

I would say "unusual setup". "not good" implies it will cause problems, which it won't. There is no rule that says you have to use up all the primary partitions before you start creating logical ones.

Captain Pinkeye 07-23-2013 01:38 PM

Personally i wouldn't bother resizing and would stick to haertig's advice

1. Run 'uname -a' to get the version of kernel you are actually running (it will be the latest one anyway). Note the number.
2. Delete those unused kernels - these are packages, so don't just 'rm' in /boot. Fire up Synaptic or something, search for 'linux-image' and delete all but the one you use (that's the one with the number).

It is unusual to have /opt and /tmp on separate partitions, but since you have quite a lot of room there, why bother.

sniper8752 08-13-2013 08:27 PM

3.8.0-25-generic #37-Ubuntu SMP
synaptic does not come up for me. is there another one?
also, where would these other kernels come from? I don't boot to anything else, besides win7. i know when the grub comes up - there are 1/2 other linux options - would these be those?

michaelk 08-13-2013 08:44 PM

To clean out all of the files associated with a kernel and not just what is in your /boot check out this URL.

http://tuxtweaks.com/2010/10/remove-...h-one-command/

sniper8752 08-19-2013 08:37 PM

ok - will give this a try.


All times are GMT -5. The time now is 07:29 AM.