Skip to content

Instantly share code, notes, and snippets.

@nermolov
Created December 3, 2016 23:11
Show Gist options
  • Save nermolov/dbc4e8eed7cdd1093302090d6e072829 to your computer and use it in GitHub Desktop.
Save nermolov/dbc4e8eed7cdd1093302090d6e072829 to your computer and use it in GitHub Desktop.
Samsung 303C Arch linux install scripts
#!/bin/bash
umount /dev/mmcblk1*
echo 'Please hit g then w'
fdisk /dev/mmcblk1
cgpt create /dev/mmcblk1
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l Kernel -S 1 -T 5 -P 10 /dev/mmcblk1
NUMO=`cgpt show /dev/mmcblk1 | grep 'Sec GPT table' | awk '{ print $1 }'`
cgpt add -i 2 -t data -b 40960 -s `expr $NUMO - 40960` -l Root /dev/mmcblk1
blockdev --rereadpt /dev/mmcblk1
mkfs.ext4 /dev/mmcblk1p2
mkdir root
mount /dev/mmcblk1p2 root
tar -xf ArchLinuxARM-peach-latest.tar.gz -C root
dd if=root/boot/vmlinux.kpart of=/dev/mmcblk1p1
cp setup.sh root/root/setup.sh
cp bg.jpg root/root/bg.jpg
sync
umount root
sync
rmdir root
#!/bin/bash
pacman -Syu
pacman -S xorg-server xorg-xinit i3 xterm lxappearance ttf-croscore gnu-free-fonts noto-fonts-emoji ttf-freefont ttf-droid ttf-dejavu slim connman sudo archlinux-themes-slim alsa-utils chromium firefox terminator feh
useradd -m -G wheel -s /bin/bash nermolov
passwd nermolov
echo '%wheel ALL=(ALL) ALL' >> /etc/sudoers
echo 'exec i3' >> /home/nermolov/.xinitrc
systemctl enable slim
systemctl enable connman
mv bg.jpg /home/nermolov/bg.jpg
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment