Affichage des articles dont le libellé est systemd. Afficher tous les articles
Affichage des articles dont le libellé est systemd. Afficher tous les articles

dimanche 1 mai 2016

systemd-nspawn and noexec flag

Trying to create customized archlinux iso (archiso, releng) I hit a lot of issues, most of them 'execv? failed, permission denied'.

Later on, just trying to run a systemd-nspawn container, again, execv permission. Boot fails.

Googling didn't get me very far, except to broaden the scope from systemd-nspawn to something more general. I try to run a binary (ls) from the container subtree. Permission denied. I md5sum container/.../ls and get the same md5 as the main linux install I'm running. I thought it could be the wrong architecture or a different binary. So if two binaries refuse to run .. maybe they're treated differently from the host OS. I then realize that my container and custom archiso were on a mounted drive.

mount | grep <mountpoint> -&gt; mount .... (...,noexec, ...)

EUREKA.

udevil mounts this drive with a lot of protective flags. udevil unmount <mountpoint>; sudo mount <device> /mnt; <container>/ ... /ls works.

systemd-nspawn -b -D <container> works.

Thanks to #archlinux for nothing (beside rubber ducking ;)</container></container></device></mountpoint></mountpoint>

mercredi 20 avril 2016

usb key replicate

* usb key duplicate

* partition table

  manual cgdisk

* rsync partitions

  rsync -auv --progress <source></source> <target>

* rsync caveat : hard links, sparse file

  warning: some sparse files may have huge virtual size
    rsync, will attempt to expand them fully
    i.e: docker devicemapper (60MB on disk, virtually 100G)

  warning: some programs have one fat binary with hard links
    rsync, will attempt to copy them fully
    i.e: git, which has 114 hard links with different names

* BIOS boot (ef02) partition

  dd if=/dev/sdX1 of=/dev/sdY1 bs=1M # simply

* grub

  sudo grub-install --target=i386-pc --debug --boot-directory=/<root-mountpoint>/boot/ /dev/sdY

  warning: do not mess the device names and mountpoint names as it may modify your host system grub config


* grub UUID

  grub menuentry refers to source key UUID

* adjust root UUIDs
  /etc/fstab still refers to source key UUID

  blkid /dev/sdX? &gt;&gt; /etc/fstab
  vi /etc/fstab

  (some sed-fu would be nice)</root-mountpoint></target>

dimanche 12 mai 2013

archlinux pacman helper

I don't always follow pacman updates output. I believe this behavior was the reason I was left with an unbootable system. Mainly because of a long time due change for /bin/systemd to be removed, /bin/init being the sole entry point for the bootloader to continue. Anyway, as for LFS (Linux From Scratch), logging things could help, so as for now I'll use :

pacman -Su | tee pacman.dash.Su.`date +%d%b%G_%H%M%S`.log

in order to be able to read useful information later on.