Record new posts
parent
e2a0c11383
commit
38e50bddc2
@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: "Setting up GRUB/GPT/LVM"
|
||||||
|
date: 2016-01-19 17:09:09 +0100
|
||||||
|
comments: true
|
||||||
|
categories:
|
||||||
|
---
|
||||||
|
|
||||||
|
Notes on setting up a machine to use GPT partitioning, LVM for
|
||||||
|
all filesystems (including root), and GRUB2 to boot.
|
||||||
|
|
||||||
|
Starting with a vanilla Debian 7.8 setup. Here we assume that /dev/sdb
|
||||||
|
is the disk that will ultimately contain the system.
|
||||||
|
|
||||||
|
GPT setup
|
||||||
|
=========
|
||||||
|
|
||||||
|
(parted) mklabel gpt
|
||||||
|
(parted) mkpart primary 2048s 4095s
|
||||||
|
(parted) set 1 bios_grub on
|
||||||
|
(parted) name 1 "BIOS Boot Partition"
|
||||||
|
(parted) mkpart primary 4096s 100%
|
||||||
|
(parted) set 2 lvm on
|
||||||
|
(parted) name 2 "LVM"
|
||||||
|
|
||||||
|
Do we want a swap partition there??? If we don't provision one now,
|
||||||
|
we'll have to swap to an LVM LV.
|
||||||
|
|
||||||
|
LVM setup
|
||||||
|
=========
|
||||||
|
|
||||||
|
pvcreate /dev/sdb1
|
||||||
|
# Format given disk for LVM
|
||||||
|
|
||||||
|
vgcreate tank /dev/sdb2
|
||||||
|
# Create a volume group with that disk as the underlying storage
|
||||||
|
|
||||||
|
lvcreate -n rootfs -L 10G tank
|
||||||
|
lvcreate -n home -l 100%FREE tank
|
||||||
|
|
||||||
|
Filesystem
|
||||||
|
==========
|
||||||
|
|
||||||
|
mkfs.ext4 /dev/mapper/tank-rootfs
|
||||||
|
mkfs.ext4 /dev/mapper/tank-home
|
||||||
|
mount -t ext4 /dev/mapper/tank-rootfs /mnt
|
||||||
|
|
||||||
|
Set up root filesystem (including /boot subdirectory) in /mnt.
|
||||||
|
|
||||||
|
Make sure that /etc/fstab on tank-rootfs points to the proper
|
||||||
|
root fs.
|
||||||
|
|
||||||
|
GRUB2
|
||||||
|
=====
|
||||||
|
|
||||||
|
for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt$i; done
|
||||||
|
chroot /mnt
|
||||||
|
rm -f /boot/grub/device.map
|
||||||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
grub-install /dev/sdb
|
||||||
|
|
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: "Add collation to Postgres post-initdb"
|
||||||
|
date: 2018-05-16 14:09:15 +0200
|
||||||
|
comments: true
|
||||||
|
categories:
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
Note: this is for old Postgres installs that lack the
|
||||||
|
pg_import_system_collations function.
|
||||||
|
|
||||||
|
We need to operate as user so that the new collation has the proper
|
||||||
|
ownership. We connect to template1, because by default we can't connect
|
||||||
|
to template0.
|
||||||
|
|
||||||
|
$ sudo -u postgres psql -d template1
|
||||||
|
|
||||||
|
Now allow ourselves to connect to template0
|
||||||
|
|
||||||
|
template1=# UPDATE pg_database SET datallowconn = TRUE WHERE datname = 'template0';
|
||||||
|
template1=# \c template0
|
||||||
|
|
||||||
|
Create collation in the proper schema (pg_catalog). Quote collation name
|
||||||
|
to preserve capitalization.
|
||||||
|
|
||||||
|
template0=# CREATE COLLATION pg_catalog."en_US" (LOCALE='en_US.utf8');
|
||||||
|
|
||||||
|
Now reset datallowconn to FALSE.
|
||||||
|
|
||||||
|
template0=# UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template0';
|
||||||
|
|
||||||
|
Now any database created from the template0 template will inherit the new
|
||||||
|
collation.
|
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: "HPLIP won't print"
|
||||||
|
date: 2018-07-31 13:08:26 +0200
|
||||||
|
comments: true
|
||||||
|
categories:
|
||||||
|
---
|
||||||
|
|
||||||
|
Symptom
|
||||||
|
-------
|
||||||
|
|
||||||
|
Printing to HP MFP1217nfw fails with "Filter failed". No useful
|
||||||
|
information in CUPS logs even at LogLevel debug. Message found
|
||||||
|
in `/var/log/daemon.log`:
|
||||||
|
|
||||||
|
Jul 31 13:03:10 malaussene hpcups[3083]: common/utils.c 130: validate_plugin_version() Plugin version[3.14.6] mismatch with HPLIP version[3.16.11]
|
||||||
|
Jul 31 13:03:10 malaussene hpcups[3083]: common/utils.c 157: Plugin version is not matching
|
||||||
|
|
||||||
|
Probable cause
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Upgrade of HPLIP Debian packages without corresponding (manual) update
|
||||||
|
of the proprietary/binary plugin.
|
||||||
|
|
||||||
|
Fix
|
||||||
|
---
|
||||||
|
|
||||||
|
Upgrading the plugin using:
|
||||||
|
|
||||||
|
# hp-plugin
|
||||||
|
|
||||||
|
proved effective.
|
Loading…
Reference in New Issue