linux:scribble
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:scribble [2018/07/27 01:54] – How to change encoding of MySQL DB and tables stybla | linux:scribble [2022/07/06 17:27] (current) – setfont stybla | ||
---|---|---|---|
Line 111: | Line 111: | ||
</ | </ | ||
+ | ==== Exercises ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ===== Change keyboard layout in console ===== | ||
+ | |||
+ | '' | ||
+ | |||
+ | Don't forget about '' | ||
===== Cisco IOS notes ===== | ===== Cisco IOS notes ===== | ||
Line 152: | Line 161: | ||
< | < | ||
# gdb < | # gdb < | ||
+ | </ | ||
+ | |||
+ | ===== ffmpeg ===== | ||
+ | |||
+ | Note that these were scraped from various sites and forums and I take no credit. | ||
+ | |||
+ | ==== Fix colour profile/ | ||
+ | |||
+ | BT709(and nothing else) is supported by some TVs. Therefore one has to reencode video with BT709 colour profile. Note that this command can be used to extract(unpack) MKV(Matroska video file), although just I/O without reencoding is faster, and re-encodes audio to ACC 44.1kHz 128kbit bit rate! | ||
+ | |||
+ | < | ||
+ | ffmpeg \ | ||
+ | -i input_file.suffix \ | ||
+ | -color_primaries 1 \ | ||
+ | -color_trc 1 \ | ||
+ | -colorspace 1 \ | ||
+ | -vf scale=out_color_matrix=bt709 \ | ||
+ | -color_primaries bt709 \ | ||
+ | -color_trc bt709 \ | ||
+ | -colorspace bt709 \ | ||
+ | # RE-ENCODE AUDIO TO AAC - unnecessary, | ||
+ | -acodec aac \ | ||
+ | -strict -2 \ | ||
+ | -ab 128K \ | ||
+ | -ar 44100 \ | ||
+ | # Remove metadata - unnecessary, | ||
+ | -map_metadata -1 \ | ||
+ | output_file.suffix | ||
+ | </ | ||
+ | |||
+ | ==== Convert BT601 to BT709 ==== | ||
+ | |||
+ | Just in case ... | ||
+ | |||
+ | < | ||
+ | ffmpeg -i input.mp4 -vf " | ||
</ | </ | ||
Line 269: | Line 314: | ||
multilibs from time to time), so that might be the issue behind error above. But libvirt | multilibs from time to time), so that might be the issue behind error above. But libvirt | ||
is long gone, replaced and forgotten now. | is long gone, replaced and forgotten now. | ||
+ | |||
+ | ===== Move LVM on LUKS to new HDD ===== | ||
+ | |||
+ | Unfortunately, | ||
+ | |||
+ | > Ideally, you initialize the new LUKS partition as a LVM PV, add it to your volume group with: | ||
+ | |||
+ | < | ||
+ | |||
+ | > Then use the LVM pvmove command to migrate your data to it like so: | ||
+ | |||
+ | < | ||
+ | |||
+ | > When the data migration is done, be sure to remove the old LUKS partition from the volume group with: | ||
+ | |||
+ | < | ||
+ | |||
+ | > This can all be done with the system online, although it is marginally safer and probably significantly faster to do it from a LiveCD like SystemRescueCD. Also, if you have a new enough version of LVM, you probably want to use the --atomic option for pvmove, that will ensure that you don't end up with some LV's on the new device and some on the old device if the pvmove command fails. | ||
+ | |||
+ | I wish I've documented all the steps I took to move LUKS between HDDs since it might come handy. Also, it's not the first time I did that. Damn! | ||
===== loop-AES ===== | ===== loop-AES ===== | ||
+ | |||
+ | ==== Decrypt loopAES encrypted partition ===== | ||
+ | |||
+ | < | ||
+ | gpg --decrypt private.gpg | \ | ||
+ | cryptsetup loopaesOpen \ | ||
+ | / | ||
+ | newvolumename \ | ||
+ | --key-file=- \ | ||
+ | --key-size 128 \ | ||
+ | --hash sha256 | ||
+ | </ | ||
+ | |||
+ | Note that this isn't for ''/ | ||
==== Resize encrypted LVM backed partition ===== | ==== Resize encrypted LVM backed partition ===== |
linux/scribble.1532674483.txt.gz · Last modified: 2018/07/27 01:54 by stybla