summaryrefslogtreecommitdiff
path: root/export-image/prerun.sh
AgeCommit message (Collapse)Author
2026-03-27export-image: Use 1 sector per cluser for bootfsSerge Schneider
2025-03-13Align partition start boundaries to 8MJonathan Bell
Higher-capacity cards (particularly Raspberry Pi 128GB A2) have an 8MB preferred erase size, which is a good indication of the flash block size. Other large cards may also benefit. Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2024-04-29export-image: run du with -x to avoid crossing filesystem boundariesSerge Schneider
Fixes #537
2024-03-13export-image: format boot partition with appropriate FAT sizeSerge Schneider
2024-02-23Remove QCOW2 build mechanism (#648)Mark Spatz
2024-01-04Ensure loop device partition nodes are created (#741)Vasilis Tsiligiannis
Although the loop block device is created before attaching the image to it, the devices for the partition that the image contains are still not created. This patch creates those devices as well, when they are not already available. Fixes #482 Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2023-09-25Switch to new kernel and firmware packagesSerge Schneider
2023-08-17Adds call to mknod if loop dev does not exist after call to `losetup -f` (#483)bamartin125
2023-02-14export-image: change boot partition lable to 'bootfs'Serge Schneider
Fixes #669
2022-11-11use a single partitioned loop device (#641)rfc6919
2022-06-17Adjust partition formatting and mount optionsSerge Schneider
Format the root partition with the metadata_csum option Format the boot partition with 4 sectors per cluster for a slight performance boost Remove 'flush' mount option from the boot partition
2021-02-10Add QCOW2 build mechanism (#349)Holger Pandel
2020-09-23workaround build failure on AWS M6g instances (#449)kdoren
2020-01-24Update ROOT_MARGINSerge Schneider
2019-09-25Use parted for partitioning (#285)Matthijs Kooijman
Previously, fdisk was used by sending commands into its stdin, which is not very robust (since it heavily relies on the interactive prompts offered by fdisk as well as the default values it offers, which seem prone to changing in future version). It seems likely that in the past, fdisk was easier than parted since it provides default values that make it easier to create adjacent partitions, without precalculating all positions in the script. However now that partitions are manually being aligned, all data must be calculated anyway. This commit changes the partition generation to use parted rather than fdisk. For this, it rewrites various calculations and renames variables to be easier to read as well. All values are now in number of bytes, rather than mixing bytes and sectors. This commit also makes makes sure that the boot partition and root partition are always adjacent (previously the root partition was aligned without also rounding the boot partition size, leaving some empty space in between). As a side effect of using parted, this also causes the "bootcode" part of the MBR to be filled with some default x86 bootcode. This is totally irrelevant for booting the Raspberry Pi, but it does prevent triggering a bug in parted. When using parted to change the partition table (e.g. when resizing the root partition on first boot by raspi-config's init_resize.sh), the disk identifier would be changed due to this bug, which would change the PARTUUID of all partitions. The init_resize.sh script would work around this by updating the PARTUUID in e.g. fstab, but that's fragile at best. This commit prevents the bug from triggering and keeps the disk identifier the same. See https://debbugs.gnu.org/35714 for details about this parted bug. This commit fixes #284.
2019-06-07export-image: Set /boot size to 256MBSerge Schneider
2019-03-18Switch to using parted's machine parseable output (#270)Andrew Scheller
2019-02-18Use different rsync options for boot and rootSam Tygier
When copying files to boot, options that are not supported on fat32 can cause errors. For example owner, group and xattrs.
2019-01-22IMG_SUFFIX evaluation in export image (fix #241)Błażej Sowa
2018-12-21Allow custom image filenameBłażej Sowa
2018-03-13shellcheckSerge Schneider
2018-03-01export-image: don't round up if already a multiple of 4MBSerge Schneider
Fixes #156
2018-03-01make root filesystem 4M aligned (#154)James Ruan
2017-11-24Round image size up to nearest 4M blockSerge Schneider
2017-11-07Fix typo in export-imageXECDesign
Fixes #132
2017-11-06Label root partitionXECDesign
Fixes #131
2017-08-11Disable 64bit filesystem featureSerge Schneider
2017-07-27Corrected various typos (#91)TJ Rana
* Rename License.md to LICENSE * Correct typos * Clean up code layout Organize layout with extra lines
2017-07-17Export-image: Only disable metadata_csum feature if it's possibly enabled.Russ Kubes
2017-07-03Export-image: disable metadata_csum for compatibility with older SD card copiersSerge Schneider
2017-06-21export-image: increase free space paddingSerge Schneider
2017-06-21export-image: switch from fallocate to truncateSerge Schneider
2017-06-20export-image: use apparent size when calculating disk usageSerge Schneider
2017-04-03Clean up clean upSerge Schneider
2017-03-06export-image: Format /boot as FAT32Serge Schneider
2017-01-23Added Docker support (#40)Claus F. Strasburger
* Added Docker support - replaced necessity for devicemapper (through kpartx) by using parted and losetup with offsets - added Dockerfile - added dependency for parted and grep - added hints to README.md - common: loop through unmounts, fix shellcheck warnings * stage2: use debconf instead of console-setup patch. Fixes #41
2016-10-09rsync single file system (#25)chz^3
If proc is mounted in rootfs (e.g., via chroot), rsync will try copying kcore when permitted to cross file system boundaries.
2016-05-05ReworkSerge Schneider