updates: add main steps
This commit is contained in:
parent
5ff5417993
commit
3f5aa6064b
28
chroot-commands.sh
Normal file
28
chroot-commands.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
||||||
|
hwclock --systohc
|
||||||
|
|
||||||
|
apt-get install -y locales
|
||||||
|
cat "en_US.UTF-8 UTF-8" >/etc/locale.gen
|
||||||
|
locale-gen
|
||||||
|
cat "LANG=en_US.UTF-8" >/etc/locale.conf
|
||||||
|
|
||||||
|
apt-get install -y network-manager
|
||||||
|
systemctl enable NetworkManager
|
||||||
|
|
||||||
|
apt-get install -y vim openssh-server
|
||||||
|
systemctl enable sshd
|
||||||
|
|
||||||
|
apt-get install -y sudo
|
||||||
|
echo "change passwd for root:"
|
||||||
|
passwd
|
||||||
|
echo "add user: wyj"
|
||||||
|
useradd -m wyj
|
||||||
|
echo "change passwd for wyj:"
|
||||||
|
passwd wyj
|
||||||
|
usermod -aG sudo wyj
|
||||||
|
|
||||||
|
apt-get install -y intel-microcode btrfs-progs
|
||||||
|
apt-get install -y firmware-linux linux-image-amd64 systemd-boot
|
||||||
|
bootctl install
|
||||||
|
|
||||||
|
exit
|
24
install.sh
24
install.sh
@ -0,0 +1,24 @@
|
|||||||
|
#! /bin/env bash
|
||||||
|
|
||||||
|
# assume that /mnt and /mnt/boot is mounted
|
||||||
|
|
||||||
|
TARGET=/mnt
|
||||||
|
|
||||||
|
debootstrap stable $TARGET http://deb.debian.org/debian/
|
||||||
|
|
||||||
|
genfstab -U $TARGET >>/mnt/etc/fstab
|
||||||
|
|
||||||
|
mount -t proc /proc $TARGET/proc
|
||||||
|
mount -t sysfs /sys $TARGET/sys
|
||||||
|
mount --bind /dev $TARGET/dev
|
||||||
|
mount -t devpts /dev/pts $TARGET/dev/pts
|
||||||
|
mount --bind /sys/firmware/efi/efivars $TARGET/sys/firmware/efi/efivars
|
||||||
|
|
||||||
|
echo "deb http://deb.debian.org/debian stable main non-free-firmware" >$TARGET/etc/apt/sources.list
|
||||||
|
echo "export PATH=$PATH:/sbin/" >>$TARGET/root/.bashrc
|
||||||
|
|
||||||
|
cp ./chroot-commands.sh $TARGET/root/
|
||||||
|
chmod +x $TARGET/root/chroot-commands.sh
|
||||||
|
chroot $TARGET /root/chroot-commands.sh
|
||||||
|
|
||||||
|
echo "Done! Should be good to reboot now and run post-install scripts."
|
Loading…
Reference in New Issue
Block a user