Lines Matching +full:apt +full:- +full:get
3 set -e
7 echo -e "Creates a Ubuntu root file system image.\n"
8 echo -e " --help\t\t\tDisplay this information."
9 echo -e " --arch {armhf|arm64}\t\tSelects architecture of rootfs image."
10 echo -e " --distro {bionic|focal}\tSelects Ubuntu distribution of rootfs image."
11 echo -e " --size n{K|M|G}\t\tSets size of rootfs image to n Kilo, Mega or Giga bytes."
21 echo -e "\nUpdating apt repositories. "
22 echo -e "\nPress 'y' to continue or any other key to exit..."
23 read -s -n 1 user_input
25 sudo apt update
32 while [[ $# -gt 0 ]]; do
34 --help) print_usage 0 ;;
35 --arch) rfs_arch=$2; shift;;
36 --distro) rfs_distro=$2; shift;;
37 --size) rfs_size=$2; shift;;
43 if [ -z "$rfs_arch" ]; then
47 if [ -z "$rfs_distro" ]; then
51 if [ -z "$rfs_size" ]; then
61 pat='^[0-9]+[K|M|G]$'
70 sudo apt-get install debootstrap qemu-user-static schroot qemu-utils
72 image_name=$rfs_distro-$rfs_arch-"rootfs"
77 qemu-img create $image_name.img $rfs_size
81 sudo mount -o loop $image_name.img $image_name.dir
83 sudo qemu-debootstrap --arch $rfs_arch $rfs_distro $image_name.dir
85 sudo chroot $image_name.dir locale-gen en_US.UTF-8
87 sudo chroot $image_name.dir sed -i \
88 's/main/main restricted multiverse universe/g' /etc/apt/sources.list
90 sudo chroot $image_name.dir sed -i '$ a\nameserver 8.8.8.8' /etc/resolv.conf
92 sudo chroot $image_name.dir apt update
93 sudo chroot $image_name.dir apt -y install ssh bash-completion
94 sudo chroot $image_name.dir adduser --gecos "" $USER