Date: Mon, 5 Feb 2018 13:17:51 -0700 From: John Nielsen <lists@jnielsen.net> To: Maurizio Vairani <maurizio1018@gmail.com> Cc: freebsd-current <freebsd-current@freebsd.org>, Daisuke Aoyama <aoyama@peach.ne.jp> Subject: Re: Fatal trap 12 booting FreeBSD-CURRENT via isboot kernel module. Message-ID: <5F8F604B-BDD5-44EE-A83C-5D37ED5199EB@jnielsen.net> In-Reply-To: <CAN0zgYWY0QqjHNfnVmOv%2B06H8qAvjKu0N7qvSMgcUo7vi6Bt-A@mail.gmail.com> References: <CAN0zgYXfKjKo3CjjfbEX7oSrd2NXqU6kmSXy__OVPr0y3R2Log@mail.gmail.com> <3E242843-7D43-4A36-A448-E4B0DACB2AB4@jnielsen.net> <CAN0zgYWY0QqjHNfnVmOv%2B06H8qAvjKu0N7qvSMgcUo7vi6Bt-A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Feb 4, 2018, at 2:50 AM, Maurizio Vairani <maurizio1018@gmail.com> = wrote: >=20 > 2018-01-29 18:38 GMT+01:00 John Nielsen <lists@jnielsen.net>: > [ resending from correct email address ] >=20 >> On Jan 29, 2018, at 6:05 AM, Maurizio Vairani = <maurizio1018@gmail.com> wrote: >>=20 >> I am running >> # uname >> -a >>=20 >> FreeBSD 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328383: Thu Jan 25 = 04:48:52 >> UTC 2018 = root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC >> amd64 >>=20 >> After compiling the kernel module as discussed in this thread : >> = https://lists.freebsd.org/pipermail/freebsd-current/2018-January/068272.ht= ml >>=20 >> I can boot FreeBSD via iSCSI using iPXE. But when the isboot, the = iSCSI >> boot driver version 0.2.13, starts I receive a panic: >> = https://mega.nz/#!tkVwBBKA!PUj14-Za6KCNaoo9hxuXORRLQoWkb4LMvTdUA1BorD4 >>=20 >> Any idea? >=20 > Bummer!=20 >=20 > Aoyama-san- >=20 > Are you still maintaining isboot? Can you help debug this issue on = FreeBSD 12-CURRENT? >=20 > Once we get it working I will update the port with whatever is needed = and send you the patches in case you'd like to cut a new release. >=20 > Thank you! >=20 > I have solved the issue changing the function isboot_ifup() in the = source file isboot.c. Nice work, thank you! I'll put the below together with the necessary = changes to iscsi.c and update the port. If you could re-install from the = port at that point as a further test/sanity check that would be great. > static int > isboot_ifup(struct ifnet *ifp) > { > struct socket *so; > struct ifreq ifr; > struct thread *td; > int error; >=20 > td =3D curthread; > error =3D socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td); > if (error) { > printf("%s: socreate, error=3D%d\n", __func__, error); > return (error); > } >=20 > /* boot NIC */ > memset(&ifr, 0, sizeof(ifr)); > strlcpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); >=20 > /* set IFF_UP */ > error =3D ifioctl(so, SIOCGIFFLAGS, (caddr_t)&ifr, td); > if (error) { > printf("%s: ifioctl SIOCGIFFLAGS, error=3D%d\n", __func__, = error); > return (error); > } >=20 > ifr.ifr_flags |=3D IFF_UP; > error =3D ifioctl(so, SIOCSIFFLAGS, (caddr_t)&ifr, td); > if (error) { > printf("%s, ifioctl SIOCSIFFLAGS, error=3D%d\n", __func__, = error); > return (error); > } > soclose(so); > return (0); > } >=20 > I have added a socket in the ifioctl() call as in the = /usr/src/sys/nfs/bootp_subr.c source. > Please let me know if you prefer a patch. > -- > Regards, > Maurizio
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5F8F604B-BDD5-44EE-A83C-5D37ED5199EB>