00:17:04 dch: can you completely re-type the entry that fails in fstab, instead of copy-pasting it? 00:31:43 debdrup: https://gist.github.com/dch/72875fa31e57e31f0eaa6b59137f5088#file-mount-md 00:31:44 Title: exports.md · GitHub 00:40:40 ok! found it 00:41:00 in `mount -t` use `nfsv4`, for fstab, use `vers=4` 01:25:22 I download the freebsd .iso file and burn it to my usb stick and when I boot it up, it doesn't say cant find the dvd drive when it tries to install software whats wrong 01:48:26 sn00p wait what 01:54:03 sn00p: if you're writing an usb stick, you need to use the memdisk image instead 01:55:56 the iso is a cd9660 hybrid image that conforms to the el torito standard and can be used for both bios and uefi - but as a result, there's a lot of firmware that refuses to accept it if you write it onto a flash disk because a flash disk doesn't register as an optical drive (not unless you force it, which isn't possible on all firmware implementations) 01:59:04 it's a rather complex piece of coding that exploits some different areas of the cd9660 format including something called the system area that's normal to overload the ability and add a separate gpt in addition to the el torito standard 02:00:49 https://cgit.freebsd.org/src/commit/?id=0279ac04edcf it was added here 02:00:50 Title: src - FreeBSD source tree 02:02:58 s/normal to overload the ability/that's used to overload the normal booting method/ 02:03:11 it's 3 in the morning, and i need sleep. 10:49:25 what am I missing. trying to create a linux jail using debootstrap. 10:49:53 When I try to start the jail it seems to be unable to run the binaries installed like bin/true 10:50:06 drobban can you share your files? 10:50:14 share? 10:50:15 =) 10:50:27 drobban yeah, to a pastebin maybe? :) 10:50:42 brb 10:50:45 drobban Take your time 10:51:11 do you have that linux emu stuff loaded? 10:53:50 nimaje: think so. linux64.ko and so is loaded 10:54:30 antranigv: its the entire ubuntu file tree that is "installed" 10:54:44 antranigv: what files are of interest 10:54:53 is of* (perhaps) 10:55:45 drobban Jails aside, can you chroot into the ubuntu root dir? and after the chroot, can you run `ls` ? 11:46:40 antranigv: Ill test 11:47:41 antranigv: https://bsd.to/ydy1 11:47:42 Title: dpaste/ydy1 (Plain Text) 11:47:56 seems to work fine 11:48:13 drobban okay, the linux part is fine, you have an issue with Jails; can you paste your jail.conf / jail command? 11:49:03 antranigv: https://bsd.to/FsRM 11:49:05 Title: dpaste/FsRM (Plain Text) 11:49:41 drobban what happens when you start the jail? does the jail command give any error? 11:50:13 antranigv: im unable to start the jail service 11:50:46 Starting jails: cannot start jail "ubuntu": 11:50:46 22 11:50:46 jail: ubuntu: getpwnam: No such file or directory 11:51:00 also complains about true command =D 11:51:50 most likely me missing some vital part of how jails and linux compat works 11:52:25 hm, missing /etc/passwd in the jail? 11:52:33 nimaje seems like it 11:52:41 drobban did you check if the true command exists? 11:52:48 antranigv: it exist 11:52:52 and if it does, then this is a /etc/passwd issue 11:52:57 here's what you have to run 11:53:13 passwd exist aswell. 11:53:52 true command throws similar error 11:54:03 jail: ubuntu: /bin/true: failed 11:54:15 so first test if you can do what you want with just a chroot 11:54:18 but at the same time not =D 11:54:40 drobban do this: cd /my/jail/path/etc ; echo "root::0:0::0:0:Charlie &:/root:/bin/bash" > master.passwd ; pwd_mkdb -d ./ -p master.passwd ; 11:55:13 drobban another option is; first chroot like you did before, then cd to /etc; then run pwconv and grpconv; you might need to run passwd as well :) 11:55:47 drobban basically, the passwd file that comes with Ubuntu is incomplete, you need to "fix" it. 12:02:13 antranigv: thanks for tips. tried running pwconv and grpconv, also changed the password with passwd. but still the same error 12:02:32 drobban still getting getpwnam? 12:03:52 I'm out of ideas :( 12:04:52 pwd_mkdb? 12:08:03 dude antranigv ! remaking passwd like your first instruction made the trick. 12:08:50 drobban ah, looks like even after 7 years, I remember stupidities in Linux :P 12:10:27 =) 12:15:43 awesome help! 12:16:21 does anyone know if FreeBSD's awk has a sort function? I need to sort an array 12:16:31 there is so much tech that is "new" to me. So its hard to know whats irrelevant in finding the source of the problem 12:17:58 antranigv: sort? 12:18:07 =) 12:18:16 drobban I kinda have to do it in only awk, because it's a long script 12:20:53 good morning everyone 12:21:29 drobban oh, I guess I can call `system` 12:21:49 bsdbandit top of the morning to you! 12:26:44 Where does the data to sort come from? 12:27:33 V_PauAmma_V something like this: ifconfig $_bridge | awk 'BEGIN {i=0} /inet / { split($2, addrbits, "."); addr[i]=addrbits[4]; i++ } END { j=0; while (j < i) { print addr[j]; j++} }' 12:29:27 V_PauAmma_V I want to sort all IP addresses so I get an available IP address. kinda. 12:29:53 V_PauAmma_V I know, I know, I should be using a DHCP server, but I want to make it easy for the beginner users. 12:32:57 omg, we have flua now, I can use that 12:34:27 Hmm, your awk code assumes a /24. If your audience is beginners, that's an unnecessary source of potential confusion IMO. 12:36:02 V_PauAmma_V agreed! I'll just use flua, it will make things A LOT easier. 12:36:16 I should migrate my current AWK codes in the system to flua too! 12:44:34 * V_PauAmma_V should perhaps learn some lua in his CFT. 12:44:48 V_PauAmma_V what's a CFT? 12:45:03 Copious Free Time. 12:48:03 V_PauAmma_V :D 13:38:12 I've just installed gnome, haven't used it in years, and it's hibernating my workstation after 15 minutes. How do I control this? 13:38:20 antranigv: what are you working on? 13:38:53 ghoti: is it hibernating or just shutting down screen? 13:39:07 drobban a jail orchestrator for both powerful users and beginners 13:39:34 Hibernating. Power goes off, I have to wake it up with the power key. When it's off, uptime does not increase. 13:40:00 antranigv: what is it suppose to orchestrate? deployment? 13:40:16 I'd be happy with just the screen, that makes sense, but I leave long running things. 13:40:16 _everything_ =D 13:40:44 ghoti: then I have no clue... =D 13:41:19 drobban well, for now it does jail management via jail.conf, so ./jailer create -type epair -b bridge0 -a 10.0.0.10 www0 13:42:24 antranigv: =) interesting. does it have a public repo? 13:42:25 drobban but soon it will be more... Dockerlike. So ./jailer build jailerfile ; ./jailer create -T myapp -a 10.0.0.10 13:42:27 drobban yes 13:42:38 nice. will take a look 13:42:45 drobban here are my latest changes. https://github.com/illuria/jailer/tree/antranigv/cleanup-2023-mar 13:42:46 Title: GitHub - illuria/jailer at antranigv/cleanup-2023-mar 13:42:50 been looking for something like that. 13:43:23 drobban don't run on prod yet, because it's still beta. we also do some weird things like a custom rc.d/jail file (we use the patches that are not even commited to -CURRENT yet) 13:43:35 I should write a readme today. a new one 13:44:17 reading the readme right now =D 13:44:27 okey :) 13:44:55 been looking for something simple to use to spin up services as needed during dev. 13:45:17 been using bare metal jails at the moment, and Im learning while doing right now. 13:45:50 drobban: what suggestion would you have given if it was just screen blanking? Options might be clistered.. 13:45:56 just discovered during todays exercise in getting linux env spinning inside jail that zfs is fucking awesome when it comes to jails as well =D 13:46:33 `gsettings get org.gnome.desktop.session idle-delay` gives me "uint32 0", btw 13:46:36 drobban yes, we're very heavily invested on FreeBSD Jails on ZFS. I can't believe people use VMs when containers are a thing. even in the linux workd. 13:46:39 ghoti: man xset but its only related to displays afaik 13:46:42 s/workd/world 13:47:15 ah, yes. I feel this might be something closer to dbus. 13:47:35 antranigv: yea... VM's is something weird business use to keep some old obscure system alive, not to do sane management... In my oppinion. 13:47:52 *opinion 13:48:53 99% of all people I have encountered that uses VMs in the "cloud" is doing that in an heavily Microsoft invested environment. 13:49:04 DIE MS DIE 13:49:33 kind of.... They eventually will.... some bullshit malware will kill it in time. 13:52:28 ghoti: have no experience in gnome... but perhaps man acpi might be to some help here? 13:52:30 antranigv: have you found any official tool that understands the format of jail.conf? I have written something, but I would prefer not to use reinvented wheels.. 13:55:08 ghoti: I assume powerlevels is reporting sane values? 13:55:15 drobban: perhaps. But this was something that was introduced with gnome. I feel there must be a dependency somewhere, perhaps something that gnome-session does, that will give me a hint. 13:55:55 ghoti: I assume the tools in gnome is using basic functionality in the system rather then implementing their own stuff? 13:56:18 who knows.. THere are Linux people involved. ;) 13:56:28 :O 13:56:32 :-D 13:58:22 antranigv: the tool looks promising... It seems to be what I have been looking for. 13:59:29 antranigv: will it include any hooks for "recipes" - like stuff to install and so on? 13:59:55 I do jail management by hand at the moment, but I use a tool for bhyve. 14:00:45 oo man there is so much new tech I havent heard of before.... Feeling like Im stepping into a whole new world now when started using FreeBSD. 14:01:03 bhyve? the name sounds familiar. 14:01:14 FreeBSD's native hypervisor. 14:01:33 drobban YES! it will have a Jailerfile which is similar to Dockerfile, it will have Hooks so you can modify post-install and pre-install thing and it will have distirbuted model 14:01:46 ghoti: okey yet another VM management system? 14:01:59 drobban this is actually an open-source port of what we built internally 14:02:05 antranigv: freaking awesome! 14:02:16 drobban: an alternative to virtualbox or vmware.. But native. It's very good. 14:02:31 drobban our current commercial version can manage jails on multiple machines. 14:02:48 * f451 votes +1 for bhyve vms 14:02:59 ghoti: okey! perhaps i will try it out when need for a vm present itself =) 14:03:01 OMG IT WORKED 14:03:18 I run a bunch of Linux boxes using it already. Great for when you can't use a jail. :) 14:03:40 antranigv: will be monitoring the repo closely =D 14:03:51 antranigv: congrats. =) 14:04:13 drobban: for management, I recommend vm-bhyve (in ports) 14:04:18 =) 14:04:33 a bhyve vm is truly isolated from the host. spin up a vm, use zfs on the host for backing store, best as a zvol, zfs snaps, it's great :) 14:04:59 can imagine =) 14:05:15 own ip own firewall etc etc 14:06:08 one thing ive not done is host windows server as guest in bhyve but it's had that capability for a while 14:07:10 i don't use any management sw for bhyve, just screen(8) and some simple scripts 14:07:55 antranigv: for me the biggest use case for docker / jails is to be able to with configs/code be able to formulate build steps for services that are needed while developing some system and to be able to share with other people - so they can reproduce the exact same setup. 14:08:11 I was doing that as well, but the scripts started to get a bit complex, so I installed vm-bhyve. Someone else can maintain the scripts. ;) 14:08:22 =) 14:10:04 i just found it easier when learning, to run it all from scratch firstly. 14:10:13 drobban: I wrote a thing a while back that constructed custom jails for applications, and used recipes that could be used to make similar jails. Would you see a "market" for something like that? 14:11:51 I should dredge out the code and get it running with modern FreeBSD. I think it 9.x or so that I was using it.. 14:12:17 ghoti: well, isnt that what most people use docker to do? 14:12:36 I don't know what people do with docker. I haven't used it. 14:13:24 sure there is fancy parts of image reuse and so on. But who benefits from that part in any major way? 14:13:59 ghoti: I used docker to setup dev environments while doing local work and to setup automated deployment. 14:15:19 and automated "testing". spinns up new image image with my source and takes a test run and report back any problems 14:15:23 It looks like I was writing these tools before docker came out, about a decade ago. I've never been heavily into Linux, generally worked in FreeBSD shops.. 14:16:46 Huh, we're apparently coming up to Docker's 10 year birthday, according to wikipedia. 14:16:54 well to be honest. for what I am doing, jails works perfectly fine... Except for when I need to deploy - the platforms I use expects docker images 14:17:30 What platforms? Do you need a shim? 14:17:39 think I have been a docker user since 2015 or something like that. 14:18:02 WOOHOOO https://antranigv.am/misc/jailer_loop.mp4 14:18:11 just started using Fly.io. they seem nice 14:18:44 their tool flyctl is really awesome, until I tried to use it in FreeBSD =/ 14:19:59 antranigv: https://i.kym-cdn.com/photos/images/newsfeed/000/764/965/47a.jpg 14:20:21 drobban containers should be as easy as that. just run create and done 14:20:47 antranigv: agree. create and slaughter on demand. 14:23:31 antranigv: still using 127.0.0.0/8 :( 14:30:11 debdrup yup. now writing one for epair, so the user can choose defaults 14:30:33 antranigv: what about netgraph? :P 14:31:22 /usr/share/examples/jails/ has an example 14:38:26 debdrup I'll be integrating jng this week. 14:44:19 debdrup regarding 127/8, users can do `jailer default nettype vnet` and it will assign an IP using VNET style 14:44:42 debdrup altho you can also do `jailer default addr dhcp` so to use DHCP :) 15:04:03 Hello, when I run `rm -rf Folder/` I get a bunch of "Folder/subfolder: Directory not empty" errors. Anyone know what I can do to delete this folder? 15:09:24 luca: whats in the folder? `ls -AFGhl Folder/` should show you if its simply permissions. 15:10:01 normally start with sudo and if necessary use `chflags -R 0 / ..` 15:10:16 "In general" it's some old coding projects. git repos and such. I don't think it would be permissions because I did run `rm -rf` as root (through doas) 15:10:22 but it could also be mountpoints, processes, file handles etc 15:11:08 I highly doubt it's processes or mountpoints or file handles. It's an external HDD I just mounted and formated with zfs 15:11:21 I was copying some files onto it, then cancled and wanted to delete what it had copied 15:16:12 luca: use lsof in ports to see 15:19:13 drobban: I have a custom jail script https://git.io/JfHOu to do this 15:19:15 Title: see https://git.sr.ht/~dch/diy-jails/ for some background · GitHub 15:19:38 and a small zfs dataset that I clone with base files in it 15:20:00 drobban: erm, to generate ephemeral jails for doing work in. no jail.conf files, just a tmux and zfs magic. 15:21:25 and nullfs 15:21:31 instead of zfs 15:28:59 dch: How do I use lsof and for what? 15:29:30 * debdrup mutters something about fstat(1) 15:29:46 debdrup: that too if you know what the file is, yeah? 15:29:59 It works on directories too though. 15:30:01 `lsof` In the absence of any options, lsof lists all open files belonging to all active processes. 15:30:19 fstat also lists all open files though? 15:30:20 debdrup: lsof is probably the only linuxism I still have 15:31:11 I installed it with `doas pkg install lsof`. Do you know by any chance where it is? 15:31:43 `pkg list lsof |grep bin` 15:32:05 Thanks! 15:32:08 or `whereis lsof` also works 15:33:14 `lsof /hdd/` (/hdd being where my external hard disk is mounted to) returns nothing (error code 1) 15:35:41 drobban: follow-up on that hibernate issue, in case you're interested... 15:35:47 `gsettings range org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type` gave me a list of options, and I was able to use `gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type blank`. I'll go have coffee now and see what happens. 15:35:53 debdrup: how do you get fstat to return the filenames? 15:36:06 luca https://man.freebsd.org/cgi/man.cgi?errno tells you what the return code means. 15:36:07 Title: errno 15:39:07 dch: Don't remember, sorry 15:39:51 debdrup: I think thats why I still use lsof 15:40:19 drobban: I found some interesting jail-provisioning ideas in https://github.com/ployground/bsdploy as well, but I don't think I would use the project itself. 15:40:21 Title: GitHub - ployground/bsdploy: BSDploy is a tool to provision, configure and maintain FreeBSD jails. 15:42:17 dch: According to that link it's a "Operation not permitted" error. But I get the same code as root, so I doubt that's the problem 15:44:05 luca: so `doas lsof` returns nothing, just an error? 15:44:47 Yeah pretty much 15:44:58 Also "lsof: WARNING: compiled for FreeBSD release 13.1-RELEASE-p7; this is 13.1-RELEASE-p3.", but I doubt it's relevant 15:45:10 (I used pkg, not ports) 15:46:30 Worst case scenario I think I'll just reformat this hard drive. But it would be nice to know what to do when this happens again next time and I might have actually important data on it 15:47:48 Side note, how does tcsh work in regards to finding programs to run? When I type `lsof` I get command not found. But it is in /usr/local/sbin, which should be in my PATH 15:48:16 rehash 15:48:43 But you shouldn't need to. Check your PATH? 15:54:22 dch: you do? nice! Ill have a look 15:55:08 dch: are you a fan of fish? 15:55:21 big fan 15:55:37 for interactive small stuff, posix sh for scripts 15:56:25 dch: do you use it as you daily driver in term as well? 15:56:32 luca: something is odd here, lsof should return 100s of entries 15:56:39 drobban: yep 100% 15:57:30 V_PauAmma_V: rehash did it. Thanks :D 15:58:10 ghoti: "configure and maintain FreeBSD jails" well, im not after something for maintining as much... For me its more about spinning up something and if something has to change, slaughter the old and spinn up something new. 15:58:33 dch: lsof by itself returns quite a lot of entries (when ran as root), just not when pointed to /hdd 16:01:15 dch: perhaps I should try it out then... been sceptic -- mostly because im conservative =D 16:02:35 ookey... im already sold.... the autocompletion suggestions are awesome =D 16:04:26 dch: you dont happen to be user of fly.io's services are you? 16:06:35 ghoti: did it help -- the suspen issue that is =) 16:06:50 suspend issue* 16:13:12 I tried restarting my freebsd device and it didn't automatically mount the zfs drive by itself. Anyone know how I could make it do that? 16:13:31 fstab? 16:15:34 luca: you need to provide a bit more info about what you've tried, and not just assume we can read your mind 16:15:35 e.g. 16:16:08 Sorry for not being clear. All I tried was `zfs_enable=YES` and a restart. 16:16:14 I have `zfs_load=YES` in loader.conf, and `zfs_enable=YES` in rc.conf 16:17:01 I boot off ufs, and I have a dataset zroot/stuff with property mountpoint=/stuff 16:17:06 What is zfs_load? I am following the handbook[1] and it doesn't mention it at all. [1]: https://docs.freebsd.org/en/books/handbook/zfs/ 16:17:07 Title: Chapter 21. The Z File System (ZFS) | FreeBSD Documentation Portal 16:17:37 dch: I only have zfs_enable in my system :-/ 16:17:56 luca early stage kernel drivers are typically enabled with a "tunable" in /boot/loader.conf like `zfs_load="YES"` 16:18:02 in my case I boot off zfs, so I need this 16:18:20 hummm so do I 16:18:35 i honestly dont know if you can add just zfs_enable=YES in /etc/rc.conf and have it auto-mount datasets 16:18:59 i havent had serious non-zroot booting systems since 9.3 16:19:00 dch: I have zfs_load in /boot/loader.conf 16:19:49 late stage kernel drivers can be pulled in by having them listed in /etc/rc.conf `kld_list="i915kms.ko ${kld_list}"` for my intel gpu 16:20:10 luca: because freebsd is all open source we encourage you to ... look .. at the source! 16:20:14 this gets easier over time 16:20:32 and I should also do it more often too 16:20:39 Look at the source of what in this case? At what zfs_enable does? 16:20:45 so, we can look to see what runs zfs_enable 16:20:58 after a while you will know that this is going to be something in /etc/ 16:21:11 luca: on what mount point are you trying use zfs? root? 16:21:50 luca: so what we want to know, is, will `zfs_enable` load the driver, and auto-import the pool for us 16:21:51 drobban: I am trying to mount my zfs on /hdd as a sort of NAS 16:22:15 luca: and we can grep around in /etc/ and find /etc/rc.d/zfs 16:22:20 0.o 16:22:28 side note, if I mess up my /etc/fstab by adding an invalid entry will the system still boot? 16:22:45 hummm in my case it didnt :-D 16:23:08 darn it, I might have messed up something here then 16:23:34 pastbin on fstab 16:24:09 damn... whats the problem with me today... forget to type letters when I write 16:24:14 stroke? 16:24:40 luca: source is in here https://cgit.freebsd.org/src/tree/libexec/rc/rc.d/zfs 16:24:41 only ingested one beer so far 16:24:41 Title: zfs « rc.d « rc « libexec - src - FreeBSD source tree 16:25:03 nice 16:25:14 luca: the system typically boots and then either halts if it needs that filesystem for booting 16:25:29 and then you get to experience the stress of single-user mode 16:25:54 luca send your fstab to bsd.to pastebin, so we can take a look 16:26:19 I would like to, but first I need to get to fstab. Can I mount a ufs partition on linux? 16:26:25 see "alternate mode" https://www.digitalocean.com/community/tutorials/how-to-recover-from-file-system-corruption-using-freebsd-s-single-user-mode for booting in single user mode 16:26:26 Title: How To Recover from File System Corruption Using FreeBSD's Single-User Mode | DigitalOcean 16:27:03 luca: mount it manually and chroot 16:27:43 bectl is awesome if you zfs... =) 16:27:50 saved me =D 16:28:51 but then you need a working snapshot to begin with ԅ(≖‿≖ԅ) 16:28:56 I am having a bit of trouble mounting it on linux. `mount /dev/mmcblk0p2 /mnt -t ufs` is telling me "wrong fs type, bad option, bad superblock" 16:29:22 dude you in a freebsd channel now..... =D 16:29:57 yep right, sorry. Time to get a live usb I guess 16:30:22 luca: ufstype= 16:30:38 and give a valid option I guess 16:30:56 luca try just `gpart show mmcblk | nc termbin.com 9999` and paste the url in here 16:30:59 that is what man mount suggests to me on xubuntu 16:31:22 for freebsd a simple `mount /dev/mmcblk0p2 /mnt` should be sufficient 16:31:29 assuming it is a proper partition 16:31:45 dch: I think he tries to mount a ufs filesystem on linux 16:31:53 luca: but I thought this partition was a zfs one no, not a ufs? 16:32:49 =) its like a good thriller. lots twists and turns in this story 16:32:50 The root partition is ufs (I think? It's whatever the official FreeBSD download for raspberry pi offers). The external hdd is (or I am trying to make it) zfs 16:33:06 Yeah my bad, I should have really been more clear on my setup and goal 16:33:30 aah. so you are now trying to mount your sd card in the linux box? 16:33:36 Exactly 16:33:51 okey, but are you able to get into single user mode on your pi? 16:34:04 with that sd-card? 16:34:16 and anything on your monitor? 16:34:23 and see anything* 16:34:27 I haven't really tried. It's running headless. But I can find a monitor and see what happens 16:34:43 think it will help you a bit =D 16:35:35 luca: and as dch suggests. if you are able to get into the system and get network going, you can from terminal use the command 16:35:38 `gpart show mmcblk | nc termbin.com 9999` 16:36:05 it will then send the output to termbin and give you a url that you can give us. 16:36:39 and of course you can do the same thing with your fstab 16:37:00 luca no worries, we'll get there 16:37:22 One thing at a time. I just plugged in the pi into a screen and it's booting 16:37:32 =) noicceee 16:37:40 \o/ 16:38:22 it's showing a bunch of stuff and it stopped at "oid 44 (zpool), jid 0, uid 0: exited on signal 6" 16:38:32 (not too sure if that's an o in oid, weird screen) 16:38:38 ehe its a p for pid 16:38:41 but good 16:39:03 so this is the zfs driver / modules having a hissy fit 16:39:20 I didn't connect my zfs hdd. Is that why? 16:39:24 and 6 is signal ABRT (abort) 16:39:32 luca: probably 16:39:47 I'd have assumed it fail a bit more gracefully 16:40:40 Well it didn't send me into a single boot mode or a login prompt or anything, so it's possible it failed gracefully enough and hopped onto the next thing that is maybe taking forever 16:40:52 that is indeed a bonus 16:41:19 I didn't connect it to the internet either, so maybe that has something to do with this? 16:41:28 nah thats not important yet 16:42:40 it sure is taking it's time... 16:45:08 ok so I checked, and if you're mounting zpool as a non-boot filesystem, then you only need `zfs_enable=YES` in rc.conf 16:45:14 no loader.conf tunable required 16:45:52 Do you know how a correct zfs fstab entry would look like? 16:46:06 luca you dont need any entries in fstab 16:46:15 it works like this: 16:47:20 there's a file zpool.cache which lists pools the system knows about (i.e. was booted at last time) 16:47:31 its loaded via /etc/rc.d/zpool https://cgit.freebsd.org/src/tree/libexec/rc/rc.d/zpool#n23 16:47:32 Title: zpool « rc.d « rc « libexec - src - FreeBSD source tree 16:48:15 these zpools are imported 16:48:27 and each dataset in a zpool has a `mountpoint` and a `canmount` property 16:49:12 if kern.elf64.allow_wx=0 on the bhyve host, will its effect be present in a bhyve guest? 16:49:14 all datasets are mounted that have a canmount=on and a valid mountpoint automatically 16:49:47 f451: I would expect not, its a VM. good question though, maybe #hbyve will get you a decent answer 16:49:55 ty 16:50:40 dch: That sounds like an awesome feature, I'll check out zpool (I probably also need to enable it in /etc/rc.conf?) 16:51:15 zpool is the zfs you have set up 16:51:21 It's been like 10 min now and it still hasn't shown me any new stuff on screen. I tried plugging in a keyboard and it does show up as detected, but no keys work 16:53:03 hmmm.... sorry I have no advice to give you... 16:53:28 and you had a working system before you tried to activate zfs and create a zpool? 16:53:41 Yep 16:54:23 I think I'll try to get a liveusb with GhostBSD and try to recover some config files, then just burn freebsd back onto the sd card and start from scratch 16:54:46 well, its hard to help in this state 16:55:12 its hard enough when you sit at your own computer =D 16:55:17 No worries. Thanks for guiding me so far :) 16:55:37 No worries... more beer and food for me. cya all! 17:00:21 luca: if this is a rasbpi and an external usb drive it may simply not have enough power to drive it 17:00:55 What would happen if that was the case? 17:01:08 Would the system periodically crash? Would it not mount at all= 17:03:08 it could crash but more likely it wouldn't mount 17:05:20 In my case at least it didn't crash, and I could even write a couple of files 17:05:57 this whole pickle I'm in is when I either copied a corrupted file onto the disk or during copying it got corrupted, and I couldn't delete the files 17:06:26 *this whole picke I'm in _started_ when... 17:06:42 luca: didn't you say it was zfs? 17:07:08 The external hdd should be zfs if I followed the handbook correctly 17:07:23 is the system up now? 17:07:45 ummm... maybe? It's been booting for 20 min now 17:09:15 does it boot without the usb drive pluggd in? the OS is on sd card, right? 17:09:36 The USB drive isn't plugged in right now. The OS is on the sd card yes 17:11:45 whats the last thing on the screen? 17:11:56 has it ever booted 17:12:24 It was "pid 44 (zpool), jid 0, uid 0: exited on signal 6" 17:12:38 But then I plugged in a keyboard and some other stuff showed up related to that keyboard 17:12:44 hit ^c a few times 17:12:44 \ 17:13:33 And yes, the rpi booted before. I managed to install stuff, format the disk. I suspect what broke it was a bad line I added in fstab 17:13:50 it should tell you that 17:13:52 the keyboard doesn't seem to work. ctrl+c doesn't do anything, and neither does keyboard smashin 17:14:44 it should tell you that fstab is fucked 17:15:03 It's very subtle about it if that's the case 17:15:15 but might be worth going into single user mode and and double checking fstab 17:15:29 I'll try to boot into GhostBSD and remove that bad line and disable zfs. Hopefully it should let me to boot 17:15:36 if you have the patience; sometimes it's better to fix it then reinstall 17:15:44 you shouldn't need to boot into that to fix it 17:16:08 How do I boot into single user mode? 17:16:32 https://docs.freebsd.org/en/books/handbook/boot/#boot-singleuser 17:16:33 Title: Chapter 14. The FreeBSD Booting Process | FreeBSD Documentation Portal 17:17:13 Ok, I'll try that 17:17:25 you should get the boot menu to do so; i don't completely recall, i have only done freebsd on a pi a couple of times 17:18:15 It doesn't seem like it works on a raspberry pi. Pressing enter just makes it boot faster (or for me it makes it get stuck in the same place again) 17:18:54 you don't get a menu 17:19:13 mmm 17:19:16 ? 17:19:25 can I add a lagg to a bridge? 17:19:44 i see this page only applies to x86 and amd64 but i don't see the process documented for other archs 17:20:01 It's not quite a menu. It's more of a "Hit [Enter] to boot immediately, or any other key for command prompt" 17:20:09 get the command prompt 17:20:12 the command prompt isn't a bourne shell though 17:20:12 luca: yes thats it 17:20:15 and you'll want to 'boot -s' 17:20:17 I'm not sure what it is 17:20:21 press space instead then you can get a pause 17:20:30 its the loader (tm) 17:20:47 `boot -s` does the same thing as pressing enter 17:20:54 as in, it tries to boot and fails 17:20:56 dch: i don't see why you couldn't add lagg to a bridge 17:21:03 or idk if it fails. It just hangs 17:21:25 dch: do you need to load the kernel by hand at that screen? 17:21:31 luca: protip any time you don't know something, try https://man.freebsd.org/$THING like https://man.freebsd.org/loader will tell you most of the commands available then 17:21:32 Title: FreeBSD Manual Pages 17:21:33 i can't recall 17:21:43 rtprio no only if you want a different kernel 17:23:01 luca: `boot -s` should bring you along the same path as before but drop you in single user mode (before all the rc scripts do startup, and your fstab is involved) 17:23:07 but there are a few complications 17:23:25 1. this is before we decide on things like efi / serial console output 17:23:35 2. where the / system is 17:23:50 Now that you say it, yeah, it seems like there is no zfs related logs 17:23:59 is that not the approach to take, or will not address the issue 17:25:39 the loader does some probing of devices and root filesystems 17:25:51 we also want a verbose setting so we can see whats going on too 17:26:23 unfortunately I'm not familiar with rasbpi so I don't know whats need 17:27:31 Ok I enabled verbose logging 17:27:51 hopefully as it boots the last line of vrbose mode will give a clue what's going on 17:28:25 not that much new info. the last things it shows are keyboard related and wifi related 17:28:38 aah the flags are here https://man.freebsd.org/cgi/man.cgi?boot 17:28:39 Title: boot 17:28:47 also something about USB Ethernet. Maybe related to the fact I'm plugging this pi in my laptop, not a usual power source 17:28:50 so luca my rough guess is that your external usb doesnt get anough power 17:28:57 oh what pi are you on here 17:29:03 3b+ 17:29:11 if you have usb ethernet + usb storage then yes this wont work 17:29:13 not enough power 17:29:29 The drive isn't plugged in right now 17:29:39 I have the pi plugged to my laptop, and a keyboard plugged into the pi 17:29:50 "in theory" it should be enough to get me to a shell to fix it 17:29:52 laptop usb is def not enough to power a pi 17:30:12 Ok, I'll go get a better power source 17:30:14 https://raspberrypi.stackexchange.com/questions/51615/raspberry-pi-power-limitations 17:30:14 the laptop could also throttle draw at 500 ma 17:30:15 Title: Raspberry Pi Power Limitations - Raspberry Pi Stack Exchange 17:30:51 one of my complaints about the pis, i wish they had a barrel connector so they wouldn't abuse usb ports as they do 17:31:16 probably voltage drops as well 17:31:45 anyway I'm afk but once you have better power try `boot -vsD` at the console, see https://man.freebsd.org/cgi/man.cgi?boot for more details. 17:31:46 Title: boot 17:32:17 this will get you to single user mode, with verbose output hopefully to screen or console 17:33:01 then `mount -u -o rw /` to get a writeable rootfs, `vi /etc/rc.conf` to comment out your zfs_enable=YES line, and reboot 17:33:12 once you have power 17:33:32 try `zpool import -f -R /mnt -N zroot` and `zpool scrub zroot` to see if the zpool structure is ok 17:33:48 then manually mount/delete zfs datasets as you like 17:34:04 With a better power and `boot -vsD` it gets stuck again in the same place 17:34:05 they won't be mounted at this point as `-N` above skips that 17:34:35 can you boot without the USB ethernet in? 17:34:57 There is no usb ethernet now. Just hdmi, keyboard, and power straight from the wall 17:38:52 fingers crossed! 17:40:06 antranigv: hey do vnet jails do dhcp or do I need to fiddle with devrules as well? 17:41:40 Here is a picture of the logs I am seeing https://imgur.com/a/3VYXkKp 17:42:54 what the heck is bd1 17:43:06 Probably kbd1, keyboard 17:43:09 oh, it's on the kyboard 17:43:13 the screen is a bit weird 17:44:13 it should change resolutions after a bit 17:44:25 Nah, it's a TV. It's more or less normal 17:51:57 dch: you need bpf for dhcp 17:52:35 It's even mentioned in the dhclient(8) manual page. 17:55:32 debdrup: even for the vnet ones, ok. thanks. im going with static IP in the hope of finishing this before dinner 17:55:46 i guess that makes sense 17:55:50 hello! luca I think a powered usb hub can solve your issue. I know that is not exactly the solution you are waiting for, but I had to put my zigbee key on a powered usb hub in order to make in working on my rpi 3b. 17:56:14 devfs.rules to allow access to /dev/bpf* iirc 17:57:03 Lovis_IX: Thanks for the suggestion. It would probably be the best idea long term 17:58:17 luca: you're welcome, happy to help a little bit. 18:11:03 dch debdrup: If you're curious, removing that bad line from fstab and commenting some of my services from rc.conf (zfs, samba, wsdd) worked. System seems to boot fine now 18:11:35 I think I'll leave it here for tonight. I'll try to be more careful with zfs. Pinky promise 18:13:10 luca: not sure why I'm being hilighted.. 18:13:45 I didn't mean to disturb. Just wanted to update you as well on "the ending of luca's adventure" ;) 18:14:05 Was I involved with the beginning? :) 18:14:25 did you suggest fstab? 18:15:29 I don't remember suggesting that. 18:16:19 Oh sorry, that was drobban 18:16:27 Anyway, thank you all for the help 18:17:22 Clearly our nicknames are interchangable since they share at least 3 characters. :P 18:18:06 Scrolling is hard for me ;) 18:32:09 luca: i would expect on a pi, you'd only have the 2 lines for / and swap 18:32:47 The line I added was for the external zfs hdd 18:34:33 I still haven't quite figured out how to mount zfs pools/drives automatically though 18:34:47 zfs should stay mounted until zfs umount or exported 18:35:33 Even through reboots? 18:35:36 yep 18:35:57 sysrc zfs_enable=YES 18:36:09 import the pool and mount it 18:36:15 and it should persist across reboots 18:36:44 Import? Should I export it first? 18:37:22 zfs import will load the zfs module on 18:37:32 the sysrc command will ensure it's loaded at next boot 18:38:03 and if zfs is loaded, the zfs 'state' should persist, if that makes sense 18:38:52 Oh I see. Now that I ran `zfs import POOL_NAME` it mounted and everything worked 18:38:59 hopefully if I reboot it will persist 18:41:00 *zpool import POOL_NAME 18:41:09 And no, it did not persist across reboots 18:41:27 The easiest solution here is to run this at startup... somehow 18:44:39 the rc.conf line is present? 18:45:01 zfs_enable=YES is there 18:45:36 hrm 18:54:19 i have a root ufs and a pool and i don't have anything else 18:54:24 i wondr if usb is excluded 19:08:14 luca try adding `zfs_load=YES` to loader.conf too 19:08:24 I'll try 19:08:51 I don't have the file /etc/loader.conf. Should I just create it? 19:09:50 sorry thats /boot/loader.conf 19:10:03 also, `zfs list -o canmount,mountpoint,name` and check you have a mountpoint somewhere sensible 19:11:18 Yeah, one pool in /hdd and another in /hdd/share (2 zfs pools). That seems resonable, and `zpool import hdd` works fine 19:13:19 nope, zfs_load didn't work 19:15:38 dch: oh good idea 19:16:01 luca: yeah, once the system is up, no problem; just the hump of having zfs ready to go so thing swill be autoimported 19:17:56 I'm kinda tired now so I think I'll just leave this as a TODO for another time. For now I'll just `zpool import hdd` every time I need to reboot 19:50:00 I'm cant get my mouse to work with i have everything in rc.conf dbus moused and ums.ko is loaded but still no mouse movement 19:59:20 dc 19:59:22 Oops 19:59:35 dch: you do need to fiddle with devrules, but with jailer, it’s done automatically. I have to merge that branch too.