1

When I boot up I get the message that the /boot is low on space.

I have been reading various responses but when I type the command 'dpkg -l | grep linux-image-' it tells me that the "-1" is not recognised.

Is there an updated version of Ubuntu Tweak? I have Ubuntu 15.04.

I could resize the /boot partition with Gparted but I am new to ubuntu and uncertain about doing that.

sudo dpkg -1 linux-image-* | grep ^ii 
[sudo] password for david: 
dpkg: error: unknown option -1 
Type dpkg --help for help about installing and uninstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management; 
Type dpkg -Dhelp for a list of dpkg debug flag values; 
Type dpkg --force-help for a list of forcing options; 
Type dpkg-deb --help for help about manipulating *.deb files;
Ravan
  • 9,379

2 Answers2

1

From your comment ,you are using 1 instead of l
the correct command is:

dpkg -l | grep linux-image-

Sample Output:

ii  linux-image-3.16.0-30-generic                         3.16.0-30.40~14.04.1                                amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-3.16.0-50-generic                         3.16.0-50.67~14.04.1                                amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-extra-3.16.0-30-generic                   3.16.0-30.40~14.04.1                                amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-extra-3.16.0-50-generic                   3.16.0-50.67~14.04.1                                amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-generic-lts-utopic                        3.16.0.50.41                                        amd64        Generic Linux kernel image

Apart from that typo, remaining question is duplicate of this one

Also I didn't find any Ubuntu tweak for vivid ,refer here


I am adding this screenshot to show the difference:

Imgur

Ravan
  • 9,379
  • Yes I was using the correct command (several times). The response I get is that -1 is not recognised. – David Ashton Oct 06 '15 at 13:58
  • please , just copy the command in my answer and paste in your terminal..@DavidAshton – Ravan Oct 06 '15 at 15:13
  • this is what I get when I type the command :david@david-ProBook-650-G1:~$ sudo dpkg -1 linux-image-* | grep ^ii [sudo] password for david: dpkg: error: unknown option -1

    Type dpkg --help for help about installing and uninstalling packages [*]; Use 'apt' or 'aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files;

    – David Ashton Oct 06 '15 at 15:42
  • david still I see 1 not l in lion...please copy command in my answer...@DavidAshton – Ravan Oct 06 '15 at 15:45
  • @DavidAshton please accept it as answer if it solved your problem=) – Ravan Oct 06 '15 at 15:59
0

You might free the /boot by removing old kernel and initrd image.

Example:

root@Lenovo-G40:/boot# uname -a
Linux Lenovo-G40 3.19.0-30-generic #33-Ubuntu SMP Mon Sep 21 20:58:04 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

From above command i'm running kernel 3.19.0-30-generic.

Now go to /boot and do ls.

root@Lenovo-G40:/boot# ls
abi-3.19.0-15-generic     grub                          memtest86+.elf                vmlinuz-3.19.0-30-generic
abi-3.19.0-30-generic     initrd.img-3.19.0-15-generic  memtest86+_multiboot.bin      vmlinuz-3.19.0-30-generic.efi.signed
config-3.19.0-15-generic  initrd.img-3.19.0-30-generic  System.map-3.19.0-15-generic
config-3.19.0-30-generic  lost+found                    System.map-3.19.0-30-generic
efi                       memtest86+.bin                vmlinuz-3.19.0-15-generic

Now we will remove old kernel and initrd (also all files associated to that version 3.19.0-15).rm -rf initrd.img-3.19.0-15-generic abi-3.19.0-15-generic config-3.19.0-15-generic System.map-3.19.0-15-generic vmlinuz-3.19.0-15-generic.

Lastly, update grub to make sure the grub bootloader entry updated via update-grub.

To extend the filesystem for boot, we need extra effort and very risky. Since /boot are located infront of the disk sector. Assuming you still have free space on your disk, you need to move the disk layout to get some space for /boot.

Device       Start       End   Sectors  Size Type
/dev/sda1     2048   1050623   1048576  512M EFI System
/dev/sda2  1050624   1550335    499712  244M Linux filesystem
/dev/sda3  1550336 976771071 975220736  465G Linux LVM

From above you can see the end sector of /dev/sda2 (which /boot reside) 1550335 and start sector of /dev/sda3 (in this case /root) 1550336 are continuous.

To extend boot, you need to make some space between /dev/sda2 and /dev/sda3. Gparted can help you archive this, but the filesystem involve need to be offline and there must be of course a free space on the disk.