modprobe brd rd_nr=1 rd_size=1048576 max_part=0
Monthly Archives: October 2018
kvm add usb
lsusb
usb.xml
virsh attach-device vn-centos /saved/path/to/usb.xml
virtio-win.iso
wget https://fedorapeople.org/groups/virt/virtio-win/virtio-win.repo \
-O /etc/yum.repos.d/virtio-win.repo
dnf install virtio-win
centos -bash: killall: command not found
yum install psmisc
nmap scan subnet free ip
sudo nmap -v -sn -n 192.168.100.0/24 -oG - | awk '/Status: Down/{print $2}'
ubuntu live usb hangs
sudo nano /etc/sysctl.conf
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10
ssh default user
vim ~/.ssh/config
Host *
User root
bash history size unlimited
vim /root/.bashrc
export HISTFILESIZE=
export HISTSIZE=
bash history add timestamp
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
source ~/.bashrc
pvs unknown lvm2
If error like this: WARNING: Device for xxx not found or rejected by a filter.
vgreduce –removemissing –verbose VG
linux mount two directories same partiton
mount –bind /some/ssd/running/part /var/lib/mysql
convert xfs to ext4 boot
Centos 7 auto partition creates xfs, but better use ext4 on server side
fstransform /dev/sda1 ext4
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg
#/dev/sda1 boot partition
kvm install windows 10
Download there:
https://the-eye.eu/public/MSDN/Windows%2010/
sudo virt-install --name=windows10 --ram=2192 --cpu=host --vcpus=2 --os-type=windows --os-variant=win8.1 --disk /dev/mapper/vg-win,bus=virtio --disk /tmp/en_windows_10_enterprise_x64_dvd_6851151.iso,device=cdrom,bus=ide --disk /usr/share/virtio-win/virtio-win.iso,device=cdrom,bus=ide --network bridge=virbr0 --graphics vnc,listen=0.0.0.0
fedora increase tmp size
mount -o remount,size=4G,noatime /tmp
print all after regex match
mysql -s -e 'show databases' | sed '1,/all_databases_after_some_one/d'