Alexander Leidinger

Just another weblog

Jul
26

Essen Hack­thon 2015 — last day status

I com­mit­ted the 64bit sup­port for the linux base ports (dis­abled by default, check the com­mit mes­sage), but this broke the INDEX build. Port­mgr was faster than me to revert it. All errors are mine. I think most of the work is done, I just need to find out what the cor­rect way is to han­dle this make/fmake dif­fer­ence (mal­formed conditional).

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…
Share/Save

Jul
26

Essen Hackathon Sta­tus report — 2nd day

I had a look at the open PR’s for a quick-win and found one where the depen­den­cies where incom­plete. Fixed.

Then I reviewed Alan Jude’s patch for 64bit linux_base-c6 ports (on amd64). Looks good so far. Just a few minor issues. I took the time to get famil­iar with reviews.FreeBSD.org and the arc com­mand line tool, applied the patch to my source tree, worked a while on merge-conflicts, added some minor changes, and val­i­dated the down­load of the 32bit RPM’s of the linux_base-c6 port.

In between I also discussed/reviewed some fixes for docs with Dru, signed some PGP keys, and served as a source for a funny pic­ture (at least what geeks/nerds con­sider a funny pic­ture). I also checked how to allow multi-cast in jails. There is a PR with a patch inside, but it’s IPv6 only. I did some­thing sim­i­lar for IPv4 and com­piled a ker­nel. No com­pile time issues, but as the sys­tem where I can eas­ily test this is at home, I pre­fer to be in front of the box in case it pan­ics (that tells some­thing about my con­fi­dence level of my patch… no idea if what I do there is actu­ally cor­rect… ENOCLUE about the net­work code in the kernel).

TODO for the last day of the Hackathon:

  • val­i­date all RPM’s (down­load / dis­tinfo) of the ports which changed
  • val­i­date the install/deinstall of the 32bit ver­sion of the ports for regression
  • val­i­date the 64bit install/deinstall for at least the linux base port (more if time per­mits tomorrow)
GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…

Jul
24

Essen Hackathon sta­tus report — 1st day/evening

The Essen Hackathon 2015 starts. More or less around 6pm peo­ple started to show up (includ­ing myself). The social­iz­ing ses­sion (BBQ) had some funny/interesting sto­ries, and pro­vided already some inter­est­ing top­ics to have a closer look at.

Pos­si­ble can­di­dates where I can pro­vide some input are around DTrace: How to use it (but prob­a­bly Sean Chit­ten­den has some much more inter­est­ing DTrace things to show) and how to add SDT probes to the ker­nel.

On the ports side I want to get some insight into the USES frame­work, to see if it may be easy to con­vert the lin­ux­u­la­tor ports to it or not. Maybe I can also have a deeper look into patches for the 64bit side of the linux_base ports.

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…

Jun
01

Gain­ing space on Android after ART->Dalvik switch (root access required)

I (still) use a Nexus S phone. I am using Cyanogen­mod on it. After an arti­cle in a com­puter mag­a­zine I decided to give the ART-runtime a try instead of the default Dalvic-runtime. Unfor­tu­nately I do not have enough free space free (and all what I can is moved to the USB stor­age already) to really use the ART-runtime.

After switch­ing back to the Dalvic-runtime, I had only 2/3 of the pre­vi­ously avail­able space free. After a lit­tle bit of look­ing around I found /data/dalvik-cache. I deleted with a file man­ager the con­tent of the direc­tory (you will get some “app crashed/died” mes­sages) and rebooted the phone (this is not the same as for­mat­ting the cache par­ti­tion in the recov­ery system).

Dur­ing boot it pop­u­lated the direc­tory again and now I have more than 4/3 of free space on the inter­nal storage.

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…

Dec
03

Updat­ing FreeBSD 8.2 (or 9.x) to 10 (beta4)

This is a lit­tle descrip­tion how I remotely (no con­sole, booted into multi-user dur­ing update, no exter­nal ser­vices like jails/httpd/… run­ning) updated a FreeBSD 8.2 to 10 (beta4) from source. This should also work when updat­ing from FreeBSD 9.x. Note, I had already switched to ATA_CAM on 8.2, so not instruc­tions for the name change of the ata devices. No IPv6, WLAN or CARP is in use here, so changes which are needed in this area are not cov­ered. Read UPDATING care­fully, there are a lot of changes between major releases.

What I did:

  • update /usr/src
  • make build­world
  • replace “make ” in /usr/src/Makefile.inc1 with ${MAKE} (two times, one for “VERSION”, one for “BRANCH”)
  • ver­ify ker­nel con­fig for changes needed (run­ning “con­fig MyK­er­nel” in /usr/src/sys/YourArch/conf/ helps to iden­tify syn­tax prob­lems), sorry I didn’t take notes, but I diffed the old and the new GENERIC con­fig and added/removed accord­ing to my interests
  • /usr/obj/…/src/usr.bin/bmake/make build­ker­nel KERNCONF=MyKernel
  • /usr/obj/…/src/usr.bin/bmake/make instal­lk­er­nel KERNCONF=MyKernel KODIR=/boot/kernel.10
  • merge­mas­ter –p
  • /usr/obj/…/src/usr.bin/bmake/make install­world DESTDIR=/somewhere/test
  • mkdir /root/net10; cp /somewhere/test/rescue/ifconfig /somewhere/test/rescue/route /root/net10
  • cre­ate the file /etc/rc.10update with:
    case $(uname –r) in
    8.2*)
            MYIFCONFIG=/sbin/ifconfig
            MYROUTE=/sbin/route
            ;;
    10*)
            MYIFCONFIG=/root/net10/ifconfig
            MYROUTE=/root/net10/route
            ;;
    esac
    export MYIFCONFIG
    export MYROUTE
  • change the files (stu­pid approach: grep for “ifcon­fig” and “route” in /etc/rc.d to iden­tify files which need to change, I skipped files which I iden­ti­fied as not needed in my case, if you use pf/IPv6/bridge/…, you may have to change some more files) /etc/rc.d/auto_linklocal /etc/rc.d/defaultroute /etc/rc.d/netif /etc/rc.d/netwait /etc/rc.d/routing: add “. /etc/rc.10update” at the end of the block with “. /etc/rc.subr”, change the “ifconfig”-command to ${MYIFCONFIG}, change the “route”-command to ${MYROUTE}
  • change /etc/net­work.subr: add “. /etc/rc.10update” before the first func­tion, change the “ifconfig”-command to ${MYIFCONFIG}, change the “route”-command to ${MYROUTE}
  • make sure that the changes you made are 100% cor­rect, rather triple-check than to not check at all (you will be locked out if they are not 100% OK)
  • stop any jails and make sure they do not restart at boot
  • deac­ti­vate the gmir­ror of the root-fs, if there is one (it is maybe eas­ier to ask a remote hand to swap the boot order in case of problems)
  • here you could just a reboot of the server to come back to your cur­rent OS ver­sion, so make sure that the mod­i­fi­ca­tions in /etc did not cause any prob­lems with the old ver­sion (in case you see prob­lems with the v10 ker­nel), but if you do not have a remote con­sole to single-user mode you have no chance to directly fix the prob­lem (risk mit­i­ga­tion described above), no mat­ter which ver­sion of the ker­nel you boot
  • next­boot –k kernel.10
  • shut­down –r now
  • login
  • check dmesg
  • optional: mv /boot/kernel /boot/kernel.8
  • make instal­lk­er­nel KERNCONF=MyKernel
    to have a v10 /boot/kernel
  • make install­world
  • merge­mas­ter
  • make delete-old
  • rm –r /etc/rc.10update /root/net10
  • change rc.conf: add “inet” in ifconfig-aliases
  • review sysctl.conf for out­dated entries
  • shut­down –r now
  • optional: rm –r /boot/kernel.10
  • enable jails again (or later… updat­ing jails is not described here)
  • activate/resync mirror(s)
  • rebuild all ports (atten­tion: new pkg system)
  • make delete-old-libs
  • reboot again to make sure every­thing is OK after the port-rebuild and removal of old libs (a console.log (syslog.conf) helps here
GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…