-
meena
this is extremely low hanging fruit, but, does anyone know if i can make this sed expression
canonical/cloud-init #3501 POSIX *and* GNU compatible?
-
VimDiesel
Title: sed expression in tools/tox-venv is not POSIX compatible · Issue #3501 · canonical/cloud-init · GitHub
-
VimDiesel
3501 – rc.firewall changes removed URLs and added typos
bugs.freebsd.org/bugzilla/show_bug.cgi?id=3501
-
kevans
what the fuck is that
-
kevans
er, sorry
-
stellarskylark
wheeeee
-
nomia
rwp: ya it doesn't boot
-
nomia
it doesn't even turn on the video card
-
nomia
FreeBSD-14.0-RELEASE-arm-armv7-GENERICSD.img.xz: OK
-
sjuxax
So I borked my bootloader by running `gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i da0`. It doesn't detect a UEFI boot option anymore. How do I recover?
-
sjuxax
The handbook says to use boot1.efifat but I only have a boot1.efi on the USB disk
-
nomia
does this mean i need to be running freebsd before i can install?
forums.freebsd.org/threads/freebsd-bananapi-m3-support.58728
-
VimDiesel
Title: Freebsd BananaPi M3 support | The FreeBSD Forums
-
mjp
it just looks like you need to use dd?
-
mason
sjuxax: gpart bootcode is for legacy booting. For EFI, you generally want to copy /boot/loader.efi into your ESP, maybe as /boot/efi/efi/boot/bootx64.efi or somesuch.
-
mason
(The efi/efi is not a typo - inside your ESP there's typically an EFI directory that itself contains BOOT, but case doesn't matter to us.)
-
sjuxax
mason, I've tried creating a new ESP manually and copying it there, but it's still not detected. Only the FreeBSD memory stick is detected as bootable under EFI. I even created a variable in the efibootmgr and it was gone on next boot.
-
mason
sjuxax: Some UEFI implementations are wildly flaky.
-
mason
sjuxax: Try using the fallback naming, BOOTX64.EFI, and make sure it's in your ESP (vfat/fat32) inside EFI/BOOT/
-
rwp
nomia, If you think you wrote the SD card okay then the resulting system not booting must be for some other reason. Your command would have written the card okay. You said your command did not write the SD card but I think that it did. However your command would have required a "sync" to ensure that the data was written to the card before you ejected it.
-
rwp
That's one of the reasons dd is often recommended. Because we can tell dd to use sync options while writing. Then when dd is done and exits the card is also done and okay to eject.
-
rwp
nomia, I suggest this command for you: xzcat FreeBSD-14.0-RELEASE-arm-armv7-GENERICSD.img.xz | dd bs=1M iflag=fullblock oflag=direct,sync of=/dev/mmcblk0
-
rwp
That command will work the same on FreeBSD as on a GNU/Linux system. When the command exits the SD card has been written and can be ejected.
-
rwp
sjuxax, I have rather hated buggy UEFI systems and I have several. Do not despair. We have all cursed UEFI when we have had problems. If your system has the capability to boot Legacy BIOS you might try that as that is generally simpler and trouble free.
-
sjuxax
I need to get this bootable again ASAP. I was using legacy booting before, but that died too. I've tried both and am falling back to UEFI in hopes that it works. I'm currently booting sysrecuecd and will make sure that the ESP I tried to create is correctly flagged as an EFI System Partition
-
sjuxax
If I have multiple ESP partitions flagged, are they just ignored?
-
kevans
depends on the firmware, the spec doesn't specify
-
kevans
i suspect the first is used the rest are ignored in most places, but i have no evidence to back that up
-
kevans
("gut feeling")
-
rwp
I agree with the gut feeling. I suspect that the first ESP found, top to bottom through the partition table, will be the one used.
-
kevans
yeah. i mean, it just feels like the laziest and least complicated possible way to implement it
-
kevans
it's only natural to be inclined to stop there when there's only supposed to be one
-
rwp
A *huge* complication with UEFI is that it is not simply the files on disk that are needed to boot. UEFI also requires the EFI VARS in non-volatile ram to be set up too. efibootmgr updates those.
-
rwp
But UEFI booting of removable storage like USB and SD cards avoids the EFI VARS requirement since those are usually always set. Meaning that often a UEFI system will easily boot USB or SD card but be buggy booting off of the main storage.
-
kevans
i don't think uefi actually requires non-volatile storage
-
sjuxax
It's detecting ESPs on MBR-based USB boot sticks, both FreeBSD and SysRescueCD. It's not detecting the ESPs on my GPT-formatted FreeBSD boot disks.
-
kevans
sjuxax: do you have access to, e.g., a FreeBSD or linux live CD that you could boot via UEFI?
-
sjuxax
I would love to go back to legacy boot if it'd work but gpart bootcode doesn't load the bootloader there either
-
sjuxax
kevans, yeah, I have booted sysrecuecd right now
-
sjuxax
(via UEFI)
-
kevans
does it have efibootmgr?
-
Hello71
you need somewhere to store variables. technically I think the storage duration might not be specified, but without useful non-volatile storage you can't implement secure boot for example
-
sjuxax
yes, it has efibootmgr
-
kevans
trying to figure out how linux's efibootmgr does this
-
kevans
on freebsd you'd just mount the disk and efibootmgr -c -l /path/to/loader.efi/on/the/esp.efi
-
sjuxax
I did that from the FreeBSD memstick and it was just gone on the next boot
-
sjuxax
dunno if i didn't save it correctly or what
-
kevans
gone gone, even from the firmware menu?
-
kevans
it's possible to not make it active, but if the acommand succeeds it should still be there as long as there's nvram backing efivars on this platform
-
Hello71
if it shows when running efibootmgr and then disappears from efibootmgr when rebooting, that's probably a firmware issue
-
kevans
you can check with efivar
-
kevans
efivar -l | grep -- -Boot
-
kevans
then grab each one and... efivar -p --name <guid> I think
-
ghoti
meena: if you can provide sample input and expected output, I'd be happy to takea shot at your sed challenge.
-
kevans
yeah, on this linux boxen I have over here *poitns acrosss the internet* that dumps out the path in a hexdump
-
mason
sjuxax: If you used legacy booting before it ought to still work. You didn't lay down a new partition table or something, did you? What's there now? GPT or legacy/MBR?
-
kevans
if you find one that has the path, you can `efibootmgr -a -b <last 4 digits>`
-
sjuxax
yes, gone from the firmware menu. booted into freebsd livecd again. if i want to use legacy boot, what's the fastest/easiest way to reinstall the bootloader on GPT? I didn't change the partition tables at all
-
sjuxax
can I just do something like bsdinstall bootconfig? It booted fine using the layout from the installer
-
sjuxax
trying `gpart bootcode -p /boot/gptzfsboot da0`, without the protective mbr segment
-
sjuxax
no dice there. pulling up sysrescuecd again, maybe i'll try installing refind
-
sjuxax
ok, suppose i just want to use the usb's bootloader to boot my current root
-
sjuxax
lszfs zroot/ROOT/default: says device not configured
-
sjuxax
Phew, I guess it was something in the SAS configuration. I exposed 21/21 drives to the system during the boot process and now it's finally booting. Dunno why the default disk exposed would've changed, haven't changed any of the SAS settings, but at least I'm booting again
-
sjuxax
thanks all
-
sjuxax
still doesn't detect any of the EFI partitions, but what can you do
-
mason
sjuxax: Glad it's working, even if there's still a puzzle left.
-
rwp
Life and time is what keeps us from solving all of the unsolved puzzles that we run across daily. :-)
-
mason
yes
-
nomia
rwp: ok
-
uskerine_
ghoti I know that people using FreeBSD are usually very skilled so they do not require documentation, but I have the feeling that thin jails with UFS are not widely covered by the documentation, and in particular, the specific procedure included in the handbook did not work for me
-
babz
well the procedure in the handbook cannot work as it requires zfs
-
babz
but the point of this stuff is rather limited. it's a matter of ensuring that the common base of 2 jails *at the time of their creation* is deduplicated on disk.
-
babz
If you update your jails, the space saving disappears.
-
uskerine_
babz: I understood that the handbook covers both ZFS and UFS (with NullFS)
-
uskerine_
Are you sure that UFS is not covered? Did I misunderstand the handbook?
-
babz
ok, I didnt see this part
-
meena
ghoti: i might be able to provide that
-
babz
uskerine_: where are you stuck ?
-
uskerine_
-
uskerine_
I am not sure if you can see it, maybe it requires aproval
-
babz
505 not found
-
babz
*404
-
uskerine_
I see, it requires to be approved at the forum
-
uskerine_
here is the copy and past of the forum thread:
-
uskerine_
-
VimDiesel
Title: View paste 5MDQ
-
uskerine_
I implemented the recommendation from scoobybejesus (I think it was him the one suggesting it) to also create symbolic link for dev, but still the Jail wouldn't start, so I have not included and falled back to the handbook procedure
-
babz
that procedure is ... convoluted
-
babz
in /etc/jail.conf.d/thinjail.conf
-
babz
you should have path = "/usr/local/jails/thinjail-nullfs-base" I think
-
meena
why doesn't jexec have a CWD?
-
meena
why the heck is yarn not idempotent??!
-
armin
uskerine_: "so they do not require documentation"? I disagree with that one. They're skilled because good documentation exists.
-
voy4g3r2
hi everyone, has anyone had luck getting the shell zsh to work with the tmux plugin manager tpm? if i keep the package bash (even if not sourced) the tpm program does not error out.. remove the package bash.. it go boom. Quesiton is: has anyone een able to get tpm to work without bash installed
-
babz
-
VimDiesel
Title: The 4 types of technical documentation - Nick's Blog and Digital Garden
-
CueXXIII
voy4g3r2: looking at the github repository, the first line in the tpm script i see is "#!/usr/bin/env bash" - so no, bash is a dependency to run tpm. it might even use bash specific syntax
-
CmdLnKid
monkeys bash stuff... good devs keep /bin/sssshhhhhhhhhh
-
voy4g3r2
CueXXIII: yeah.. i see that, then i think zsh is a bash++ as they say.. so yeah.. figure maybe someone was able to "hack" it
-
CueXXIII
voy4g3r2: i'm pretty sure bash and zsh have come up with different extensions to the posix specifications
-
ZedHedTed
as Luke Smith put it, bash has alot of "bashisms" that are not always portable to other shells
-
voy4g3r2
most likely.. i felt
-
voy4g3r2
"dirty" with the bash gplv3 so i am like.. i like zsh (on my mac) so might as well be consistent through all environments
-
CueXXIII
but zsh has their own zshisms, too
-
voy4g3r2
and making a leap, without reading, will burn you
-
voy4g3r2
totally get that.. i did not realize how much bashism was prevalent in my setup until i removed it
-
voy4g3r2
temporary fix, add it back, then see if i can just "move" the line to zsh from bash :)
-
CmdLnKid
its good to be posix compliant as possible
-
CmdLnKid
zsh runs bash just fine
-
CmdLnKid
ln -s /bin/zsh /bin/bash ;)
-
CueXXIII
CmdLnKid: try `read -p "Your input: " input` in zsh for example
-
CmdLnKid
yeah that could be a problem
-
voy4g3r2
CmdLnKid: that was going to be my first test but have to handle some work related activities, which is NOT working on freebsd unfortunately..
-
uskerine_
armin well then unfortunately it seems that there might be some gap in the documentation for thin jails
-
babz
uskerine_: did you try what I said ?
-
armin
-
VimDiesel
Title: Chapter 17. Jails and Containers | FreeBSD Documentation Portal
-
babz
I'm afraid the handbook procedure is unnecessarily complicated, poorly explained, and apparently contains a mistake.
-
armin
It's not exactly perfect, yea...
-
babz
also, and here I don't know if there's a real reason, but I have the impression that people usually do it the other way around as it's simpler :
-
babz
have the r/w skeleton with symlinks to the ro base nullfs mount point
-
uskerine_
-
VimDiesel
Title: jails - Issue while following the handbook to create a Thin Jail using NullFS | The FreeBSD Forums
-
paulf
who is supposed to be organising the fosdem bsd devroom this year?
-
scoobybejesus
uskerine_: i haven't had to chance to do this by hand to verify what's happening, but it could be helpful if you see a generalized working example, which is what bastille does when it creates jails. it's all shell scripts. here you can see which files are softlinked and which are copied, if it helps.
github.com/BastilleBSD/bastille/blo…l/share/bastille/create.sh#L359-387
-
VimDiesel
Title: bastille/usr/local/share/bastille/create.sh at master · BastilleBSD/bastille · GitHub
-
babz
seriously
-
babz
why no just fix the jail.conf frst ?
-
meena
-
VimDiesel
Title: meena-co/bootstrap.sh: Bootstrap infra - bootstrap.sh - Codeberg.org
-
babz
yes, but.
-
babz
why keep it simple when you can make it complicated?
-
babz
that makes me think I should look into pkgbase
-
meena
babz: i used to use Puppet… but then things happened
-
babz
master of puppets, I'm pulling your strings
-
babz
twisting your mind and smashing your dreams
-
babz
blinded by me, you can't see a thing
-
babz
just call my name 'cause I'll hear you scream
-
angry_vincent
there is #freebsd-social
-
babz
sorry
-
meandrain
If I manually install FreeBSD what is the proper size for boot partition ? 512k is enough ? (zfs on root)
-
otis
512k is the maximum size. the whole partition is being read into memory and "640k ought to be enough for everyone" limit applies.
-
jensen_
Good evening. It's been ages since I was on IRC last.
-
la_mettrie
hi
-
rtprio
congrats
-
polyex
14
-
uskerine_
scoobybejesus thanks I will have a look to that
-
CrtxReavr
jensen_, I have bad news for you.
-
CrtxReavr
This is Discord.
-
uskerine_
babz btw I saw your message suggesting to change path in the jail .conf. I tried and then I get: jail: thinjail: getpwnam: No such file or directory jail: thinjail: /bin/sh /etc/rc: failed
-
uskerine_
I will try to go through bastille script and see if I can figure it out, I think it is a pity that there is no more documentation
-
uskerine_
man jail
-
scoobybejesus
my bad. dev is not a symlink to the release/base jail. it's copied in. you can see what's copied into the jail on line 378
-
scoobybejesus
it looks a bit weird in the handbook
-
meena
-
VimDiesel
Title: localectl - Control the system locale and keyboard layout settings at Linux.org
-
SamuelMarks
hi
-
SamuelMarks
Looking at
en.wikipedia.org/wiki/C_standard_library#BSD_libc - what are the portable versions of these? - It was libbsd and some old NetBSD thing IIRC - so like would I just throw in a cross-platform build system—like CMake—and carefully port each thing so that Windows (MSVC, OpenWatcom, MinGW, Cygwin, clang), and Linux/macOS/SunOS (gcc, clang) compilers successfully build?
-
VimDiesel
Title: C standard library - Wikipedia
-
SamuelMarks
(i.e., would I take from FreeBSD's current source tree)
-
SamuelMarks
oooft netsplit