Skip to content
This repository has been archived by the owner on May 24, 2020. It is now read-only.

Fix up the createimg script to work on Ubuntu 14.04. #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions createimg
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ fi

# Mount boot partition, format it and copy files
lodev=$(losetup_partition $outfile 1)
partprobe $lodev
partprobe $lodev || true
echo "Formatting boot partition on $lodev..."
mkfs.vfat -F 32 $lodev
boot_uuid=`blkid $lodev | sed -n 's/.*UUID=\"\([^\"]*\)\".*/\1/p'`
losetup_delete_retry $lodev

# Mount rootfs partition, format it and copy files
lodev=$(losetup_partition $outfile 2)
partprobe $lodev
partprobe $lodev || true
echo "Formatting root partition on $lodev..."
mkfs.ext4 -b 4096 -E stride=16384,stripe-width=16384 -m 1 -L root $lodev
#tune2fs -i 0 -c 0 $lodev
Expand All @@ -150,7 +150,7 @@ sleep 2

# Mount the boot partition again and copy boot.ini
lodev=$(losetup_partition $outfile 1)
partprobe $lodev
partprobe $lodev || true
echo "Mounting boot partition on $lodev..."
mount -t vfat $lodev mnt/
if [ "$root_dev" != "" ]; then
Expand All @@ -159,8 +159,8 @@ if [ "$root_dev" != "" ]; then
else
sed -e "s/\${BOOT_UUID}/$boot_uuid/" -e "s/\${ROOT_DEV}/UUID=$root_uuid/" boot.ini.template > mnt/boot.ini
fi
cp -rp $boot_dir/* mnt/
cp -p $ramfs_file mnt/
cp -r $boot_dir/* mnt/
cp $ramfs_file mnt/
if [ -x "./createimg-bootfs-post" ] ; then
./createimg-bootfs-post mnt/
fi
Expand Down