Browse Source

update

master
crims0n 5 years ago
parent
commit
dad2f6d21b
  1. 1
      .build_dir
  2. 2
      autoinstall
  3. 4
      linux-live/buildconfig
  4. 164
      linux-live/minioslib
  5. 10
      linux-live/pkglists/ubuntu-gui.list
  6. 20
      linux-live/pkglists/ubuntu-other.list
  7. 5
      linux-live/pkglists/ubuntu-ubiquity.list

1
.build_dir

@ -0,0 +1 @@
/build/focal

2
autoinstall

@ -41,8 +41,6 @@ create_completion
create_backup create_backup
echo $LIVE_TYPE
# check number of args # check number of args
if [[ $# == 0 || $# > 3 ]]; then help; fi if [[ $# == 0 || $# > 3 ]]; then help; fi

4
linux-live/buildconfig

@ -21,8 +21,8 @@ DEV_SYSTEM="0"
# если ="1", создаёт резервную копию в родительской папке # если ="1", создаёт резервную копию в родительской папке
CREATE_BACKUP="0" CREATE_BACKUP="0"
DEBIAN_FRONTEND_TYPE="noninteractive" #DEBIAN_FRONTEND_TYPE="noninteractive"
#DEBIAN_FRONTEND_TYPE="ncurses" DEBIAN_FRONTEND_TYPE="dialog"
APT_CMD="apt-get" APT_CMD="apt-get"

164
linux-live/minioslib

@ -664,21 +664,58 @@ EOF'
touch $PARENT_DIR/image/ubuntu touch $PARENT_DIR/image/ubuntu
cat <<EOF >$PARENT_DIR/image/isolinux/grub.cfg cat <<EOF >$PARENT_DIR/image/isolinux/grub.cfg
search --set=root --file /ubuntu search --set=root --file /ubuntu
insmod all_video insmod all_video
set default="0" set default="0"
set timeout=30 set timeout=10
menuentry "Try $SYSTEMNAME without installing" {
linux /casper/vmlinuz boot=casper nopersistent toram quiet splash --- menuentry "Try MiniOS without installing (persistent live)" {
linux /casper/vmlinuz boot=casper quiet splash persistent ---
initrd /casper/initrd
}
menuentry "Try MiniOS without installing (live)" {
linux /casper/vmlinuz boot=casper quiet splash ---
initrd /casper/initrd
}
menuentry "Try MiniOS without installing (persistent live to ram)" {
linux /casper/vmlinuz boot=casper toram quiet splash persistent ---
initrd /casper/initrd
}
menuentry "Try MiniOS without installing (live to ram)" {
linux /casper/vmlinuz boot=casper toram quiet splash ---
initrd /casper/initrd initrd /casper/initrd
} }
menuentry "Install $SYSTEMNAME" {
menuentry "Install MiniOS" {
linux /casper/vmlinuz boot=casper only-ubiquity quiet splash --- linux /casper/vmlinuz boot=casper only-ubiquity quiet splash ---
initrd /casper/initrd initrd /casper/initrd
} }
menuentry "Install MiniOS (from ram)" {
linux /casper/vmlinuz boot=casper only-ubiquity toram quiet splash ---
initrd /casper/initrd
}
menuentry "Check disc for defects" { menuentry "Check disc for defects" {
linux /casper/vmlinuz boot=casper integrity-check quiet splash --- linux /casper/vmlinuz boot=casper integrity-check quiet splash ---
initrd /casper/initrd initrd /casper/initrd
} }
menuentry "Test memory Memtest86+ (BIOS)" {
linux16 /install/memtest86+
}
menuentry "Test memory Memtest86 (UEFI, long load time)" {
insmod part_gpt
insmod search_fs_uuid
insmod chain
loopback loop /install/memtest86
chainloader (loop,gpt1)/efi/boot/BOOTX64.efi
}
EOF EOF
# generate manifest # generate manifest
sudo chroot $BUILD_DIR dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee $PARENT_DIR/image/casper/filesystem.manifest sudo chroot $BUILD_DIR dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee $PARENT_DIR/image/casper/filesystem.manifest
@ -926,6 +963,7 @@ EOF
function prereq_pkg_list() { function prereq_pkg_list() {
echo -e "${YELLOW}=====> installing prerequested software for chroot system ...${ENDCOLOUR}" echo -e "${YELLOW}=====> installing prerequested software for chroot system ...${ENDCOLOUR}"
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then
if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then
$APT_CMD update >>$OUTPUT 2>&1 && $APT_CMD update >>$OUTPUT 2>&1 &&
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" &&
@ -941,10 +979,28 @@ function prereq_pkg_list() {
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" &&
$APT_CMD install $APT_OPTIONS sudo libterm-readline-gnu-perl systemd-sysv >>$OUTPUT 2>&1 $APT_CMD install $APT_OPTIONS sudo libterm-readline-gnu-perl systemd-sysv >>$OUTPUT 2>&1
fi fi
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then
if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then
$APT_CMD update >>$OUTPUT 2>&1 &&
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" &&
$APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 &&
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" &&
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/prereq.list | tr "\n" " ")
else
# we need to install systemd first, to configure machine id
$APT_CMD update >>$OUTPUT 2>&1 &&
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" &&
$APT_CMD upgrade $APT_OPTIONS >dev/null &&
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" &&
$APT_CMD install $APT_OPTIONS sudo libterm-readline-gnu-perl systemd-sysv
fi
fi
} }
function main_pkg_list() { function main_pkg_list() {
echo -e "${YELLOW}=====> installing main packages for chroot system ...${ENDCOLOUR}" echo -e "${YELLOW}=====> installing main packages for chroot system ...${ENDCOLOUR}"
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then
if [ -f $SCRIPT_DIR/pkglists/main.list ]; then if [ -f $SCRIPT_DIR/pkglists/main.list ]; then
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \
$APT_CMD update >>$OUTPUT 2>&1 && $APT_CMD update >>$OUTPUT 2>&1 &&
@ -958,30 +1014,83 @@ function main_pkg_list() {
if [ $LIVE_TYPE = "ubuntu" ]; then if [ $LIVE_TYPE = "ubuntu" ]; then
if [ -f $SCRIPT_DIR/pkglists/ubuntu-main.list ]; then if [ -f $SCRIPT_DIR/pkglists/ubuntu-main.list ]; then
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \
$APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS \ $APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-main.list | tr "\n" " ") >>$OUTPUT 2>&1 $(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-main.list | tr "\n" " ") >>$OUTPUT 2>&1
fi fi
$APT_CMD install $APT_OPTIONS tasksel >>$OUTPUT 2>&1 if [ -f $SCRIPT_DIR/pkglists/ubuntu-gui.list ]; then
tasksel install xubuntu-core sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \
$APT_CMD autoremove $APT_OPTIONS tasksel >>$OUTPUT 2>&1 $APT_CMD install $APT_OPTIONS \
if [ -f $SCRIPT_DIR/pkglists/ubuntu-other.list ]; then $(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-gui.list | tr "\n" " ") >>$OUTPUT 2>&1
fi
if [ -f $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list ]; then
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list | tr "\n" " ") >>$OUTPUT 2>&1
fi
fi
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then
if [ -f $SCRIPT_DIR/pkglists/main.list ]; then
$APT_CMD update >>$OUTPUT 2>&1 && $APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS \ $APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-other.list | tr "\n" " ") >>$OUTPUT 2>&1 $(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/main.list | tr "\n" " ")
else
$APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS ubuntu-minimal resolvconf xz-utils linux-image-generic
fi
if [ $LIVE_TYPE = "ubuntu" ]; then
if [ -f $SCRIPT_DIR/pkglists/ubuntu-main.list ]; then
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-main.list | tr "\n" " ")
fi
if [ -f $SCRIPT_DIR/pkglists/ubuntu-gui.list ]; then
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-gui.list | tr "\n" " ")
fi
if [ -f $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list ]; then
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list | tr "\n" " ")
fi
fi fi
fi fi
} }
function other_pkg_list() { function other_pkg_list() {
echo -e "${YELLOW}=====> installing other packages for chroot system ...${ENDCOLOUR}" echo -e "${YELLOW}=====> installing other packages for chroot system ...${ENDCOLOUR}"
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then
if [ $LIVE_TYPE = "ubuntu" ]; then
#$APT_CMD install $APT_OPTIONS tasksel >>$OUTPUT 2>&1
#tasksel install xubuntu-core
#$APT_CMD autoremove $APT_OPTIONS tasksel >>$OUTPUT 2>&1
if [ -f $SCRIPT_DIR/pkglists/ubuntu-other.list ]; then
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \
$APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-other.list | tr "\n" " ") >>$OUTPUT 2>&1
fi
fi
if [ -f $SCRIPT_DIR/pkglists/other.list ]; then if [ -f $SCRIPT_DIR/pkglists/other.list ]; then
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \
$APT_CMD update >>$OUTPUT 2>&1 && $APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS \ $APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/other.list | tr "\n" " ") >>$OUTPUT 2>&1 $(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/other.list | tr "\n" " ") >>$OUTPUT 2>&1
fi fi
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then
if [ $LIVE_TYPE = "ubuntu" ]; then
#$APT_CMD install $APT_OPTIONS tasksel >>$OUTPUT 2>&1
#tasksel install xubuntu-core
#$APT_CMD autoremove $APT_OPTIONS tasksel >>$OUTPUT 2>&1
if [ -f $SCRIPT_DIR/pkglists/ubuntu-other.list ]; then
$APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-other.list | tr "\n" " ")
fi
fi
if [ -f $SCRIPT_DIR/pkglists/other.list ]; then
$APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/other.list | tr "\n" " ")
fi
fi
} }
function chroot_pkg_install() { function chroot_pkg_install() {
@ -991,6 +1100,7 @@ function chroot_pkg_install() {
other_pkg_list other_pkg_list
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then
# configure console and keyboard # configure console and keyboard
cat <<EOF >/etc/default/console-setup cat <<EOF >/etc/default/console-setup
# CONFIGURATION FILE FOR SETUPCON # CONFIGURATION FILE FOR SETUPCON
@ -1039,6 +1149,33 @@ EOF
echo "resolvconf resolvconf/linkify-resolvconf boolean true" | debconf-set-selections echo "resolvconf resolvconf/linkify-resolvconf boolean true" | debconf-set-selections
dpkg-reconfigure resolvconf >>$OUTPUT 2>&1 dpkg-reconfigure resolvconf >>$OUTPUT 2>&1
fi fi
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then
dpkg-reconfigure console-setup
# configure timezone and locale
dpkg-reconfigure tzdata
dpkg-reconfigure locales
dpkg-reconfigure localepurge
localepurge
# configure resolvconf
if grep resolvconf $SCRIPT_DIR/pkglists/main.list >>$OUTPUT 2>&1 || grep resolvconf $SCRIPT_DIR/pkglists/other.list || [ $DISTRIBUTION != "xenial" ] >>$OUTPUT 2>&1; then
dpkg-reconfigure resolvconf
fi
# network manager
cat <<EOF >/etc/NetworkManager/NetworkManager.conf
[main]
rc-manager=resolvconf
plugins=ifupdown,keyfile
dns=dnsmasq
[ifupdown]
managed=false
EOF
dpkg-reconfigure network-manager
fi
# remove unused # remove unused
$APT_CMD autoremove $APT_OPTIONS >>$OUTPUT 2>&1 $APT_CMD autoremove $APT_OPTIONS >>$OUTPUT 2>&1
@ -1097,14 +1234,15 @@ EOF
(cd /linux-live/rootcopy-ubuntu && cp --parents -afr * /) (cd /linux-live/rootcopy-ubuntu && cp --parents -afr * /)
#rm /etc/alternatives/default.plymouth #rm /etc/alternatives/default.plymouth
#rm /etc/alternatives/text.plymouth #rm /etc/alternatives/text.plymouth
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/minios-logo/minios-logo.plymouth 100 update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/minios-logo/minios-logo.plymouth 200
update-alternatives --config default.plymouth --skip-auto
#ln -s /usr/share/plymouth/themes/minios-logo/minios-logo.plymouth /etc/alternatives/default.plymouth #ln -s /usr/share/plymouth/themes/minios-logo/minios-logo.plymouth /etc/alternatives/default.plymouth
#ln -s /usr/share/plymouth/themes/minios-logo/minios-text.plymouth /etc/alternatives/text.plymouth #ln -s /usr/share/plymouth/themes/minios-logo/minios-text.plymouth /etc/alternatives/text.plymouth
update-initramfs -u update-initramfs -u
rm /usr/share/xfce4/backdrops/xubuntu-wallpaper.png rm /usr/share/xfce4/backdrops/xubuntu-wallpaper.png
ln -s /usr/share/backgrounds/MiniOS.png /usr/share/xfce4/backdrops/xubuntu-wallpaper.png ln -s /usr/share/backgrounds/MiniOS.png /usr/share/xfce4/backdrops/xubuntu-wallpaper.png
echo "Set up user 'ubuntu'" >>$OUTPUT 2>&1 : 'echo "Set up user 'ubuntu'" >>$OUTPUT 2>&1
adduser --gecos '' ubuntu --disabled-password >>$OUTPUT 2>&1 adduser --gecos '' ubuntu --disabled-password >>$OUTPUT 2>&1
echo "Set up password for user 'ubuntu'" >>$OUTPUT 2>&1 echo "Set up password for user 'ubuntu'" >>$OUTPUT 2>&1
echo ubuntu:ubuntu | chpasswd >>$OUTPUT 2>&1 echo ubuntu:ubuntu | chpasswd >>$OUTPUT 2>&1
@ -1113,7 +1251,7 @@ EOF
addgroup ubuntu lpadmin >>$OUTPUT 2>&1 addgroup ubuntu lpadmin >>$OUTPUT 2>&1
addgroup ubuntu plugdev >>$OUTPUT 2>&1 addgroup ubuntu plugdev >>$OUTPUT 2>&1
addgroup ubuntu dip >>$OUTPUT 2>&1 addgroup ubuntu dip >>$OUTPUT 2>&1
#addgroup ubuntu samba >>$OUTPUT 2>&1 #addgroup ubuntu samba >>$OUTPUT 2>&1'
#sed -i "s,managed=false,managed=true,g" /etc/NetworkManager/NetworkManager.conf #sed -i "s,managed=false,managed=true,g" /etc/NetworkManager/NetworkManager.conf

10
linux-live/pkglists/ubuntu-gui.list

@ -0,0 +1,10 @@
xubuntu-core
mousepad
blueman
ristretto
onboard
gigolo
gparted
xfce4-taskmanager
xfce4-xkb-plugin
language-pack-gnome-ru

20
linux-live/pkglists/ubuntu-other.list

@ -1,22 +1,2 @@
#xubuntu-core
#lightdm
language-pack-gnome-ru
language-pack-gnome-en
ubiquity
ubiquity-casper
ubiquity-frontend-gtk
ubiquity-slideshow-xubuntu
ubiquity-ubuntu-artwork
#plymouth-theme-ubuntu-logo
#ubuntu-gnome-desktop
#ubuntu-gnome-wallpapers
mousepad
blueman
ristretto
onboard
gigolo
gparted
xfce4-taskmanager
xfce4-xkb-plugin
open-vm-tools-desktop open-vm-tools-desktop
samba-common samba-common

5
linux-live/pkglists/ubuntu-ubiquity.list

@ -0,0 +1,5 @@
ubiquity
ubiquity-casper
ubiquity-frontend-gtk
ubiquity-slideshow-xubuntu
ubiquity-ubuntu-artwork
Loading…
Cancel
Save