Debian

Work

kernel parameter:

net.ifnames=0 biosdevname=0

# The primary network interface
#auto eth0
#allow-hotplug eth0

auto br0
iface br0 inet static
 address 192.168.180.253
 netmask 255.255.255.0
 network 192.168.180.0
 broadcast 192.168.180.255
 gateway 192.168.180.2
 bridge_ports eth0
 bridge_stp off
 bridge_fd 0
 bridge_maxwait 0
 dns-nameservers 8.8.8.8 4.4.2.2
 

How To Install Podman on Debian 11/10/9

Podman remote-client tutorial

How to Install and Configure KVM on Debian 11 Bullseye Linux

https://github.com/jeffreywildman/homebrew-virt-manager

https://www.arthurkoziel.com/running-virt-manager-and-libvirt-on-macos/

Podman

My registry docker

Other

Find out what package file

Type the following command to find out what package provides /usr/bin/passwd file: dpkg -S /usr/bin/passwd Type the following command to find out what package provides /usr/bin/passwd file: dpkg -S /usr/bin/passwd Use apt-file package searching utility: apt-file search vim https://www.cyberciti.biz/faq/equivalent-of-rpm-qf-command/

dfasf

How to Install and Configure VNC on Debian 10/11

Suspend

View Version

view version cat /etc/issue lsb_release -a cat /etc/os-release hostnamectl cat /etc/debian_version

root@ip-10-121-1-137:~# cat /etc/network/interfaces.d/ens192

generated by FAI

auto ens192 iface ens192 inet static address 10.121.1.26 netmask 255.255.255.0 gateway 10.121.1.1

root@ip-10-121-1-137:~#

root@ip-10-121-1-137:~# cat /etc/resolv.conf domain lab.incoma search lab.incoma nameserver 10.121.1.1

install open-vm-tools open-vm-tools-desktop


sudo systemctl set-default multi-user.target sudo systemctl set-default graphical.target

apt-get update && apt-get upgrade apt-get install build-essential

ip link add link eth0 name eth0.863 type vlan id 863

/etc/network/interfaces iface eth0 inet static address 192.168.180.80 netmask 255.255.255.0 gateway 192.168.180.4 up route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1 down route del -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1 или post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.38.65


cd /etc/systemd/network [Match] Name=INTERFACE-NAME

[Network] Address=10.1.10.9/24 Gateway=10.1.10.1

DNS=10.1.10.1

cat << END>/etc/network/interfaces auto lo eth0 br0 iface lo inet loopback

iface eth0 inet static address 192.168.180.80 netmask 255.255.255.0 gateway 192.168.180.4 iface eth1 inet manual iface eth2 inet manual

iface br0 inet static bridge_ports eth1 eth2 address 192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0 gateway 192.168.1.1

up route add -net 192.168.184.0 netmask 255.255.255.0 gw 192.168.180.2 END

apt-file search filename

dpkg -S /usr/bin/ls

==================================== создание iso образов =============================== ======================================= создание iso образа ======================================= /bin/cp -pRf /storage/temp/ISO/ /storage/temp/RWISO/

cd /mnt/ tar -cvf - linux | (cd /var/tmp/ && tar -xf - )

---------- new with stretch -----------------------------------

apt-get install xorriso live-build extlinux syslinux squashfs-tools

sudo debootstrap --arch=i386 --variant=minbase stretch chroot

sudo chroot chroot echo "debian-live" > /etc/hostname apt-get install --no-install-recommends mc nano apt-get install --no-install-recommends linux-image-686 live-boot systemd-sysv apt-get install mc apt-get install debconf locales dpkg-reconfigure locales passwd exit

mkdir -p binary/{live,isolinux}

cp chroot/boot/vmlinuz-* binary/live/vmlinuz cp chroot/boot/initrd.img-* binary/live/initrd

cp /usr/lib/syslinux/modules/bios/menu.c32 binary/isolinux/ cp /usr/lib/syslinux/modules/bios/libutil.c32 binary/isolinux/ cp /usr/lib/syslinux/modules/bios/libcom32.c32 binary/isolinux/ cp /usr/lib/syslinux/modules/bios/ldlinux.c32 binary/isolinux/ cp /usr/lib/ISOLINUX/isolinux.bin binary/isolinux/

cat << EOF > binary/isolinux/isolinux.cfg ui menu.c32 prompt 0 menu title Upgrade S-Terra to version 4.2 timeout 5

label Upgrade_S_Terra menu label ^Upgrade S-Terra to version 4.2 menu default linux /live/vmlinuz append initrd=/live/initrd boot=live persistence console=ttyS0 console=tty0 endtext EOF

sudo mksquashfs chroot binary/live/filesystem.squashfs -e boot rm binary/live/filesystem.squashfs sudo mksquashfs chroot binary/live/filesystem.squashfs -e boot xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 -A "Debian Live" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o remaster.iso binary

scp ./remaster.iso [email protected]:~/ftp/

======================================= создание iso образа debian ======================================= https://habr.com/post/242219/

apt-get install xorriso live-build extlinux syslinux squashfs-tools

mkdir ~/livework && cd ~/livework sudo debootstrap --arch=i386 wheezy chroot sudo debootstrap --arch=i386 jessie chroot

cd ~/livework sudo chroot chroot mount none -t proc /proc mount none -t sysfs /sys mount none -t devpts /dev/pts export HOME=/root export LC_ALL=C apt-get install dialog dbus dbus-uuidgen > /var/lib/dbus/machine-id apt-get install linux-image-686 live-boot

можно добавить еще пакеты

apt-get install dump bzip2 mc icewm passwd apt-get clean rm /var/lib/dbus/machine-id && rm -rf /tmp/* umount /proc /sys /dev/pts exit

mkdir -p binary/live && mkdir -p binary/isolinux cp chroot/boot/vmlinuz-* binary/live/vmlinuz cp chroot/boot/initrd.img-* binary/live/initrd mksquashfs chroot binary/live/filesystem.squashfs -e boot

cp /usr/lib/syslinux/modules/bios/menu.c32 binary/isolinux/ cp /usr/lib/syslinux/modules/bios/libutil.c32 binary/isolinux/ cp /usr/lib/syslinux/modules/bios/libcom32.c32 binary/isolinux/

cat << EOF > binary/isolinux/isolinux.cfg ui menu.c32 prompt 0 menu title Upgrade S-Terra to version 4.2 timeout 5

label Upgrade_S_Terra menu label ^Upgrade S-Terra to version 4.2 menu default linux /live/vmlinuz append initrd=/live/initrd boot=live persistence console=ttyS0 console=tty0 endtext EOF

rm binary/live/filesystem.squashfs sudo mksquashfs chroot binary/live/filesystem.squashfs -e boot xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 -A "Debian Live" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o remaster.iso binary

scp ./remaster.iso [email protected]:~/ftp/

------------------------------debian with grub boot---------------------------------------- https://willhaley.com/blog/custom-debian-live-environment/

sudo debootstrap --arch=i386 --variant=minbase stretch chroot

mkdir -p binary/{scratch,image/live}

sudo chroot chroot echo "debian-live" > /etc/hostname apt-get install --no-install-recommends mc nano apt-get install --no-install-recommends linux-image-686 live-boot systemd-sysv

cp chroot/boot/vmlinuz-* binary/image/vmlinuz cp chroot/boot/initrd.img-* binary/image/initrd

sudo mksquashfs chroot binary/image/live/filesystem.squashfs -e boot

cat <<'EOF' >binary/scratch/grub.cfg

search --set=root --file /DEBIAN_CUSTOM

insmod all_video

set default="0" set timeout=0

menuentry "Debian Live" { linux /vmlinuz boot=live nomodeset console=ttyS0 console=tty0 initrd /initrd } EOF

touch binary/image/DEBIAN_CUSTOM

grub-mkstandalone \ --format=i386-pc \ --output=binary/scratch/core.img \ --install-modules="linux normal iso9660 biosdisk memdisk search tar ls" \ --modules="linux normal iso9660 biosdisk search" \ --locales="" \ --fonts="en_US.UTF-8" \ "boot/grub/grub.cfg=binary/scratch/grub.cfg"

cat /usr/lib/grub/i386-pc/cdboot.img binary/scratch/core.img > binary/scratch/bios.img rm -f binary/image/live/filesystem.squashfs sudo mksquashfs chroot binary/image/live/filesystem.squashfs -e boot xorriso \ -as mkisofs \ -iso-level 3 \ -full-iso9660-filenames \ -volid "DEBIAN_CUSTOM" \ --grub2-boot-info \ --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img \ -eltorito-boot \ boot/grub/bios.img \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ --eltorito-catalog boot/grub/boot.cat \ -output "debian-custom.iso" \ -graft-points \ "binary/image" \ /boot/grub/bios.img=binary/scratch/bios.img

qemu-system-i386 -m 1024m -smp 2 -boot d -serial telnet:127.0.0.1:4444,server,nowait -cdrom debian-custom.iso

1:2345:respawn:/bin/login -f YOUR_USER_NAME tty1 /dev/tty1 2>&1

1:2345:respawn:/sbin/rungetty tty1 --autologin YOUR_USER_NAME https://blackpoolmakerspace.wordpress.com/2012/09/07/auto-login-command-line-debian/ r6:23:respawn:/sbin/rungetty -u root tty6 -- login -f USERNAME

Last updated