grml-live icon indicating copy to clipboard operation
grml-live copied to clipboard

autosearch functionality for "partconf=" cheat

Open lars18th opened this issue 6 years ago • 4 comments

Hi,

I'm booting from an UEFI (and this is relevant) memorystick. I want to use the option partconf=. However, when using this USB with different servers the disk configuration is different: no HD, 1, 2... disks. So I can't use /dev/sdX.

Any alternative to "autosearch" for the USB primary partition (where all GRML files are)?

lars18th avatar Mar 10 '19 19:03 lars18th

Hm, technically it would be possible to use labels or uuids, like partconf=LABEL=FOOBAR, but I'm afraid this doesn't work due to the boot option handling where the dublicate = breaks its parsing. We could introduce a new boot option to support this, but I'm reluctant to add further options to what we already support. So let's see instead: what about using a device labeled GRMLCFG, which is already supported (see https://github.com/grml/grml-autoconfig/blob/master/doc/grml-autoconfig.1.txt), is there anything for you with it?

PS: https://github.com/grml/grml-autoconfig/ would have been the proper repository for reporting this issue :)

mika avatar Mar 11 '19 09:03 mika

Hi Mika,

Thank you for your comment! :wink:

PS: https://github.com/grml/grml-autoconfig/ would have been the proper repository for reporting this issue :)

Before move this issue, please let to comment something here:

  • You can use this syntax: partconf=~FOOBAR and ~ indicates LABEL name instead of a path. That's easy to parse and you don't use it for a path or filename (as I assume that GRML boot scripts don't use any HOME directory).
  • The use of the GRMLCFG can be another solution; but I don't know how to use it with the option for copying (overlaping) the content of the partition with the squashfs, like does the partconf cheat. Any idea?

Thank you for your support.

lars18th avatar Mar 11 '19 18:03 lars18th

You can use this syntax: partconf=~FOOBAR and ~ indicates LABEL name instead of a path. That's easy to parse and you don't use it for a path or filename (as I assume that GRML boot scripts don't use any HOME directory).

Yeah, that would be an option.

The use of the GRMLCFG can be another solution; but I don't know how to use it with the option for copying (overlaping) the content of the partition with the squashfs, like does the partconf cheat. Any idea?

The partconf bootoption just mounts a blockdevice at /mnt/grml and then copies files/directories as specified in /etc/grml/partconf over to the rootfs, there's really no magic in it, you could just do the very same with GRMLCFG (see https://github.com/grml/grml-autoconfig/blob/master/doc/grml-autoconfig.1.txt#L134) as well.

mika avatar Mar 12 '19 07:03 mika

Hi Mika,

Yeah, that would be an option.

Great! I hope this will be added at some point.

The partconf bootoption just mounts a blockdevice at /mnt/grml and then copies files/directories as specified in /etc/grml/partconf over to the rootfs, there's really no magic in it,

I know it. No magic on it, but we need some "autoserach" functionality to overcome the harddisk reordering.

you could just do the very same with GRMLCFG...

Regarding this we can continue over https://github.com/grml/grml/issues/128. If you agree we can focus this issue in the "autosearch functionality for partconf cheat". :thinking:

lars18th avatar Mar 12 '19 08:03 lars18th