0

I would like to prepare a new 32GB Micro SD card with an fresh image of Raspbian Lite or any other Linux system. As in the official documentation, I try using etcher or Win32Diskimager.

However, both tools always reserve all space available on the SD card, not allowing a user to select a partition size.

How can I do a fresh installation under Windows only using a small part of the SD card, say 8GB for example, so that any clone or backup of this image later is not too big in size? In addition, not all 32GB SD cards have exactly the same size (they vary by some Kilobytes depending on the producer), so an image (from a backup) later may be too big to fit on another SD card.

  • 2
    You are mistaken. The image is created at the same size as the image. Raspbian expands it on initial boot. – Milliways Oct 16 '18 at 21:25
  • 1
    remove init=/usr/lib/raspi-config/init_resize.sh from cmdline.txt in the boot partition before putting the SD card into the pi the first time. You will need to expand the filesystem a bit manually though to have a system that is at all usable – Jaromanda X Oct 16 '18 at 23:44
  • Thanks, I triet removing the init_resize.sh which worked. However, I then tried to use gparted from an Ubuntu Live CD to expand the filesystem (only enhanced without moving the start sector) from 1.8GB to 15GB, after that, my system was not bootable in the Raspi anymore, even though all files on the filesystem were accessible in Ubuntu. Is it possible to alter init_resize.sh to expand to a specified size instead of using the whole SD card? – Erik Oct 18 '18 at 4:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.