Category: Uncategorized

  • Migrating SVN repository to Git preserving history

    After spending number of hours trying to move a simple single branch SVN repository to Git that can be accessed over https, here are the steps taken. Assume my_svn_repository is defined by url https://127.0.0.1/svn/my_svn_repository. First, a list of all svn committers is needed. Save the list in a file ./authors.txt user1 = user1 <user1@someserver.com> user2 […]

  • Latex capacity exceeded

    This latex code triggered Tex capacity exceed error: \documentclass[10pt]{article} \usepackage{pgfplots} \pgfplotsset{my style/.append style={axis x line=middle, axis y line=middle, xlabel={$x$}, ylabel={$y$}, axis equal }} \begin{document} \begin{tikzpicture} \begin{axis}[my style, xtick={-3,-2,…,3}, ytick={-3,-2,…,3}, xmin=-3, xmax=3, ymin=-3, ymax=3] \end{axis} \end{tikzpicture} \end{document} Fix was to edit config file nano -w /usr/share/texmf-dist/web2c/texmf.cnf and edit main_memory and pool_size parameters fmtutil-sys –all

  • Btrfs raid6

    See archlinux for more… Create btrfs filesystem using raid6 for data and and raid 10 for metadata mkfs.btrfs -d raid6 -m raid10 -L alexandria_btrfs /dev/vd[bcdefghijk] Mount newly created partition with mount /dev/sdb /mnt/md0 Check file system usage with: btrfs filesystem df /mnt/md0 Removing devices Remove a drive from the file system. This should rebalance the […]

  • Btrfs with encription

    Make sure btrfs support is installed in your kernel File systems —> Btrfs filesystem Install needed packages emerge -av sys-fs/btrfs-progs sys-fs/cryptsetup Make sure the following flags are enabled for sys-fs/cryptsetupgcrypt: nls python udev pwquality. dev-libs/libpwquality is used for password quality checking. Prepare disk: parted -a optimal /dev/sdX (parted) help (parted) print (parted) mklabel gpt (parted) […]

  • Ext4 HD recovery

    To check superblock fsck.ext4 -v /dev/sdX1 If there is superblock corruption, the above command will output something like this: The superblock could not be read or does not describe a correct ext4 filesystem. If the device is valid and it really contains an ext4 filesystem (and not swap or ufs or something else), then the […]

  • exFat on linux

    make sure exfat fuse and utils are installed on the system emerge -av sys-fs/exfat-utils sys-fs/fuse-exfat sys-fs/dosfstools exFAT seems not handle well the switches -pgo that relate to permissions. When using standard switches -avgh, it will trigger errors rsync: mkstemp “/run/media/3461-3338/ki.txt.ws6eA5” failed: Function not implemented (38) Instead when coping use the following flags rsync -rltDv [SRC] […]

  • Dynamic DNS

    There are few free dynamic DNS options such as dnsdynamic.org freedns.afraid.org ydns.eu dtdns.com duckdns.org noip.com Install ddclient. emerge -av net-dns/ddclient Let’s focus on freedns.afraid.org. Open an account and pick a domain name. Prepare config file nano -w /etc/ddclient/ddclient.conf Enter information on the subdomain name you just created. daemon=3600 syslog=yes protocol=freedns use=if, if=eth0 ssl=yes use=web, web=myip.dnsomatic.com […]

  • smartmon configuration

    emerge -av sys-apps/smartmontools add to init rc-update add smartd default nano -w /etc/smartd.conf # DEVICESCAN For all disks with SMART capabilities. # # -o off Turn off automatic running of offline tests. An offline test # is a test which may degrade performance. # # -n standby Do not spin up the disk for the […]

  • Rescue gentoo with software raid-1

    Chroot to Gentoo env livecd ~ # modprobe raid1 livecd ~ # mdadm –detail –scan ARRAY /dev/md/3_0 metadata=0.90 UUID=5af462ee:8e535294:cb201669:f728008a ARRAY /dev/md/2_0 metadata=0.90 UUID=09338879:65611484:cb201669:f728008a ARRAY /dev/md/1_0 metadata=0.90 UUID=2fc18a05:fd33a57f:cb201669:f728008a livecd ~ # mdadm –detail –scan > /etc/mdadm.conf livecd ~ # ls /dev/md md/ md125 md126 md127 mdev.seq livecd ~ # ls /dev/md md/ md125 md126 md127 mdev.seq […]

  • Gentoo install min on USB stick

    Download minimal CD ISO from gentoo.org dmesg | tail parted /dev/sdX dd if=gentoo_image.img of=/dev/sdX bs=4M Longer method Taken from gentoo-en.vfose.ru Install syslinux emerge syslinux Find the USB drive fdisk -l Clear disk partition table and boot sector dd if=/dev/zero of=/dev/sdf count=1024 Create a partition table with 512-byte sectors and a primary partition of type 83 […]