:: [DNG] Jessie --> ascii issues
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Andrew McGlashan
Fecha:  
A: Devuan DNG
Asunto: [DNG] Jessie --> ascii issues
Hi,

I've upgraded one of my servers from Devuan Jessie to Devuan ASCII and
had some issues.


First the initramfs failed to work properly as I have custom scripts for
the setup, one of the scripts sets up a bunch of useful tools for the
initramfs environment and that part was fine.

But a different script populated .profile and some other files in the
target DESTDIR/root directory -- now it needs to be DESTDIR/root*


# diff
hourly.1/kvm-affinity-devuan-b/root/usr/share/initramfs-tools/hooks/other
hourly.2/kvm-affinity-devuan-b/root/usr/share/initramfs-tools/hooks/other
43c43
<     (cd /etc/initramfs-tools/root.other_files/;tar cf - . | (cd
"${DESTDIR}/root"*;pwd;tar xvf -))
---
>     (cd /etc/initramfs-tools/root.other_files/;tar cf - . | (cd

"${DESTDIR}/root/";tar xvf -))


The newer rsnapshot (hourly.1) fixes the problem with my root files area
setup, with the pwd thrown in there for my benefit when building the
initramfs files.


I do have multiple LUKS disks (not just the root file system) and simply
unlocking the root file system wasn't enough; my initramfs setup gives
me extra tools to check RAID devices and unlock extra LUKS volumes.


The other problem I had was with a backup script that has a weird
difference with "fdisk -l" output -- if the lvm is referenced via
/dev/mapper/vg_name-lv_name, then the output now includes "-part"
components, but if I do an "fdisk -l" for the /dev/vg_name/lv_name, then
it doesn't have "-part".  For Jessie, both paths give the same suffix
endings for partitions.  You can see the differences below.  I had to
use sed to remove the "-part" string for my backup scripts to work.


ASCII (upgraded from Devuan Jessie)

# fdisk --version
fdisk from util-linux 2.29.2



# l /dev/vg0/server--disk0--backup /dev/mapper/vg0-server----disk0----backup
lrwxrwxrwx 1 root root 7 Nov 18  2018 /dev/vg0/server--disk0--backup ->
../dm-9
lrwxrwxrwx 1 root root 7 Nov 18  2018
/dev/mapper/vg0-server----disk0----backup -> ../dm-9

# fdisk -l /dev/vg0/server--disk0--backup
Disk /dev/vg0/server--disk0--backup: 15 GiB, 16106127360 bytes, 31457280
sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0bf87a90

Device                          Boot   Start      End  Sectors  Size Id Type
/dev/vg0/server--disk0--backup1         2048  3905535  3903488  1.9G 82
Linux swap / Solaris
/dev/vg0/server--disk0--backup2 *    3905536 31455231 27549696 13.1G 83
Linux


# fdisk -l /dev/mapper/vg0-server----disk0----backup
Disk /dev/mapper/vg0-server----disk0----backup: 15 GiB, 16106127360
bytes, 31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0bf87a90

Device                                          Boot   Start      End 
Sectors  Size Id Type
/dev/mapper/vg0-server----disk0----backup-part1         2048  3905535 
3903488  1.9G 82 Linux swap / Solaris
/dev/mapper/vg0-server----disk0----backup-part2 *    3905536 31455231
27549696 13.1G 83 Linux





Another server still running Devuan Jessie

# fdisk --version
fdisk from util-linux 2.25.2

# l /dev/mapper/vg0-server----disk0 /dev/vg0/server--disk0
lrwxrwxrwx 1 root root 7 Nov 18 07:33 /dev/vg0/server--disk0 -> ../dm-3
lrwxrwxrwx 1 root root 7 Nov 18 07:33 /dev/mapper/vg0-server----disk0 ->
../dm-3



# fdisk -l /dev/vg0/server--disk0
Disk /dev/vg0/server--disk0: 15 GiB, 16106127360 bytes, 31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x077e996e

Device                   Boot   Start      End  Sectors  Size Id Type
/dev/vg0/server--disk0p1         2048  3905535  3903488  1.9G 82 Linux
swap / Solaris
/dev/vg0/server--disk0p2 *    3905536 31455231 27549696 13.1G 83 Linux


# fdisk -l /dev/mapper/vg0-server----disk0
Disk /dev/mapper/vg0-server----disk0: 15 GiB, 16106127360 bytes,
31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x077e996e

Device                            Boot   Start      End  Sectors  Size
Id Type
/dev/mapper/vg0-server----disk0p1         2048  3905535  3903488  1.9G
82 Linux swap / Solaris
/dev/mapper/vg0-server----disk0p2 *    3905536 31455231 27549696 13.1G
83 Linux

Now this was just a kvm host machine (without any actual vms at this
time), so these little annoyances were less critical to me, but a bit of
a pain nonetheless.


Not sure why initramfs must now have /root-${RANDOM_PART} for dropbear's
root login instead of being just /root


The fdisk changes were also baffling, why it had to change from p1, p2,
p3 to -part1, -part2, -part3 suffixes for the partition/dev/mapper path
listing is a mystery.


Cheers
AnderwM