-
debdrup
dch: can you completely re-type the entry that fails in fstab, instead of copy-pasting it?
-
dch
-
VimDiesel
Title: exports.md · GitHub
-
dch
ok! found it
-
dch
in `mount -t` use `nfsv4`, for fstab, use `vers=4`
-
sn00p
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
-
antranigv
sn00p wait what
-
debdrup
sn00p: if you're writing an usb stick, you need to use the memdisk image instead
-
debdrup
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)
-
debdrup
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
-
debdrup
-
VimDiesel
Title: src - FreeBSD source tree
-
debdrup
s/normal to overload the ability/that's used to overload the normal booting method/
-
debdrup
it's 3 in the morning, and i need sleep.
-
drobban
what am I missing. trying to create a linux jail using debootstrap.
-
drobban
When I try to start the jail it seems to be unable to run the binaries installed like bin/true
-
antranigv
drobban can you share your files?
-
drobban
share?
-
drobban
=)
-
antranigv
drobban yeah, to a pastebin maybe? :)
-
drobban
brb
-
antranigv
drobban Take your time
-
nimaje
do you have that linux emu stuff loaded?
-
drobban
nimaje: think so. linux64.ko and so is loaded
-
drobban
antranigv: its the entire ubuntu file tree that is "installed"
-
drobban
antranigv: what files are of interest
-
drobban
is of* (perhaps)
-
antranigv
drobban Jails aside, can you chroot into the ubuntu root dir? and after the chroot, can you run `ls` ?
-
drobban
antranigv: Ill test
-
drobban
-
VimDiesel
Title: dpaste/ydy1 (Plain Text)
-
drobban
seems to work fine
-
antranigv
drobban okay, the linux part is fine, you have an issue with Jails; can you paste your jail.conf / jail command?
-
drobban
-
VimDiesel
Title: dpaste/FsRM (Plain Text)
-
antranigv
drobban what happens when you start the jail? does the jail command give any error?
-
drobban
antranigv: im unable to start the jail service
-
drobban
Starting jails: cannot start jail "ubuntu":
-
drobban
22
-
drobban
jail: ubuntu: getpwnam: No such file or directory
-
drobban
also complains about true command =D
-
drobban
most likely me missing some vital part of how jails and linux compat works
-
nimaje
hm, missing /etc/passwd in the jail?
-
antranigv
nimaje seems like it
-
antranigv
drobban did you check if the true command exists?
-
drobban
antranigv: it exist
-
antranigv
and if it does, then this is a /etc/passwd issue
-
antranigv
here's what you have to run
-
drobban
passwd exist aswell.
-
drobban
true command throws similar error
-
drobban
jail: ubuntu: /bin/true: failed
-
nimaje
so first test if you can do what you want with just a chroot
-
drobban
but at the same time not =D
-
antranigv
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 ;
-
antranigv
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 :)
-
antranigv
drobban basically, the passwd file that comes with Ubuntu is incomplete, you need to "fix" it.
-
drobban
antranigv: thanks for tips. tried running pwconv and grpconv, also changed the password with passwd. but still the same error
-
antranigv
drobban still getting getpwnam?
-
antranigv
I'm out of ideas :(
-
drobban
pwd_mkdb?
-
drobban
dude antranigv ! remaking passwd like your first instruction made the trick.
-
antranigv
drobban ah, looks like even after 7 years, I remember stupidities in Linux :P
-
drobban
=)
-
drobban
awesome help!
-
antranigv
does anyone know if FreeBSD's awk has a sort function? I need to sort an array
-
drobban
there is so much tech that is "new" to me. So its hard to know whats irrelevant in finding the source of the problem
-
drobban
antranigv: sort?
-
drobban
=)
-
antranigv
drobban I kinda have to do it in only awk, because it's a long script
-
bsdbandit
good morning everyone
-
antranigv
drobban oh, I guess I can call `system`
-
antranigv
bsdbandit top of the morning to you!
-
V_PauAmma_V
Where does the data to sort come from?
-
antranigv
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++} }'
-
antranigv
V_PauAmma_V I want to sort all IP addresses so I get an available IP address. kinda.
-
antranigv
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.
-
antranigv
omg, we have flua now, I can use that
-
V_PauAmma_V
Hmm, your awk code assumes a /24. If your audience is beginners, that's an unnecessary source of potential confusion IMO.
-
antranigv
V_PauAmma_V agreed! I'll just use flua, it will make things A LOT easier.
-
antranigv
I should migrate my current AWK codes in the system to flua too!
-
» V_PauAmma_V should perhaps learn some lua in his CFT.
-
antranigv
V_PauAmma_V what's a CFT?
-
V_PauAmma_V
Copious Free Time.
-
antranigv
V_PauAmma_V :D
-
ghoti
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?
-
drobban
antranigv: what are you working on?
-
drobban
ghoti: is it hibernating or just shutting down screen?
-
antranigv
drobban a jail orchestrator for both powerful users and beginners
-
ghoti
Hibernating. Power goes off, I have to wake it up with the power key. When it's off, uptime does not increase.
-
drobban
antranigv: what is it suppose to orchestrate? deployment?
-
ghoti
I'd be happy with just the screen, that makes sense, but I leave long running things.
-
drobban
_everything_ =D
-
drobban
ghoti: then I have no clue... =D
-
antranigv
drobban well, for now it does jail management via jail.conf, so ./jailer create -type epair -b bridge0 -a 10.0.0.10 www0
-
drobban
antranigv: =) interesting. does it have a public repo?
-
antranigv
drobban but soon it will be more... Dockerlike. So ./jailer build jailerfile ; ./jailer create -T myapp -a 10.0.0.10
-
antranigv
drobban yes
-
drobban
nice. will take a look
-
antranigv
-
VimDiesel
Title: GitHub - illuria/jailer at antranigv/cleanup-2023-mar
-
drobban
been looking for something like that.
-
antranigv
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)
-
antranigv
I should write a readme today. a new one
-
drobban
reading the readme right now =D
-
drobban
okey :)
-
drobban
been looking for something simple to use to spin up services as needed during dev.
-
drobban
been using bare metal jails at the moment, and Im learning while doing right now.
-
ghoti
drobban: what suggestion would you have given if it was just screen blanking? Options might be clistered..
-
drobban
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
-
ghoti
`gsettings get org.gnome.desktop.session idle-delay` gives me "uint32 0", btw
-
antranigv
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.
-
drobban
ghoti: man xset but its only related to displays afaik
-
antranigv
s/workd/world
-
ghoti
ah, yes. I feel this might be something closer to dbus.
-
drobban
antranigv: yea... VM's is something weird business use to keep some old obscure system alive, not to do sane management... In my oppinion.
-
drobban
*opinion
-
drobban
99% of all people I have encountered that uses VMs in the "cloud" is doing that in an heavily Microsoft invested environment.
-
antranigv
DIE MS DIE
-
drobban
kind of.... They eventually will.... some bullshit malware will kill it in time.
-
drobban
ghoti: have no experience in gnome... but perhaps man acpi might be to some help here?
-
ghoti
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..
-
drobban
ghoti: I assume powerlevels is reporting sane values?
-
ghoti
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.
-
drobban
ghoti: I assume the tools in gnome is using basic functionality in the system rather then implementing their own stuff?
-
ghoti
who knows.. THere are Linux people involved. ;)
-
drobban
:O
-
drobban
:-D
-
drobban
antranigv: the tool looks promising... It seems to be what I have been looking for.
-
drobban
antranigv: will it include any hooks for "recipes" - like stuff to install and so on?
-
ghoti
I do jail management by hand at the moment, but I use a tool for bhyve.
-
drobban
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.
-
drobban
bhyve? the name sounds familiar.
-
ghoti
FreeBSD's native hypervisor.
-
antranigv
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
-
drobban
ghoti: okey yet another VM management system?
-
antranigv
drobban this is actually an open-source port of what we built internally
-
drobban
antranigv: freaking awesome!
-
ghoti
drobban: an alternative to virtualbox or vmware.. But native. It's very good.
-
antranigv
drobban our current commercial version can manage jails on multiple machines.
-
» f451 votes +1 for bhyve vms
-
drobban
ghoti: okey! perhaps i will try it out when need for a vm present itself =)
-
antranigv
OMG IT WORKED
-
ghoti
I run a bunch of Linux boxes using it already. Great for when you can't use a jail. :)
-
drobban
antranigv: will be monitoring the repo closely =D
-
drobban
antranigv: congrats. =)
-
ghoti
drobban: for management, I recommend vm-bhyve (in ports)
-
drobban
=)
-
f451
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 :)
-
drobban
can imagine =)
-
f451
own ip own firewall etc etc
-
f451
one thing ive not done is host windows server as guest in bhyve but it's had that capability for a while
-
f451
i don't use any management sw for bhyve, just screen(8) and some simple scripts
-
drobban
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.
-
ghoti
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. ;)
-
drobban
=)
-
f451
i just found it easier when learning, to run it all from scratch firstly.
-
ghoti
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?
-
ghoti
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..
-
drobban
ghoti: well, isnt that what most people use docker to do?
-
ghoti
I don't know what people do with docker. I haven't used it.
-
drobban
sure there is fancy parts of image reuse and so on. But who benefits from that part in any major way?
-
drobban
ghoti: I used docker to setup dev environments while doing local work and to setup automated deployment.
-
drobban
and automated "testing". spinns up new image image with my source and takes a test run and report back any problems
-
ghoti
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..
-
ghoti
Huh, we're apparently coming up to Docker's 10 year birthday, according to wikipedia.
-
drobban
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
-
ghoti
What platforms? Do you need a shim?
-
drobban
think I have been a docker user since 2015 or something like that.
-
antranigv
-
drobban
just started using Fly.io. they seem nice
-
drobban
their tool flyctl is really awesome, until I tried to use it in FreeBSD =/
-
drobban
-
antranigv
drobban containers should be as easy as that. just run create and done
-
drobban
antranigv: agree. create and slaughter on demand.
-
debdrup
antranigv: still using 127.0.0.0/8 :(
-
antranigv
debdrup yup. now writing one for epair, so the user can choose defaults
-
debdrup
antranigv: what about netgraph? :P
-
debdrup
/usr/share/examples/jails/ has an example
-
antranigv
debdrup I'll be integrating jng this week.
-
antranigv
debdrup regarding 127/8, users can do `jailer default nettype vnet` and it will assign an IP using VNET style
-
antranigv
debdrup altho you can also do `jailer default addr dhcp` so to use DHCP :)
-
luca
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?
-
dch
luca: whats in the folder? `ls -AFGhl Folder/` should show you if its simply permissions.
-
dch
normally start with sudo and if necessary use `chflags -R 0 / ..`
-
luca
"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)
-
dch
but it could also be mountpoints, processes, file handles etc
-
luca
I highly doubt it's processes or mountpoints or file handles. It's an external HDD I just mounted and formated with zfs
-
luca
I was copying some files onto it, then cancled and wanted to delete what it had copied
-
dch
luca: use lsof in ports to see
-
dch
drobban: I have a custom jail script
git.io/JfHOu to do this
-
VimDiesel
Title: see
git.sr.ht/~dch/diy-jails for some background · GitHub
-
dch
and a small zfs dataset that I clone with base files in it
-
dch
drobban: erm, to generate ephemeral jails for doing work in. no jail.conf files, just a tmux and zfs magic.
-
epony
and nullfs
-
epony
instead of zfs
-
luca
dch: How do I use lsof and for what?
-
» debdrup mutters something about fstat(1)
-
dch
debdrup: that too if you know what the file is, yeah?
-
debdrup
It works on directories too though.
-
dch
`lsof` In the absence of any options, lsof lists all open files belonging to all active processes.
-
debdrup
fstat also lists all open files though?
-
dch
debdrup: lsof is probably the only linuxism I still have
-
luca
I installed it with `doas pkg install lsof`. Do you know by any chance where it is?
-
dch
`pkg list lsof |grep bin`
-
luca
Thanks!
-
dch
or `whereis lsof` also works
-
luca
`lsof /hdd/` (/hdd being where my external hard disk is mounted to) returns nothing (error code 1)
-
ghoti
drobban: follow-up on that hibernate issue, in case you're interested...
-
ghoti
`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.
-
dch
debdrup: how do you get fstat to return the filenames?
-
dch
luca
man.freebsd.org/cgi/man.cgi?errno tells you what the return code means.
-
VimDiesel
Title: errno
-
debdrup
dch: Don't remember, sorry
-
dch
debdrup: I think thats why I still use lsof
-
ghoti
drobban: I found some interesting jail-provisioning ideas in
github.com/ployground/bsdploy as well, but I don't think I would use the project itself.
-
VimDiesel
Title: GitHub - ployground/bsdploy: BSDploy is a tool to provision, configure and maintain FreeBSD jails.
-
luca
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
-
dch
luca: so `doas lsof` returns nothing, just an error?
-
luca
Yeah pretty much
-
luca
Also "lsof: WARNING: compiled for FreeBSD release 13.1-RELEASE-p7; this is 13.1-RELEASE-p3.", but I doubt it's relevant
-
luca
(I used pkg, not ports)
-
luca
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
-
luca
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
-
V_PauAmma_V
rehash
-
V_PauAmma_V
But you shouldn't need to. Check your PATH?
-
drobban
dch: you do? nice! Ill have a look
-
drobban
dch: are you a fan of fish?
-
dch
big fan
-
dch
for interactive small stuff, posix sh for scripts
-
drobban
dch: do you use it as you daily driver in term as well?
-
dch
luca: something is odd here, lsof should return 100s of entries
-
dch
drobban: yep 100%
-
luca
V_PauAmma_V: rehash did it. Thanks :D
-
drobban
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.
-
luca
dch: lsof by itself returns quite a lot of entries (when ran as root), just not when pointed to /hdd
-
drobban
dch: perhaps I should try it out then... been sceptic -- mostly because im conservative =D
-
drobban
ookey... im already sold.... the autocompletion suggestions are awesome =D
-
drobban
dch: you dont happen to be user of fly.io's services are you?
-
drobban
ghoti: did it help -- the suspen issue that is =)
-
drobban
suspend issue*
-
luca
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?
-
drobban
fstab?
-
dch
luca: you need to provide a bit more info about what you've tried, and not just assume we can read your mind
-
dch
e.g.
-
luca
Sorry for not being clear. All I tried was `zfs_enable=YES` and a restart.
-
dch
I have `zfs_load=YES` in loader.conf, and `zfs_enable=YES` in rc.conf
-
dch
I boot off ufs, and I have a dataset zroot/stuff with property mountpoint=/stuff
-
luca
What is zfs_load? I am following the handbook[1] and it doesn't mention it at all. [1]:
docs.freebsd.org/en/books/handbook/zfs
-
VimDiesel
Title: Chapter 21. The Z File System (ZFS) | FreeBSD Documentation Portal
-
drobban
dch: I only have zfs_enable in my system :-/
-
dch
luca early stage kernel drivers are typically enabled with a "tunable" in /boot/loader.conf like `zfs_load="YES"`
-
dch
in my case I boot off zfs, so I need this
-
drobban
hummm so do I
-
dch
i honestly dont know if you can add just zfs_enable=YES in /etc/rc.conf and have it auto-mount datasets
-
dch
i havent had serious non-zroot booting systems since 9.3
-
drobban
dch: I have zfs_load in /boot/loader.conf
-
dch
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
-
dch
luca: because freebsd is all open source we encourage you to ... look .. at the source!
-
dch
this gets easier over time
-
dch
and I should also do it more often too
-
luca
Look at the source of what in this case? At what zfs_enable does?
-
dch
so, we can look to see what runs zfs_enable
-
dch
after a while you will know that this is going to be something in /etc/
-
drobban
luca: on what mount point are you trying use zfs? root?
-
dch
luca: so what we want to know, is, will `zfs_enable` load the driver, and auto-import the pool for us
-
luca
drobban: I am trying to mount my zfs on /hdd as a sort of NAS
-
dch
luca: and we can grep around in /etc/ and find /etc/rc.d/zfs
-
drobban
0.o
-
luca
side note, if I mess up my /etc/fstab by adding an invalid entry will the system still boot?
-
drobban
hummm in my case it didnt :-D
-
luca
darn it, I might have messed up something here then
-
drobban
pastbin on fstab
-
drobban
damn... whats the problem with me today... forget to type letters when I write
-
drobban
stroke?
-
dch
-
drobban
only ingested one beer so far
-
VimDiesel
Title: zfs « rc.d « rc « libexec - src - FreeBSD source tree
-
drobban
nice
-
dch
luca: the system typically boots and then either halts if it needs that filesystem for booting
-
dch
and then you get to experience the stress of single-user mode
-
drobban
luca send your fstab to bsd.to pastebin, so we can take a look
-
luca
I would like to, but first I need to get to fstab. Can I mount a ufs partition on linux?
-
dch
-
VimDiesel
Title: How To Recover from File System Corruption Using FreeBSD's Single-User Mode | DigitalOcean
-
drobban
luca: mount it manually and chroot
-
drobban
bectl is awesome if you zfs... =)
-
drobban
saved me =D
-
drobban
but then you need a working snapshot to begin with ԅ(≖‿≖ԅ)
-
luca
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"
-
drobban
dude you in a freebsd channel now..... =D
-
luca
yep right, sorry. Time to get a live usb I guess
-
drobban
luca: ufstype=
-
drobban
and give a valid option I guess
-
dch
luca try just `gpart show mmcblk | nc termbin.com 9999` and paste the url in here
-
drobban
that is what man mount suggests to me on xubuntu
-
dch
for freebsd a simple `mount /dev/mmcblk0p2 /mnt` should be sufficient
-
dch
assuming it is a proper partition
-
drobban
dch: I think he tries to mount a ufs filesystem on linux
-
dch
luca: but I thought this partition was a zfs one no, not a ufs?
-
drobban
=) its like a good thriller. lots twists and turns in this story
-
luca
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
-
luca
Yeah my bad, I should have really been more clear on my setup and goal
-
drobban
aah. so you are now trying to mount your sd card in the linux box?
-
luca
Exactly
-
drobban
okey, but are you able to get into single user mode on your pi?
-
drobban
with that sd-card?
-
drobban
and anything on your monitor?
-
drobban
and see anything*
-
luca
I haven't really tried. It's running headless. But I can find a monitor and see what happens
-
drobban
think it will help you a bit =D
-
drobban
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
-
drobban
`gpart show mmcblk | nc termbin.com 9999`
-
drobban
it will then send the output to termbin and give you a url that you can give us.
-
drobban
and of course you can do the same thing with your fstab
-
dch
luca no worries, we'll get there
-
luca
One thing at a time. I just plugged in the pi into a screen and it's booting
-
drobban
=) noicceee
-
dch
\o/
-
luca
it's showing a bunch of stuff and it stopped at "oid 44 (zpool), jid 0, uid 0: exited on signal 6"
-
luca
(not too sure if that's an o in oid, weird screen)
-
dch
ehe its a p for pid
-
dch
but good
-
dch
so this is the zfs driver / modules having a hissy fit
-
luca
I didn't connect my zfs hdd. Is that why?
-
dch
and 6 is signal ABRT (abort)
-
dch
luca: probably
-
dch
I'd have assumed it fail a bit more gracefully
-
luca
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
-
dch
that is indeed a bonus
-
luca
I didn't connect it to the internet either, so maybe that has something to do with this?
-
dch
nah thats not important yet
-
luca
it sure is taking it's time...
-
dch
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
-
dch
no loader.conf tunable required
-
luca
Do you know how a correct zfs fstab entry would look like?
-
dch
luca you dont need any entries in fstab
-
dch
it works like this:
-
dch
there's a file zpool.cache which lists pools the system knows about (i.e. was booted at last time)
-
dch
-
VimDiesel
Title: zpool « rc.d « rc « libexec - src - FreeBSD source tree
-
dch
these zpools are imported
-
dch
and each dataset in a zpool has a `mountpoint` and a `canmount` property
-
f451
if kern.elf64.allow_wx=0 on the bhyve host, will its effect be present in a bhyve guest?
-
dch
all datasets are mounted that have a canmount=on and a valid mountpoint automatically
-
dch
f451: I would expect not, its a VM. good question though, maybe #hbyve will get you a decent answer
-
f451
ty
-
luca
dch: That sounds like an awesome feature, I'll check out zpool (I probably also need to enable it in /etc/rc.conf?)
-
drobban
zpool is the zfs you have set up
-
luca
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
-
drobban
hmmm.... sorry I have no advice to give you...
-
drobban
and you had a working system before you tried to activate zfs and create a zpool?
-
luca
Yep
-
luca
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
-
drobban
well, its hard to help in this state
-
drobban
its hard enough when you sit at your own computer =D
-
luca
No worries. Thanks for guiding me so far :)
-
drobban
No worries... more beer and food for me. cya all!
-
dch
luca: if this is a rasbpi and an external usb drive it may simply not have enough power to drive it
-
luca
What would happen if that was the case?
-
luca
Would the system periodically crash? Would it not mount at all=
-
rtprio
it could crash but more likely it wouldn't mount
-
luca
In my case at least it didn't crash, and I could even write a couple of files
-
luca
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
-
luca
*this whole picke I'm in _started_ when...
-
rtprio
luca: didn't you say it was zfs?
-
luca
The external hdd should be zfs if I followed the handbook correctly
-
rtprio
is the system up now?
-
luca
ummm... maybe? It's been booting for 20 min now
-
rtprio
does it boot without the usb drive pluggd in? the OS is on sd card, right?
-
luca
The USB drive isn't plugged in right now. The OS is on the sd card yes
-
rtprio
whats the last thing on the screen?
-
rtprio
has it ever booted
-
luca
It was "pid 44 (zpool), jid 0, uid 0: exited on signal 6"
-
luca
But then I plugged in a keyboard and some other stuff showed up related to that keyboard
-
rtprio
hit ^c a few times
-
rtprio
\
-
luca
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
-
rtprio
it should tell you that
-
luca
the keyboard doesn't seem to work. ctrl+c doesn't do anything, and neither does keyboard smashin
-
rtprio
it should tell you that fstab is fucked
-
luca
It's very subtle about it if that's the case
-
rtprio
but might be worth going into single user mode and and double checking fstab
-
luca
I'll try to boot into GhostBSD and remove that bad line and disable zfs. Hopefully it should let me to boot
-
rtprio
if you have the patience; sometimes it's better to fix it then reinstall
-
rtprio
you shouldn't need to boot into that to fix it
-
luca
How do I boot into single user mode?
-
rtprio
-
VimDiesel
Title: Chapter 14. The FreeBSD Booting Process | FreeBSD Documentation Portal
-
luca
Ok, I'll try that
-
rtprio
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
-
luca
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)
-
rtprio
you don't get a menu
-
dch
mmm
-
rtprio
?
-
dch
can I add a lagg to a bridge?
-
rtprio
i see this page only applies to x86 and amd64 but i don't see the process documented for other archs
-
luca
It's not quite a menu. It's more of a "Hit [Enter] to boot immediately, or any other key for command prompt"
-
rtprio
get the command prompt
-
luca
the command prompt isn't a bourne shell though
-
dch
luca: yes thats it
-
rtprio
and you'll want to 'boot -s'
-
luca
I'm not sure what it is
-
dch
press space instead then you can get a pause
-
dch
its the loader (tm)
-
luca
`boot -s` does the same thing as pressing enter
-
luca
as in, it tries to boot and fails
-
rtprio
dch: i don't see why you couldn't add lagg to a bridge
-
luca
or idk if it fails. It just hangs
-
rtprio
dch: do you need to load the kernel by hand at that screen?
-
dch
luca: protip any time you don't know something, try
man.freebsd.org/$THING like
man.freebsd.org/loader will tell you most of the commands available then
-
VimDiesel
Title: FreeBSD Manual Pages
-
rtprio
i can't recall
-
dch
rtprio no only if you want a different kernel
-
dch
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)
-
dch
but there are a few complications
-
dch
1. this is before we decide on things like efi / serial console output
-
dch
2. where the / system is
-
luca
Now that you say it, yeah, it seems like there is no zfs related logs
-
rtprio
is that not the approach to take, or will not address the issue
-
dch
the loader does some probing of devices and root filesystems
-
dch
we also want a verbose setting so we can see whats going on too
-
dch
unfortunately I'm not familiar with rasbpi so I don't know whats need
-
luca
Ok I enabled verbose logging
-
rtprio
hopefully as it boots the last line of vrbose mode will give a clue what's going on
-
luca
not that much new info. the last things it shows are keyboard related and wifi related
-
dch
-
VimDiesel
Title: boot
-
luca
also something about USB Ethernet. Maybe related to the fact I'm plugging this pi in my laptop, not a usual power source
-
dch
so luca my rough guess is that your external usb doesnt get anough power
-
dch
oh what pi are you on here
-
luca
3b+
-
dch
if you have usb ethernet + usb storage then yes this wont work
-
dch
not enough power
-
luca
The drive isn't plugged in right now
-
luca
I have the pi plugged to my laptop, and a keyboard plugged into the pi
-
luca
"in theory" it should be enough to get me to a shell to fix it
-
rtprio
laptop usb is def not enough to power a pi
-
luca
Ok, I'll go get a better power source
-
dch
-
rtprio
the laptop could also throttle draw at 500 ma
-
VimDiesel
Title: Raspberry Pi Power Limitations - Raspberry Pi Stack Exchange
-
rtprio
one of my complaints about the pis, i wish they had a barrel connector so they wouldn't abuse usb ports as they do
-
dch
probably voltage drops as well
-
dch
anyway I'm afk but once you have better power try `boot -vsD` at the console, see
man.freebsd.org/cgi/man.cgi?boot for more details.
-
VimDiesel
Title: boot
-
dch
this will get you to single user mode, with verbose output hopefully to screen or console
-
dch
then `mount -u -o rw /` to get a writeable rootfs, `vi /etc/rc.conf` to comment out your zfs_enable=YES line, and reboot
-
dch
once you have power
-
dch
try `zpool import -f -R /mnt -N zroot` and `zpool scrub zroot` to see if the zpool structure is ok
-
dch
then manually mount/delete zfs datasets as you like
-
luca
With a better power and `boot -vsD` it gets stuck again in the same place
-
dch
they won't be mounted at this point as `-N` above skips that
-
dch
can you boot without the USB ethernet in?
-
luca
There is no usb ethernet now. Just hdmi, keyboard, and power straight from the wall
-
dch
fingers crossed!
-
dch
antranigv: hey do vnet jails do dhcp or do I need to fiddle with devrules as well?
-
luca
Here is a picture of the logs I am seeing
imgur.com/a/3VYXkKp
-
rtprio
what the heck is bd1
-
luca
Probably kbd1, keyboard
-
rtprio
oh, it's on the kyboard
-
luca
the screen is a bit weird
-
rtprio
it should change resolutions after a bit
-
luca
Nah, it's a TV. It's more or less normal
-
debdrup
dch: you need bpf for dhcp
-
debdrup
It's even mentioned in the dhclient(8) manual page.
-
dch
debdrup: even for the vnet ones, ok. thanks. im going with static IP in the hope of finishing this before dinner
-
dch
i guess that makes sense
-
Lovis_IX
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.
-
debdrup
devfs.rules to allow access to /dev/bpf* iirc
-
luca
Lovis_IX: Thanks for the suggestion. It would probably be the best idea long term
-
Lovis_IX
luca: you're welcome, happy to help a little bit.
-
luca
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
-
luca
I think I'll leave it here for tonight. I'll try to be more careful with zfs. Pinky promise
-
debdrup
luca: not sure why I'm being hilighted..
-
luca
I didn't mean to disturb. Just wanted to update you as well on "the ending of luca's adventure" ;)
-
debdrup
Was I involved with the beginning? :)
-
luca
did you suggest fstab?
-
debdrup
I don't remember suggesting that.
-
luca
Oh sorry, that was drobban
-
luca
Anyway, thank you all for the help
-
debdrup
Clearly our nicknames are interchangable since they share at least 3 characters. :P
-
luca
Scrolling is hard for me ;)
-
rtprio
luca: i would expect on a pi, you'd only have the 2 lines for / and swap
-
luca
The line I added was for the external zfs hdd
-
luca
I still haven't quite figured out how to mount zfs pools/drives automatically though
-
rtprio
zfs should stay mounted until zfs umount or exported
-
luca
Even through reboots?
-
rtprio
yep
-
rtprio
sysrc zfs_enable=YES
-
rtprio
import the pool and mount it
-
rtprio
and it should persist across reboots
-
luca
Import? Should I export it first?
-
rtprio
zfs import will load the zfs module on
-
rtprio
the sysrc command will ensure it's loaded at next boot
-
rtprio
and if zfs is loaded, the zfs 'state' should persist, if that makes sense
-
luca
Oh I see. Now that I ran `zfs import POOL_NAME` it mounted and everything worked
-
luca
hopefully if I reboot it will persist
-
luca
*zpool import POOL_NAME
-
luca
And no, it did not persist across reboots
-
luca
The easiest solution here is to run this at startup... somehow
-
rtprio
the rc.conf line is present?
-
luca
zfs_enable=YES is there
-
rtprio
hrm
-
rtprio
i have a root ufs and a pool and i don't have anything else
-
rtprio
i wondr if usb is excluded
-
dch
luca try adding `zfs_load=YES` to loader.conf too
-
luca
I'll try
-
luca
I don't have the file /etc/loader.conf. Should I just create it?
-
dch
sorry thats /boot/loader.conf
-
dch
also, `zfs list -o canmount,mountpoint,name` and check you have a mountpoint somewhere sensible
-
luca
Yeah, one pool in /hdd and another in /hdd/share (2 zfs pools). That seems resonable, and `zpool import hdd` works fine
-
luca
nope, zfs_load didn't work
-
rtprio
dch: oh good idea
-
rtprio
luca: yeah, once the system is up, no problem; just the hump of having zfs ready to go so thing swill be autoimported
-
luca
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
-
sn00p
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
-
antranigv
dc
-
antranigv
Oops
-
antranigv
dch: you do need to fiddle with devrules, but with jailer, it’s done automatically. I have to merge that branch too.