I’m setting up a new system, and I always create a new key when I bulid a new desktop… Having not done it in a few years, I wanted to see what the recomended ssh key looks like these days.
Posts for: #Linux
new git learnings
watching the founder of github talk about git.
https://www.youtube.com/watch?v=aolI_Rz0ZqY
here is what I learned:
new vim config
I started from scratch and built up a new Neovim config.
Based on this video series:
- video by
typecraft
(thank you)
Pushed to github here: https://github.com/bartman/nvim-config
improving find -exec efficiency
So today I learned about find -exec ... +
automount mmcblk devices
I put my camera SD/HC card into my laptop (running Debian/testing) and it
didn’t mount. Usually I would just run the mount
command to get it going:
dmesg | tail
mount /dev/mmcblk0p1 /mnt
That unfortunately has some annoyances and I decided to solve this finally.
how to manually create a 6in4 tunnel
I’m doing some IPv6 codig for a client and needed to setup a bunch of 6in4 tunnels.
Thre are many ways to do this through distribution init scripts (Debian, Fedora), but I wanted something less permanent and more dynamic for testing.
The procedure can be summarized in these steps:
-
create a tunnel
mytun
between local1.1.1.1
and remote2.2.2.2
ip tunnel add mytun mode sit local 1.1.1.1 \ remote 2.2.2.2 ttl 64 dev eth0
-
give the local end an address
ip addr add dev mytun f8c0::1.1.1.1/64
-
bring up the tunnel
ip link set dev mytun up
growing a live LVM volume
I have an LVM volume, with xfs on it, that is almost full:
$ df /scratch -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg-scratch 180G 175G 5.4G 98% /scratch
$ sudo lvdisplay /dev/mapper/vg-scratch
...
LV Size 180.00 GB
...
But I have some more space in the physical volume. Let’s grow the logical volume.
console=ttyS0 with grub2
Just a quick note so I don’t forget now to enable console logging on systems running grub2
(like Ubuntu 10.04, Lucid).
- edit
/etc/default/grub
- set
GRUB_CMDLINE_LINUX
to"console=ttyS0,115200n8 console=tty0"
- set
- run
update-grub
- reboot
( more info can be found here )
How many times is my function used within an executable?
I am working on a large kernel module which had just come out of a large (and fruitful) internal API refactoring exercise. I now want to go through and cull the unused functions.
It turns out, all that is needed is the readelf
utility (part of binutils
package).
vmlinux on Ubuntu
If you’re trying to do post-mortem analysis on a crashed river, or trying to find kernel-level
bottlenecks with oprofile, you need the decompressed kernel w/ debug symbols. This comes in a
form of a vmlinux
file. Some distributions ship debuginfo packages, namely RHEL. On Ubuntu
this seems lacking.