install scripts and debuger env.

This commit is contained in:
le 2023-03-14 20:00:17 +08:00
parent 69078a686d
commit ddfdb40cdd
6 changed files with 107 additions and 2 deletions

5
.gitignore vendored
View File

@ -6,7 +6,6 @@ SAFETY_LOCK
**/**build **/**build
**/**dist **/**dist
**/**.egg* **/**.egg*
**/**.sh
!archinstall/locales/locales_generator.sh !archinstall/locales/locales_generator.sh
**/**.egg-info/ **/**.egg-info/
**/**build/ **/**build/
@ -33,4 +32,6 @@ venv
**/cmd_history.txt **/cmd_history.txt
**/*.*~ **/*.*~
/*.sig /*.sig
*.pyc *.pyc
.lh/*
.histroy/*

4
activate_conda.sh Normal file
View File

@ -0,0 +1,4 @@
#/sbin/bin
. /root/miniconda3/etc/profile.d/conda.sh
conda activate
cd /archinstall && python archinstall

View File

@ -0,0 +1,2 @@
#/sbin/bin
scp -r ubuntu@10.10.20.149:/data/project/os-installer/archinstall /

10
debug_install_net.sh Normal file
View File

@ -0,0 +1,10 @@
#/sbin/bin
local-install nic
local-install vim.tiny
hw-detect
local-install ssh
ip link set $1 up
ip addr add $2 dev $1
ip route add default via $3 dev $1

44
manual_install_nouefi.sh Normal file
View File

@ -0,0 +1,44 @@
#/sbin/bin
local-install libpam0g bash_5 passwd_4 grub-installer arch-install grub efi di-utils-mapdevfs partman-utils
local-install dpkg mawk
local-install vim.tiny
depmod
. /root/miniconda3/etc/profile.d/conda.sh
conda activate
sh -c "xz -d -c /mnt/images/rootfs.acosail2-RC2-Base-0221-runtime.txz | tar -x -C /target/"
genfstab -pU /target/ > /target/etc/fstab
mkdir -p /target/run
mkdir -p /target/proc
mkdir -p /target/sys
mkdir -p /target/dev
mkdir -p /target/dev
mkdir -p /target/media
mount -t tmpfs none /target/run
mount -t proc proc /target/proc
mount -t sysfs sys /target/sys
mount -o bind /dev /target/dev
mount -o bind /mnt /target/media
echo "====>>>>dpkg install liba lvm2 cryptsetup..."
chroot /target bash -c "dpkg -i /media/pool/main/liba/libaio/*.deb"
chroot /target bash -c "dpkg -i /media/pool/main/l/lvm2/*.deb"
chroot /target bash -c "dpkg -i /media/pool/main/c/cryptsetup/*.deb"
mkdir -p /target/tmp
echo "====>>>>cp /mnt/pool/other/kernel /target/tmp..."
cp -ar /mnt/pool/other/kernel /target/tmp
chroot /target bash -c "dpkg -i /tmp/kernel/linux-*.deb"
chroot /target bash -c "dpkg -i /tmp/kernel/mwv207-*.deb"
chroot /target bash -c 'depmod `ls /lib/modules | tail -n 1`'
echo "====>>>>depmod kernel modules ..."
rm -fr /target/tmp/kernel
bash -c "cp -a /mnt/pool/other/grub-pc*.deb /target/tmp"
chroot /target bash -c "dpkg -i /tmp/grub-pc*.deb"
echo "====>>>>grub-install $1"
chroot /target bash -c "grub-install $1"
echo """deb http://mirrors.huaweicloud.com/debian/ bullseye main
deb-src http://mirrors.huaweicloud.com/debian/ bullseye main
""" >/target/etc/apt/sources.list
echo "====>>>>grub-mkconfig"
chroot /target bash -c "grub-mkconfig >> /boot/grub/grub.cfg"
echo "====>>>>succeed,you can reboot system!"

44
manual_install_uefi.sh Normal file
View File

@ -0,0 +1,44 @@
#/sbin/bin
local-install libpam0g bash_5 passwd_4 grub-installer arch-install grub efi di-utils-mapdevfs partman-utils
local-install dpkg mawk
depmod
. /root/miniconda3/etc/profile.d/conda.sh
conda activate
modprobe efivarfs
sh -c "xz -d -c /mnt/images/rootfs.acosail2-RC2-Base-0221-runtime.txz | tar -x -C /target/"
genfstab -pU /target/ > /target/etc/fstab
mkdir -p /target/run
mkdir -p /target/proc
mkdir -p /target/sys
mkdir -p /target/dev
mkdir -p /target/dev
mkdir -p /target/media
mount -t tmpfs none /target/run
mount -t proc proc /target/proc
mount -t sysfs sys /target/sys
mount -o bind /dev /target/dev
mount -o bind /mnt /target/media
echo "====>>>>dpkg install liba lvm2 cryptsetup..."
chroot /target bash -c "dpkg -i /media/pool/main/liba/libaio/*.deb"
chroot /target bash -c "dpkg -i /media/pool/main/l/lvm2/*.deb"
chroot /target bash -c "dpkg -i /media/pool/main/c/cryptsetup/*.deb"
mkdir -p /target/tmp
echo "====>>>>cp /mnt/pool/other/kernel /target/tmp..."
cp -ar /mnt/pool/other/kernel /target/tmp
chroot /target bash -c "dpkg -i /tmp/kernel/linux-*.deb"
chroot /target bash -c "dpkg -i /tmp/kernel/mwv207-*.deb"
chroot /target bash -c 'depmod `ls /lib/modules | tail -n 1`'
echo "====>>>>depmod kernel modules ..."
rm -fr /target/tmp/kernel
mount -t efivarfs none /target/sys/firmware/efi/efivars/
mount -t efivarfs none /sys/firmware/efi/efivars/
echo "====>>>>grub-install"
chroot /target bash -c "grub-install"
echo """deb http://mirrors.huaweicloud.com/debian/ bullseye main
deb-src http://mirrors.huaweicloud.com/debian/ bullseye main
""" >/target/etc/apt/sources.list
echo "====>>>>grub-mkconfig"
chroot /target bash -c "grub-mkconfig >> /boot/grub/grub.cfg"
echo "====>>>>succeed,you can reboot system!"