mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
flash-image: add automatic resizing /var partition at first boot.
This commit is contained in:
@@ -111,6 +111,11 @@ ifneq "$(MACHINE_TYPE)" "arm"
|
||||
sed -i -e "s|ROOT|UUID=$$(blkid -sUUID $(IMGroot) | cut -d'"' -f2)|g" $(MNThdd)/boot/grub/grub.conf
|
||||
ln -s grub.conf $(MNThdd)/boot/grub/menu.lst
|
||||
|
||||
# Setup symlink for partresize at first boot...
|
||||
ln -sf ../init.d/partresize $(MNThdd)/etc/rc.d/rcsysinit.d/S25partresize
|
||||
# Setup symlink for fsresize at second boot...
|
||||
ln -sf ../init.d/fsresize $(MNThdd)/etc/rc.d/rcsysinit.d/S26fsresize
|
||||
|
||||
# Copy grub files manually
|
||||
cp -f $(MNThdd)/usr/share/grub/i386-pc/* $(MNThdd)/boot/grub/
|
||||
endif
|
||||
@@ -123,12 +128,18 @@ endif
|
||||
umount $(MNThdd)/var
|
||||
umount $(MNThdd)
|
||||
|
||||
# zerofree the ext3 images to get better compression
|
||||
# zerofree the ext2 images to get better compression
|
||||
ifneq "$(MACHINE_TYPE)" "arm"
|
||||
zerofree $(IMGboot)
|
||||
-fsck.ext2 -f -y $(IMGboot)
|
||||
fsck.ext2 -f -y $(IMGboot)
|
||||
endif
|
||||
zerofree $(IMGroot)
|
||||
-fsck.ext2 -f -y $(IMGroot)
|
||||
fsck.ext2 -f -y $(IMGroot)
|
||||
zerofree $(IMGvar)
|
||||
-fsck.ext2 -f -y $(IMGvar)
|
||||
fsck.ext2 -f -y $(IMGvar)
|
||||
|
||||
# Cat to an image
|
||||
cat $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) > $(IMGinst)
|
||||
@@ -175,9 +186,15 @@ endif
|
||||
# zerofree the ext3 images to get better compression
|
||||
ifneq "$(MACHINE_TYPE)" "arm"
|
||||
zerofree $(IMGboot)
|
||||
-fsck.ext2 -f -y $(IMGboot)
|
||||
fsck.ext2 -f -y $(IMGboot)
|
||||
endif
|
||||
zerofree $(IMGroot)
|
||||
-fsck.ext2 -f -y $(IMGroot)
|
||||
fsck.ext2 -f -y $(IMGroot)
|
||||
zerofree $(IMGvar)
|
||||
-fsck.ext2 -f -y $(IMGvar)
|
||||
fsck.ext2 -f -y $(IMGvar)
|
||||
|
||||
# Cat to an image
|
||||
cat $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) > $(IMGinsts)
|
||||
|
||||
Reference in New Issue
Block a user