"No space left on device" when trying to load 3.16 kernel

Started by Chiefahol, April 18, 2016, 12:07:46 PM

Previous topic - Next topic

Chiefahol

Hello

I am trying to load the standard 3.16 armhf kernel but:

Setting up linux-image-3.16.0-4-armmp (3.16.7-ckt25-2) ...
vmlinuz(/boot/vmlinuz-3.16.0-4-armmp
) points to /boot/vmlinuz-3.16.0-4-armmp
(/boot/vmlinuz-3.16.0-4-armmp) -- doing nothing at /var/lib/dpkg/info/linux-image-3.16.0-4-armmp.postinst line 263, <STDIN> line 2.
The link /initrd.img is a dangling linkto /boot/initrd.img-3.16.0-4-armmp
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-4-armmp

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-4-armmp with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-4-armmp.postinst line 634, <STDIN> line 2.
dpkg: error processing package linux-image-3.16.0-4-armmp (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-3.16.0-4-armmp
E: Sub-process /usr/bin/dpkg returned an error code (1)


This was with a 64GB card, the root partition is always 1.9GB and 'df -h' shows no empty space.

Is there any way i can expand the root partition so i can update this kernel?

If your wondering, the reason for the change is that kernel 3.4 is incompatible with firejail.

Oow, this was with a A20-OLinuXino-LIME and the latest Jessie image.


soenke

you could simply resize the ext4-partition using another linux computer with a card reader.

Chiefahol

Hey, thanks for the feedback.

I attempted it in Gparted but it does not read the SD properly:

https://i.imgur.com/K6D2jQc.png

Here is the result of fdisk:

sudo fdisk -l

Disk /dev/sdd: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders, total 15523840 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: 0x6f20736b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048       34814       16383+  83  Linux
/dev/sdd2           34816     3909631     1937408   83  Linux


What command should i use to resize /dev/sdd2? (Sorry, i big noob.)

soenke

First, before you do anything, backup all relevant data. If it is just the standard image, it wont matter.

If you have not done anything with partitions before, i recommend that you first read some tutorials about using gparted, resizing ext4 etc. there is plenty of stuff on the internet, so everything i would write here would be a bad repitition of a good tutorial that is out there.

start with googleing something like "ubuntu ext4 resize" and you will get happy.

Chiefahol

I tried to resize it on a 8GB and 64GB SD, i get the same message:

~> sudo resize2fs /dev/sdd2
resize2fs 1.42.9 (4-Feb-2014)
The filesystem is already 484352 blocks long.  Nothing to do!


:P Strange since there is definitely room on the SD for the partition to expand over! The space is not recognized by the df command either, here is an example of the 64GB:

~> df -h
/dev/sdd1        16M  8.9M  7.2M  56% /media/user/6B4C-FFFD
/dev/sdd2       1.8G  1.1G  631M  64% /media/user/01e68986-4782-4e25-a131-b9be117a8eae


Does anyone have any advice? Or an alternative way i could install debian arm?

It would be great if olimex could release larger official images.

soenke

you first have to resize the partition, after that the file system.

soenke

and no, they should not release a bigger image. Reasons:
1) you can easily resize the file systems by yourself, just ask google
2) the download size would also be bigger. Do you really want to download a 64GB file? And please also ask those who have a 4Mbit DSL and not a 100Mbit fibre connection.
3) they would have to provide one image for every sd-card size, thats a lot more work they cant put into providing good quality images

Chiefahol

If i could not sit here week after week struggling to do this i would prefer that, even if it meant a larger download. At this point i would pay money just to have a larger SD with it shipped to me. :'(

I tried using Gparted to resize it, but it says there is no free space on an 8GB card.

I tried using Gparted to copy the 8GB partition to a 64GB SD so i could expand it, the copied partition comes up as an 'unknown type'.

I then used LM17's 'Disk Writer' to restore the image to a 64GB SD. Gparted still claimed there was no free space on the device.

Can anyone help me? Any confirmed guides on how to do this? All the ones I have tried have failed.

JohnS

You can use fdisk / sfdisk instead (see the net).

Do be 100% sure your cards are GENUINELY the size they say as cheap ones will NOT be and then you get weird errors which are not recoverable so you waste time till you discard the bad card.

John

soenke

Try this (3rd link on google ;) ):

http://askubuntu.com/questions/24027/how-can-i-resize-an-ext-root-partition-at-runtime

2nd answer is how to resize the partition live, the first about resizing the fs. If you have vital data, backup first!