2

please help me here i am always getting messages saying no free space available in boot partition.

enter image description here

output of ls -alh /boot

total 79M
drwxr-xr-x 4 root root 1.0K Sep 7 20:53 .
drwxr-xr-x 23 root root 4.0K Sep 5 18:38 ..
-rw-r--r-- 1 root root 1.2M May 8 16:14 abi-3.16.0-38-generic
-rw-r--r-- 1 root root 1.3M Aug 17 12:10 abi-4.1.6-040106-generic
-rw-r--r-- 1 root root 168K May 8 16:14 config-3.16.0-38-generic
-rw-r--r-- 1 root root 177K Aug 17 12:10 config-4.1.6-040106-generic
drwxr-xr-x 5 root root 1.0K Sep 5 14:23 grub
-rw-r--r-- 1 root root 28M Aug 22 22:49 initrd.img-3.16.0-38-generic
-rw-r--r-- 1 root root 28M Aug 24 00:35 initrd.img-4.1.6-040106-generic
drwx------ 2 root root 12K Aug 12 12:52 lost+found
-rw-r--r-- 1 root root 173K Mar 12 2014 memtest86+.bin
-rw-r--r-- 1 root root 174K Mar 12 2014 memtest86+.elf
-rw-r--r-- 1 root root 175K Mar 12 2014 memtest86+_multiboot.bin
-rw------- 1 root root 3.4M May 8 16:14 System.map-3.16.0-38-generic
-rw------- 1 root root 3.6M Aug 17 12:10 System.map-4.1.6-040106-generic
-rw-r--r-- 1 root root 6.1M Jun 28 01:15 vmlinuz-3.16.0-38-generic
-rw------- 1 root root 6.4M Aug 17 12:10 vmlinuz-4.1.6-040106-generic

output of sudo parted -l

Model: ATA ST9500325AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  106MB  105MB   primary   ntfs            hidden
 2      106MB   140GB  140GB   primary   ntfs            boot
 3      140GB   471GB  331GB   primary   ntfs
 4      471GB   500GB  29.5GB  extended                  lba
 5      471GB   493GB  22.0GB  logical   ext4
 6      493GB   499GB  6536MB  logical   linux-swap(v1)
 7      499GB   500GB  910MB   logical   ext4

@Pilot6

Pilot6
  • 90,100
  • 91
  • 213
  • 324
Rishin Ravi
  • 31
  • 1
  • 1
  • 6
  • When and by what is the message issued? I'll take a guess and say when updating the system...? There is probably not enough space on the boot partition to hold another Kernel. From the amount of used space I assume there are currently three Kernels installed. You can always remove old Kernels if you do not experience bugs with the current. Could you post the output of 'ls -alh /boot' – Nephente Sep 08 '15 at 15:59
  • I think you have to select /dev/sda2 then point your mouse on the yellow rectangle and drag to increase the space of the partition, but first you have to move upwards the unallocated (713.86MB) in place of dev/sda3 – Bento Sep 08 '15 at 16:02
  • 1
  • how to remove old kernals @nephente – Rishin Ravi Sep 08 '15 at 16:18
  • Better not remove any. The Kernel 3.16.0 is the official one from the Ubuntu repository. You should probably keep this. The 4.1.6 was installed by you from some other source. Having two functioning kernels available is a good thing! That way you can still boot the system if your custom kernel should fail. Best to go with Pilot6's instructions and resize the boot partition after all. Keep in mind though, that although probably everything is going to go well, you should have a recent backup at hand. – Nephente Sep 08 '15 at 16:35
  • Do you boot from LiveUSB or HDD when run the commands? – Pilot6 Sep 09 '15 at 12:15

1 Answers1

1

You need to boot from Ubuntu LiveUSB first.

Your sda5, sda6 and sda7 partitions are inside the extended sda4 partition.

You will need to extend sda4, then move sda5 and sda6 left, then extend sda7.

You will also need to re-install grub, because start sector of your /boot partition will change. It can be done from LiveUSB by

sudo mount /dev/sda5 /mnt
sudo mount /dev/sda7 /mnt/boot
sudo chroot /mnt
sudo grub-install /dev/sda
exit
Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • doest it effect windows if i install grub in /dev/sda – Rishin Ravi Sep 08 '15 at 16:04
  • It is already on /dev/sda. You just need to update it. – Pilot6 Sep 08 '15 at 16:06
  • what is mnt @Pilot6 – Rishin Ravi Sep 08 '15 at 16:13
  • /mnt is a directory where you will temporarily mount your partitions to do the grub update. – Pilot6 Sep 08 '15 at 16:14
  • i am stuck sudo grub-install /dev/sda sudo: unable to resolve host mint grub-probe: error: cannot find a device for /boot (is /dev mounted?). Installing for i386-pc platform. grub-install.real: error: cannot find a device for /boot/grub (is /dev mounted? – Rishin Ravi Sep 09 '15 at 10:58
  • i am stuck sudo grub-install /dev/sda
    sudo: unable to resolve host mint grub-probe: error: cannot find a device for /boot (is /dev mounted?). Installing for i386-pc platform. @Pilot6
    – Rishin Ravi Sep 09 '15 at 11:05
  • I added another command for that. – Pilot6 Sep 09 '15 at 11:17
  • error again...........sudo grub-install /dev/sda grub-probe: error: failed to get canonical path of /cow'. Installing for i386-pc platform. grub-install.real: error: failed to get canonical path of/cow'. @Pilot6 – Rishin Ravi Sep 09 '15 at 11:33
  • Boot again from LiveUSB and run these commands. I updated. – Pilot6 Sep 09 '15 at 11:39
  • this is the output i got::::::;sudo grub-install /dev/sda sudo: unable to resolve host mint Installing for i386-pc platform. /proc/devices: fopen failed: No such file or directory /proc/devices: fopen failed: No such file or directory /proc/devices: fopen failed: No such file or directory /proc/devices: fopen failed: No such file or directory grub-install.real: warning: Sector 32 is already in use by the program – Rishin Ravi Sep 09 '15 at 11:51
  • FlexNet'; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track. grub-install.real: warning: Sector 49 is already in use by the programFlexNet'; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track. Installation finished. No error reported. but still i am able to boot @Pilot6 – Rishin Ravi Sep 09 '15 at 11:52
  • Probably disk name has changed. What is output of sudo parted -l. And please post outputs by editing your question, not to comments. – Pilot6 Sep 09 '15 at 12:06
  • Were the mounts successful? If the mountpoints do not exist yet, you will need to create them first: sudo mkdir -pv /mnt/{boot,dev,sys,proc} @RishinRavi – Nephente Sep 09 '15 at 12:12
  • posted the output of sudo parted -l in the question @Pilot6 – Rishin Ravi Sep 09 '15 at 12:13
  • Do you boot from LiveUSB or HDD when run this command? – Pilot6 Sep 09 '15 at 12:15
  • i booted from HDD @Pilot6 – Rishin Ravi Sep 09 '15 at 12:18
  • Then you do not need to do anything, if it boots OK from HDD. That was supposed to be run from USB to fix booting. If it already boots, then there is no need. – Pilot6 Sep 09 '15 at 12:20
  • but linux is booting from HDD.. and its works fine @nephente – Rishin Ravi Sep 09 '15 at 12:24
  • @RishinRavi I posted the comment before you revealed that everything is working fine! – Nephente Sep 09 '15 at 12:35