Malin's notes

From MalinWiKi
Jump to navigation Jump to search


To change ownership of everything that's not already owned by a user

find /home/rtorrent/ ! -user rtorrent -exec chown rtorrent:rtorrent {} \; &


remove led-disco


options 8812au rtw_led_enable=0

for dev in $( lsblk | awk '/sd[a-z].*1,8T/ { print }' ); do echo =============================== $dev ============================ ; smartctl -a /dev/$dev ; done | pastebinit

mdadm --remove /dev/md0 failed # all failed devices

mdadm --remove /dev/md0 detached # failed ones that aren't in /dev anymore

ip addr add dev eth0 ; ip route add default via dev eth0

Mulig rekkefølge med forbehold om at et ikke stemmer, for å endre vg navn på vg med root-partisjon vgchange gammel-vg ny-vg vgchange -ay

endre i /etc/fstab

grub-install /dev/XxX

update-initramfs -k all -u


Crossflash Dell PERC H200 from ir to it-mode

The short answer

I slightly followed this guide:

The longer answer is. I followed the guide, this way, but did it a little different

The longer answer

Prepare a usb memory stick formatted to fat32 with two folders called P07 and P20

Step 1 download old firmware

1. Download this zip archive from dell and unzip it:

2. Extract 6GBPSAS.FW from Y2R1T_9211_FW/Firmware/6GbpsSASHBA_07.03.06.00_A10

3. Extract 2118it.bin from FY2R1T_9211_FW/Firmware/9211-8i_P7/

4. Extract sas2flash.efi from Y2R1T_9211_FW/sas2flash/p05/efi/

5. Place the three extracted files in the P07 folder

Step 2 download current firmware

1. Extract 2118it.bin from Y2R1T_9211_FW/Firmware/9211-8i/P20/

2. Download this zip

3. Extract sas2flash.efi from Installer_P20_for_UEFI/sas2flash_efi_ebc_rel/

4. Place this to extracted files in the P20 folder

Step 3 download uefi shell

1. Download an uefi shell: x86_64 UEFI SHELL I choosed version 1 as it worked for the person in the guide Direct download link

2. Extract Shell_Full.efi to the root of the memory stick. I had to rename it to Shellx64.efi to use it with my motherboard, asus P8H67_M_EVO. Check with you motherboard vendor to determine how to use efi-shell

Step 4 flashing

1. boot computer to efi shell

2. If not present with a list with devices, type

map -b

2. On my computer the memory stick is called fs0 so I typed fs0: to change prompt to the memory stick


cd P07


sas2flash -listall

will show the controller. If not, check if it is installed to a pci-e port 5.

sas2flash.efi -c 0 -list

will show controller details and take a note of the sas address number 6.

sas2flash.efi -o -e 6

will erase the old firmware and boot rom 7.

sas2flash.efi -o -f 6GBPSAS.FW

writes the dell 6gbs firmware 8.

sas2flash.efi -o -f 2118it.bin

writes the P07 firmware

9. Then I rebooted

10. boot into efi again


cd P20


sas2flash.efi -o -f 2118it.bin writes the P20 firmware


Directly copied from the source, step number changed to fit my tutorial:

1. Step 6 showed “Erasing Flash Region” and then after a while “ERROR: Erase Flash Operation Failed!”. I simply proceeded and the error did not appear to affect anything.

2. Visit source to get screenshots vit the error messages

Compile rtorrent libtorrent and xmlrpc-c



./configure --prefix=/usr --with-xmlrpc-c |tee /tmp/conf.log


  1. Merk Noe Og Trykk U For Å Få Det I Lowercase, U For Uppercase ;)
  2. stor v for visual line eller liten for visual der du må merke noe manuelt
  3. ok. jeg glemte å markere først :p
  4. oki :)
  1. iT'S cAPS lOCK DAY!
  1. trykk ~ for å endre fra stor til liten bokstav ;)


How to repair efi bootloader/grub from windows

Open powershell as admin and execute the following command

example: bcdedit.exe /set "{bootmgr}" path \EFI\{distro}\grubx64.efi

if running debian

bcdedit.exe /set "{bootmgr}" path \EFI\debian\grubx64.efi


setup new vm from a template

If you have a qcow2 vm template, clone it.:

If you clone a qcow2 in use, stop the vm first:

virsh stop {domain-vm-name}

Then clone the qcow2

virt-clone --original {Domain-Vm-Name-Here} --name {New-Domain-Vm-Name-Here} --auto-clone

Configure your VM to your likings either by virt-manager (gui) or by cli

Start the new vm and log in, either by ssh, or via virt-manager

Change hostname to match the new name of the VM

sudo -i
vi /etc/hostname

vi /etc/hosts

to match the name of the new VM

Example. change:       debian-stretch-mal.debian-stretch-mal.locale    debian-stretch-mal

to    new-name-vm

Also add a line for the ip to the server who runs the VM and for the backup server if you have one, like this

192.168.X.X hostname.domain.xx      hostname

change local ip to a free address

 vi /etc/network/interfaces

and add the new ip in on the host


Make ssh keys:


go with the defaults by hit enter, when prompted for questions

copy the the public key from


If bareos is setup on the qcow2 vm template you also need to change the following line in bareos filedaemon config to match your new vm

vi /etc/bareos/bareos-fd.conf

FileDaemon {
Name = new-name-vm.domain.xx-fd 

  • sources

add bareos client

If you already have a bareos backup server

on the new vm or computer you want to backup to bareos

Install bareos-filedaemon on the client if it's not already installed

 apt install bareos-filedaemon
systemctl enable bareos-filedaemon.service

Then log into the bareos server and run bconsole

configure add client name=new-name-vm address=192.168.X.X password=SOME_PASSWORD

Then the config is saved to


Copy it to the client in:


  • sources