Petitboot ignores enabled autoload?

Samuel Mendoza-Jonas sam at mendozajonas.com
Mon Aug 27 14:33:48 AEST 2018


On Sun, 2018-08-26 at 12:14 +0200, Fredrik Noring wrote:
> Hi,
> 
> I recently installed a Petitboot v1.7.1-p836d356 configuration running under
> Skiroot and stumbled on some difficulties:
> 
> Autoload is enabled and set to 10 s but somehow Petitboot seems to ignore
> this and nothing happens. I've attached pb-discover.log below. What could
> be the problem? (Is Petitboot supposed to make use of the "default" label
> in kboot.conf, by the way?)

Hi!

The kboot parser in Petitboot sees very few users, and it looks like you've
stumbled across a bug. The parser should try to set a default option, but
when this was originally written the default keyword was put in the
kboot_ignored_names struct :)

A patch is incoming shortly to update that; in the meantime if you're looking
for a straightforward format for your boot config the syslinux or yaboot
parsers are both easy to hand-craft.

> 
> Gentoo is installed on the root filesystem. The installation process was
> quite problematic with Petitboot running the background, because its
> device discovery mechanisms interact badly when creating and configuring
> new filesystems in the shell. I had several failures of various kinds in
> addition to a complete filesystem corruption (block I/O device errors)
> before the installation could be completed. Is there a reasonable way to
> turn off Petitboot when working with devices in the shell?

Aha, yes I heard tell of people doing installs via a chroot. Most users stick
with booting into an installer, but there's no reason this shouldn't work.
You're safest bet would be to
a) Turn off dm-snapshots with
	nvram --update-config "petitboot,snapshots?=false"
   and reboot.
b) In the shell stop the discover server, eg with
	/etc/init.d/S15pb-discover stop

Then you should be left alone.

> 
> What is the most reliable way to write changes to a device? According to
> 
> https://sthbrx.github.io/blog/2016/08/17/getting-in-sync/
> 
> one could use "pb-event sync@<device>". However, this command seems to
> accept nonexistent devices, which means that if there is a misunderstanding
> on the naming, one can easily have the (incorrect) impression that changes
> are properly written to the device, only to later discover that everything
> was lost after rebooting.

Right, the pb-event interface isn't the most user friendly - it's essentially
a debug tool to fire off messages to the pb-discover process. There some
improvements to be made there; in the meantime you'll either have to be
careful with the naming, or if snapshots are turned off via the above command
you don't need to sync changes back.

Cheers,
Sam

> 
> Fredrik
> 
> --- pb-discover ---
> lang: en_US.utf8
> Detected platform type: powerpc
> Running command:
>  exe:  nvram
>  argv: 'nvram' '--print-config' '--partition' 'common'
> configuration:
>  autoboot: enabled, 10 sec
>   boot device 0: disk
>   IPMI boot device 0x00
>   Modifications allowed to disks: yes
>   Default UI to boot on: /dev/hvc0 [IPMI / Serial]
>  language: en_US.utf8
> Failed to retrieve Golden Device ID from IPMI
> SKIP: nvme0n1: no ID_FS_TYPE property
> Snapshot successfully created for nvme0n1p1
> mounting device /dev/nvme0n1p1 read-only
> trying parsers for nvme0n1p1
> boot option nvme0n1p1#linux-4.18.0-le is resolved, sending to clients
> boot option nvme0n1p1#linux-4.18.0-le-failsafe is resolved, sending to clients
> boot option nvme0n1p1#linux-4.18.0-le-working is resolved, sending to clients
> Running command:
>  exe:  /usr/sbin/pb-plugin
>  argv: '/usr/sbin/pb-plugin' 'scan' '/var/petitboot/mnt/dev/nvme0n1p1'
> Scanning device /var/petitboot/mnt/dev/nvme0n1p1
> No plugins found
> Snapshot successfully created for nvme0n1p2
> mounting device /dev/nvme0n1p2 read-only
> couldn't mount snapshot for /dev/mapper/pb-nvme0n1p2: mount failed: No such device
> falling back to actual device
> mounting device /dev/nvme0n1p2 read-only
> couldn't mount device /dev/nvme0n1p2: mount failed: No such device
> Interface enP4p1s0f0 ready
> Running command:
>  exe:  /sbin/ip
>  argv: '/sbin/ip' 'link' 'set' 'enP4p1s0f0' 'up'
> network: bringing up interface enP4p1s0f0
> Interface enP4p1s0f1 ready
> Running command:
>  exe:  /sbin/ip
>  argv: '/sbin/ip' 'link' 'set' 'enP4p1s0f1' 'up'
> network: bringing up interface enP4p1s0f1
> SKIP: mtdblock0: no ID_FS_TYPE property
> SKIP: mtdblock1: no ID_FS_TYPE property
> SKIP: mtdblock2: no ID_FS_TYPE property
> SKIP: mtdblock3: no ID_FS_TYPE property
> SKIP: mtdblock4: no ID_FS_TYPE property
> SKIP: mtdblock5: no ID_FS_TYPE property
> SKIP: loop0: ignored (path=/devices/virtual/block/loop0)
> SKIP: loop1: ignored (path=/devices/virtual/block/loop1)
> SKIP: loop2: ignored (path=/devices/virtual/block/loop2)
> SKIP: loop3: ignored (path=/devices/virtual/block/loop3)
> SKIP: loop4: ignored (path=/devices/virtual/block/loop4)
> SKIP: loop5: ignored (path=/devices/virtual/block/loop5)
> SKIP: loop6: ignored (path=/devices/virtual/block/loop6)
> SKIP: loop7: ignored (path=/devices/virtual/block/loop7)
> Running command:
>  exe:  /sbin/ip
>  argv: '/sbin/ip' 'link' 'set' 'lo' 'up'
> Running command:
>  exe:  /sbin/ip
>  argv: '/sbin/ip' 'link' 'set' 'enP4p1s0f0' 'up'
> network: bringing up interface enP4p1s0f0
> Running command:
>  exe:  /sbin/ip
>  argv: '/sbin/ip' 'link' 'set' 'enP4p1s0f1' 'up'
> network: bringing up interface enP4p1s0f1
> SKIP: dm-0: no ID_FS_TYPE property
> network: configuring interface enP4p1s0f0
> Running command:
>  exe:  /sbin/udhcpc
>  argv: '/sbin/udhcpc' '-R' '-f' '-O' 'pxeconffile' '-O' 'pxepathprefix' '-p' '/var/petitboot//udhcpc-enP4p1s0f0.pid' '-i' 'enP4p1s0f0' '-x' '0x5d:000e'
> SKIP: dm-1: no ID_FS_TYPE property
> SKIP: dm-2: no ID_FS_TYPE property
> SKIP: dm-3: no ID_FS_TYPE property
> SKIP: dm-4: no ID_FS_TYPE property
> SKIP: dm-5: no ID_FS_TYPE property
> udhcpc: started, v1.27.2
> udhcpc: sending discover
> udhcpc: sending select for 192.168.110.12
> udhcpc: lease of 192.168.110.12 obtained, lease time 43200
> deleting routers
> trying parsers for enP4p1s0f0
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-Q2QnX7' '-r' '/pxelinux.cfg/01-2c-09-4d-00-03-07' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-vgpWTa' '-r' '/pxelinux.cfg/C0A86E0C' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-nywm4k' '-r' '/pxelinux.cfg/C0A86E0' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-V20EsC' '-r' '/pxelinux.cfg/C0A86E' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-E2ZO40' '-r' '/pxelinux.cfg/C0A86' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-ufsQUw' '-r' '/pxelinux.cfg/C0A8' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-39sJY9' '-r' '/pxelinux.cfg/C0A' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-O3WtgU' '-r' '/pxelinux.cfg/C0' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-RFX5LL' '-r' '/pxelinux.cfg/C' '192.168.110.1' '69'
> tftp: timeout
> Running command:
>  exe:  /usr/bin/tftp
>  argv: '/usr/bin/tftp' '-g' '-l' '/tmp/pb-4tIzvK' '-r' '/pxelinux.cfg/default' '192.168.110.1' '69'
> tftp: timeout
> _______________________________________________
> Petitboot mailing list
> Petitboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/petitboot




More information about the Petitboot mailing list