Tag Archives: debian

DingDing Error: missing mainframe dll [How to Solve]

Repair steps:
1. Press “windows logo key + X”, Start Windows PowerShell (administrator) Enter the command “auto repair system
2. Dism/online/cleanup image/scanhealth” to scan all system files and compare them with the official system files to scan for inconsistencies in the computer
3. The command dism/online/cleanup image/checkhealth must be used when the system file is found to be damaged after the previous command is executed
4. Dism/online/cleanup image/restorehealth this command restores those different system files into official system source files
5. Restart after completion. No matter whether the above is successful or not, type the following command: SFC/scannow

Linux boot prompt “failed to initialize Hal!” solution

My operating system is debian5. There are some directories under/etc/that are RC *. D. * stands for numbers, which are all the services loaded when the system starts. Find DBUS and Hal in them. Pay attention to the numbers in front, which represent the startup order. For example, I found k88dbus and k16hal in RC1. D directory. The problem is that the startup order of DBUS is behind Hal, So it causes this problem. Therefore, write the startup sequence of dubs between Hal serial numbers. For example, I change k88dbus to k15dbus, and use the following command:

#mv K88dbus K15dbus

Restart again and the problem is solved.

Building virtual machine environment based on kvm-qemu under ubuntu12.10 (12)

In addition to the initial mounting of the optical drive in the definition file of the virtual machine, Libvirt also has a dynamic platter mount method, which USES the Attach -device command in the virsh command. The format of this command is as follows:

dev@devhost:/opt/vm/xpvm1$sudo virsh attach-device < domain-name> filename

Where filename is a file defined in XML format (we’ll call it Disk.xml) :

< Disk type = “file” device = “cdrom” & gt; < The source file = “/ opt/vm/drivers. Iso/& gt;” < Target HDC dev = “”/& gt; < readonly/> < /disk>

The virtual machine was originally mounted ona CD-ROM called Windows_xp_professional_sp3_x89.ISO:

< domain type=’kvm’> & lt; name> XP_VM< /name> & lt; uuid> 91f15b08-e115-4016-a522-b550ff593af9< /uuid> & lt; memory> 1024000< /memory> & lt; currentMemory> 1024000< /currentMemory> & lt; vcpu> 1< /vcpu> & lt; os> & lt; Type the arch = ‘x86_64 machine =’ PC ‘& gt; hvm< /type> & lt; boot dev=’hd’/> & lt; boot dev=’cdrom’/> & lt; Bootmenu enable = ‘yes’/& gt; & lt; /os> & lt; features> & lt; acpi/> & lt; apic/> & lt; pae/> & lt; /features> & lt; cpu> & lt; The topology sockets = ‘1’ cores = ‘1’ threads = ‘1’/& gt; & lt; /cpu> & lt; = ‘localtime’ clock offset/& gt; & lt; on_poweroff> destroy< /on_poweroff> & lt; on_reboot> restart< /on_reboot> & lt; on_crash> restart< /on_crash> & lt; devices> & lt; emulator> /usr/bin/qemu-system-x86_64< /emulator> & lt; = ‘disk disk type =’ file ‘device’ & gt; & lt; Qemu driver name = ‘ ‘type =’ qcow2 ‘/ & gt; & lt; The source file = ‘/ opt/vm/xpvm1 xp_c. Img’ lock = ‘exclusive’/& gt; & lt; Target dev = ‘hda bus =’ ide ‘/ & gt; & lt; /disk> & lt; = ‘disk disk type =’ file ‘device’ & gt; & lt; Qemu driver name = ‘ ‘type =’ qcow2 ‘/ & gt; & lt; The source file = ‘/ opt/vm/xpvm1 xp_d. Img’ lock = ‘exclusive’/& gt; & lt; target dev=’hdb’ bus=’ide’/> & lt; /disk> & lt; = ‘cdrom disk type =’ file ‘device’ & gt; & lt; source file=’/opt/vm/windows_xp_professional_sp3_x86.iso’/> & lt; target dev=’hdc’/> & lt; readonly/> & lt; /disk> & lt; The channel type = ‘spicevmc & gt; & lt; Target type = ‘virtio’ name = ‘com. Redhat. Spice. 0’/& gt; & lt; Alias name = ‘virserial – channel1’/& gt; & lt; /channel> & lt; Interface type = ‘bridge’ & gt; & lt; MAC address = ’52:54:00:7 b: a8: d8’/& gt; & lt; The source bridge = ‘virbr0/& gt; & lt; = ‘vnet1’ target dev/& gt; & lt; The model type = ‘virtio/& gt; & lt; /interface> & lt; Input type = ‘tablet’ bus = ‘usb’/& gt; & lt; Graphics type=’spice’ port=’4000′ autoport=’no’ listen=’0.0.0.0′> & lt; Listen type = ‘address’ address = ‘0.0.0.0’/& gt; & lt; Agent_mouse mode = ‘off’/& gt; & lt; /graphics> & lt; Memballoon model = ‘virtio & gt; & lt; alias name=’balloon0’/> & lt; /memballoon> & lt; Sound model = ‘ac97 & gt; & lt; Address type=’ PCI ‘domain=’0x0000′ bus=’0x00′ slot=’0x04’ function=’0x0’/> & lt; /sound> & lt; video> & lt; The model type = ‘QXL vram =’ 65536 ‘heads =’ 1 ‘/ & gt; & lt; /video> & lt; /devices> & lt; qemu:commandline> & lt; Qemu: arg value = “-” CPU/& gt; & lt; Qemu: arg value = “kvm64″/& gt; & lt; /qemu:commandline> < /domain>

 
After installing the system, what you see in the virtual machine is:

 
Instead of re-closing and defining a new disc file, we can change the disc using the Virsh Attach – Device command:
 

dev@devhost:/opt/vm/xpvm1$sudo virsh attaching -device XP_VM disk.xml

 

The advantage of doing this is that in some cases we can achieve the effect of a hot plug disc without having to restart the virtual machine.
Note: It should be noted that, after testing, there must first be an initial optical device in the defined XML, otherwise the execution of another optical device will fail: internal Error No device with bus ‘ide’ and target ‘HDC’ reported error.
That is, this is actually a swap, not a dynamic mount, and the cd-ROM device itself must be defined in XML before the virtual machine can be started.
 

Solutions to problems encountered when installing isc-dhcp-server on debian9.6

To set up a DHCP server, I encountered a problem during the installation:

guoyanzhang@bogon:~$ sudo apt-get install isc-dhcp-server-ldap
Reading the package list... Finished.
Dependency tree of the package being analyzed       
Reading status information... Done.       
The following software will be installed at the same time.
  isc-dhcp-server
The following [new] packages will be installed.
  isc-dhcp-server isc-dhcp-server-ldap
0 packages upgraded, 2 new packages installed, 0 packages to uninstall, 7 packages not upgraded.
0 B/955 kB of archives to download.
Decompression consumes 2,366 kB of extra space.
Do you wish to proceed? [Y/n] y
Predefined packages ...
Unselected package isc-dhcp-server is being selected.
(Reading the database ... The system currently has 169038 files and directories installed.)
Preparing to unpack ... /isc-dhcp-server_4.3.5-3+deb9u1_amd64.deb ...
Unpacking isc-dhcp-server (4.3.5-3+deb9u1) ...
Unselected package isc-dhcp-server-ldap is being selected.
Preparing to unpack ... /isc-dhcp-server-ldap_4.3.5-3+deb9u1_amd64.deb ...
isc-dhcp-server-ldap being added causes /usr/sbin/dhcpd to move to /usr/sbin/dhcpd-noldap
Unpacking isc-dhcp-server-ldap (4.3.5-3+deb9u1) ...
Working with triggers for systemd (232-25+deb9u6) ...
Processing triggers for man-db (2.7.6.1-2) ...
isc-dhcp-server (4.3.5-3+deb9u1) is being set up ...
Generating /etc/default/isc-dhcp-server...
Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-01-09 11:52:37 CST; 12ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2169 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

1月 09 11:52:35 bogon dhcpd[2180]: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
1月 09 11:52:35 bogon dhcpd[2180]: irs_resconf_load failed: 59.
1月 09 11:52:35 bogon dhcpd[2180]: Unable to set resolver from resolv.conf; startup continuing but DDNS support may be affected
1月 09 11:52:35 bogon dhcpd[2180]: Wrote 0 leases to leases file.
1月 09 11:52:37 bogon isc-dhcp-server[2169]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
1月 09 11:52:37 bogon isc-dhcp-server[2169]:  failed!
1月 09 11:52:37 bogon systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
1月 09 11:52:37 bogon systemd[1]: Failed to start LSB: DHCP server.
1月 09 11:52:37 bogon systemd[1]: isc-dhcp-server.service: Unit entered failed state.
1月 09 11:52:37 bogon systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
isc-dhcp-server-ldap (4.3.5-3+deb9u1) is being set up ...
Processing triggers for systemd (232-25+deb9u6) ...

Key words:
irs_resconf_load failed: 59.
Unable to set resolver from resolv.conf; startup
Check out my resolv.conf and find:

guoyanzhang@bogon:/etc/network$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver fe80::1%wlp8s0
nameserver 192.168.1.1

The first nameserver looks like a nameserver and has been modified as follows:

guoyanzhang@bogon:/etc/network$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4

The reason is that this file was not configured in debian system at the beginning. This file was generated after I successfully installed it on the Internet. Now delete ISC-DHCP-Server and install it like this:

guoyanzhang@bogon:~$ sudo apt-get install isc-dhcp-server
Reading the package list... Finished.
Dependency tree of the package being analyzed       
Reading status information... Done.       
Recommended installation.
  isc-dhcp-server-ldap
The following [new] packages will be installed.
  isc-dhcp-server
0 packages upgraded, 1 new package installed, 0 packages to uninstall, 7 packages not upgraded.
An archive of 0 B/526 kB needs to be downloaded.
Unpacking consumes 1,425 kB of extra space.
Package is being preset ...
The unselected package isc-dhcp-server is being selected.
(Reading the database ... The system currently has 169038 files and directories installed.)
Preparing to unpack ... /isc-dhcp-server_4.3.5-3+deb9u1_amd64.deb ...
Unpacking isc-dhcp-server (4.3.5-3+deb9u1) ...
Working on a trigger for systemd (232-25+deb9u6) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up isc-dhcp-server (4.3.5-3+deb9u1) ...
Generating /etc/default/isc-dhcp-server ...
Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-01-09 12:45:19 CST; 5ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6137 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Jan 09 12:45:17 bogon systemd[1]: Starting LSB: DHCP server...
Jan 09 12:45:17 bogon isc-dhcp-server[6137]: Launching both IPv4 and IPv6 servers (please configure…her).
Jan 09 12:45:17 bogon dhcpd[6148]: Wrote 0 leases to leases file.
Jan 09 12:45:19 bogon isc-dhcp-server[6137]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diag…iled!
Jan 09 12:45:19 bogon isc-dhcp-server[6137]:  failed!
Jan 09 12:45:19 bogon systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
Jan 09 12:45:19 bogon systemd[1]: Failed to start LSB: DHCP server.
Jan 09 12:45:19 bogon systemd[1]: isc-dhcp-server.service: Unit entered failed state.
Jan 09 12:45:19 bogon systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
Processing triggers for systemd (232-25+deb9u6) ...

Using apt mirror to build Debian local warehouse

transfer: https://www.cnblogs.com/keithtt/p/7410874.html

apt-mirror is able to download the official image locally and keep the directory structure consistent with it, but it is not possible to modify the mirror repository. If you want to modify the mirrored warehouse, you need to use Reprepro.

1. Apt-mirror

# aptitude update
# aptitude install -y apt-mirror

# dpkg -L apt-mirror
/.
/usr
/usr/bin
/usr/bin/apt-mirror
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/apt-mirror.1.gz
/usr/share/doc
/usr/share/doc/apt-mirror
/usr/share/doc/apt-mirror/changelog.gz
/usr/share/doc/apt-mirror/changelog.Debian.gz
/usr/share/doc/apt-mirror/copyright
/etc
/etc/cron.d
/etc/cron.d/apt-mirror
/etc/apt
/etc/apt/mirror.list
/var
/var/spool
/var/spool/apt-mirror
/var/spool/apt-mirror/skel
/var/spool/apt-mirror/mirror
/var/spool/apt-mirror/var

2, modify the configuration file and add the source to download (I have added the source for debian_squeeze here)

# vim /etc/apt/mirror.list

set base_path    /docker/debian_mirror
set mirror_path  $base_path/mirror
set skel_path    $base_path/skel
set var_path     $base_path/var
set cleanscript $var_path/clean.sh
set defaultarch  <running host architecture>
set postmirror_script $var_path/postmirror.sh
set run_postmirror 0
set nthreads     40
set _tilde 0

deb-amd64 http://archive.debian.org/debian squeeze main
deb-amd64 http://archive.debian.org/debian squeeze-lts main

3. Manually run apt-mirror to download the mirror

# apt-mirror
Downloading 28 index files using 28 threads...
Begin time: Mon Aug 21 11:24:11 2017
[28]... [27]... [26]... [25]... [24]... [23]... [22]... [21]... [20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Mon Aug 21 11:24:18 2017

Processing tranlation indexes: [TT]

Downloading 32 translation files using 32 threads...
Begin time: Mon Aug 21 11:24:19 2017
[32]... [31]... [30]... [29]... [28]... [27]... [26]... [25]... [24]... [23]... [22]... [21]... [20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Mon Aug 21 11:24:20 2017

Processing indexes: [PP]

32.8 GiB will be downloaded into archive.
Downloading 25138 archive files using 40 threads...
Begin time: Mon Aug 21 11:24:23 2017
[40]... [39]... [38]... [37]... [36]... [35]... [34]... [33]... [32]... [31]... [30]... [29]... [28]... [27]... [26]... [25]... [24]... [23]... [22]... [21]... [20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Mon Aug 21 21:38:48 2017

0 bytes in 0 files and 0 directories can be freed.
Run /docker/debian_mirror/var/clean.sh for this purpose.

4. Set the timing task to synchronize the timing with the official source

# vim /etc/cron.d/apt-mirror
0 0 * * * apt-mirror > /docker/mirror.log 2>&1

5, set publishing directory soft link

# ln -sv /docker/debian_mirror/mirror/archive.debian.org /docker/mirror

6, configure nginx publish mirror directory

# cd /usr/local/nginx/conf/vhosts/
# vim debian_mirror.conf

server {
    listen 8081;
    server_name debian_mirror;

    root /docker/mirror
    location/{
        autoindex on;
    }

    access_log /usr/local/nginx/logs/debian_mirror.access.log oupeng_logs;
    error_log /usr/local/nginx/logs/debian_mirror.error.log;
}

# /usr/local/nginx/sbin/nginx -t
# /usr/local/nginx/sbin/nginx -s reload

7, find a debian6 machine to add local source test

# vim /etc/apt/sources.list
deb http://117.119.33.138:8081/debian squeeze main
deb http://117.119.33.138:8081/debian squeeze-lts main

# aptitude update
Hit http://117.119.33.138 squeeze Release.gpg
Ign http://117.119.33.138/debian/ squeeze/main Translation-en
Ign http://117.119.33.138/debian/ squeeze/main Translation-en_US
Get:1 http://117.119.33.138 squeeze-lts Release.gpg [819 B]
Ign http://117.119.33.138/debian/ squeeze-lts/main Translation-en
Ign http://117.119.33.138/debian/ squeeze-lts/main Translation-en_US
Hit http://117.119.33.138 squeeze Release
Get:2 http://117.119.33.138 squeeze-lts Release [34.3 kB]
Hit http://117.119.33.138 squeeze/main amd64 Packages
E: Release file expired, ignoring http://117.119.33.138:8081/debian/dists/squeeze-lts/Release (invalid since 524d 12h 54min 42s)

where the second source squeeze-lts will prompt expiration, add a configuration to the apt configuration file to

# vim /etc/apt/apt.conf
Acquire::Check-Valid-Until false;

# aptitude update
Get:1 http://apt.oupeng.com squeeze Release.gpg [1,655 B]
Ign http://apt.oupeng.com/debian/ squeeze/main Translation-en
Ign http://apt.oupeng.com/debian/ squeeze/main Translation-en_US
Get:2 http://apt.oupeng.com squeeze-lts Release.gpg [819 B]
Ign http://apt.oupeng.com/debian/ squeeze-lts/main Translation-en
Ign http://apt.oupeng.com/debian/ squeeze-lts/main Translation-en_US
Get:3 http://apt.oupeng.com squeeze Release [96.0 kB]
Get:4 http://apt.oupeng.com squeeze-lts Release [34.3 kB]
Get:5 http://apt.oupeng.com squeeze/main amd64 Packages [6,527 kB]
Get:6 http://apt.oupeng.com squeeze-lts/main amd64 Packages [305 kB]
Hit http://apt.puppetlabs.com squeeze Release.gpg
Ign http://apt.puppetlabs.com/ squeeze/dependencies Translation-en
Ign http://apt.puppetlabs.com/ squeeze/dependencies Translation-en_US
Ign http://apt.puppetlabs.com/ squeeze/main Translation-en
Ign http://apt.puppetlabs.com/ squeeze/main Translation-en_US
Hit http://apt.puppetlabs.com squeeze Release
Ign http://apt.puppetlabs.com squeeze/main Sources
Ign http://apt.puppetlabs.com squeeze/dependencies Sources
Ign http://apt.puppetlabs.com squeeze/main amd64 Packages
Ign http://apt.puppetlabs.com squeeze/dependencies amd64 Packages
Hit http://apt.puppetlabs.com squeeze/main Sources
Hit http://apt.puppetlabs.com squeeze/dependencies Sources
Hit http://apt.puppetlabs.com squeeze/main amd64 Packages
Hit http://apt.puppetlabs.com squeeze/dependencies amd64 Packages
Fetched 6,965 kB in 2s (3,148 kB/s)

Current status: 43 updates [+41], 27994 new [+27654].