The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘openSuSE’ Category

Eject USB drives / eject command – Unix & Linux Stack Exchange

Posted by jpluimers on 2020/07/20

I always thought than an umount /dev/sdX# for all partitions on /dev/sdX was enough for USB devices to be ejected, but there are three commands that (on most systems) actually power down USB drives (or USB to SD card adapters):

  • udisks --detach /dev/sdX (requires the udisks package which is obsolete)
  • eject /dev/sdX seems not to be enough on some systems; it is part of the util-linux package
  • udisksctl power-off -b /dev/sdX is equivalent to the udisks command; it is part of the udisks2 package.

These will ensure that the disk is not part of the fdisk --list output any more.

The opposite of these is sg_start, which is from the sg3_utils package.

Source: [WayBack] Eject USB drives / eject command – Unix & Linux Stack Exchange

On MacOS, you can use  diskutil eject /Volumes/<LABEL> (source: answer by efesaid on [WayBack] Eject USB drives / eject command – Unix & Linux Stack Exchange)

–jeroen

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

openSUSE forums tips

Posted by jpluimers on 2020/07/17

A few tips from posting to the openSUSE forums, learned from banging my head to the wall too often.

  • They are at https://forums.opensuse.org/forum.php
  • The forum software can be very slow at times taking ~tens of seconds for loading a post:
    • loading multiple posts or pages of posts you are interested in multiple tabs speeds up your reading a lot
  • Answers on the post often are along the form “has been answered before” without pointing to the actual link, even if the post is marked with a read icon, for instance in [WayBack] No option to “keep me logged in on this device” with Novell/openSUSE login?
  • Your email is not your username, so do not use it during logon: [WayBack] Lousy log in
  • The search function in the forum is horrible.
  • The forum software is proprietary (vBulletin – Wikipedia) and has a
  • When writing/replying to posts:
    1. Edit your answer off-line, because
      • you will automatically be logged off even if the forum indicates you are still logged on (there is no count down of the activity timer), see
      • when you re-logon, your carefully edited text has been lost from the cache
    2. Never use formatting, either auto-introduced, or introduced while pasting, avoid BB-code
      1. Reasoning
      2. Though the forum supports BB code, NNTP news readers do not, and the added formatting gives quite a mess
      3. Use the text (“Source mode”) version of the editor, by first clicking the left most button: “Source”

        • After this, the third and fourth button get greyed out:
      4. Remove formatting button is the second from the left (in both text and WYSIWIG mode): “Remove format”
      5. If you are in WYSIWIG mode, then always paste using the third button from the left that strips formatting: “Paste as plain text”
      6. NEVER EVER paste with formatting with the fourth button from the left: “Paste from Word”

–jeroen

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

GitHub – gamelinux/passivedns: A network sniffer that logs all DNS server replies for use in a passive DNS setup

Posted by jpluimers on 2020/07/15

Cool tool: [WayBackGitHub – gamelinux/passivedns: A network sniffer that logs all DNS server replies for use in a passive DNS setup via [WayBack] How to log all my DNS queries? – Unix & Linux Stack Exchange (thanks mxmlnkn!).

It listens on port 53 for DNS requests then logs them to a file on regular intervals aggregating similar requests.

Usage is simple:

Read the rest of this entry »

Posted in *nix, *nix-tools, Development, DevOps, Infrastructure, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Marrying U-Boot, uEFI and grub2 – Alexander Graf – openSUSE…

Posted by jpluimers on 2020/07/13

A very insightful talk: “Marrying U-Boot, uEFI and grub2 – Alexander Graf – openSUSE…”

Booting is hard. Booting in the ARM world is even harder. State of the art are a dozen different boot loaders that may or may not deserve that name. Each gets configured differently and each has its own pros and cons.

As a distribution this is a nightmare. Configuring each and every one of them complicates code that really should be very simple.

To solve the problem, we can just add another layer of abstraction (grub2) on top of another layer of abstraction (uEFI) on top of another layer of abstraction (u-boot). Follow me on a journey on how all those layers can make life easier for the distribution and how much fun uEFI really is.

After this talk, you will know how ARM systems boot, what uEFI really means, how uEFI binaries interact with firmware and how we are going to move to uEFI based boot on openSUSE for ARM.

Usually known as agraf on-line, [WayBack] Alexander Graf – Open IoT & ELC 2017 is an impressive guy:

Alexander Graf

SUSE
KVM Wizard
Nürnberg Area, Germany
Alexander started working for SUSE about 9 years ago. Since then he worked on fancy things like SUSE Studio, QEMU, KVM and openSUSE on ARM. Whenever something really useful comes to his mind, he tends to implement it. Among others he did Mac OS X virtualization using KVM, nested SVM, KVM on PowerPC and a lot of work in QEMU for openSUSE on ARM. He is the upstream maintainer of KVM for PowerPC, QEMU for PowerPC and QEMU for S390x.

Slides: [WayBack] Marrying U-Boot, UEFI and grub.pdf

There are 2 videos on YouTube (view them below):

A few things I learned

Boot sequence:

  1. Raspberry Pi has a tiny boot ROM
  2. It loads the firmware in the GPU (for Raspberry this is a Raspberry Foundation provided binary)
  3. The firmware loads U-Boot
  4. U-Boot loads grub2
  5. grub2 can have many modules (like file system drivers) and loads the kernel

Alexander pushed the U-Boot stuff up stream, but the FreeBSD team was the first to actually boot a full OS from it.

Relations:

  • uEFI/EFI is a set of specs that define the API
  • U-Boot is the firmware implementing uEFI, so your machine behaves as a PC making booting a lot more standardised, starting at handing off to a regular grub2 boot process
  • U-Boot loads grub2

U-boot:

–jeroen

References:

Images

Read the rest of this entry »

Posted in *nix, *nix-tools, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

openSUSE:Standards Rpm Metadata – openSUSE: Repository layout

Posted by jpluimers on 2020/07/09

For my link archive: [WayBack] openSUSE:Standards Rpm Metadata – openSUSE: Repository layout.

It is not fully up to date any more on primary.xml.gz, so here are my notes for the aarch64 version of Tumbleweed:

  1. Inspect http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/repodata/repomd.xml [WayBack] for the name of *-primary.xml.gz (in this case http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/repodata/d701c298b21d0b995c9560f9cfcc84685cb916deacc4f4c4a613a9b9d8f5aa57-primary.xml.gz [WayBack]
  2. Download that .gz file and uncompress it
  3. Inspect the *-primary.xml from it, look inside the metatadata root element for a package having a name element with value openSUSE-release: that package element now has a version element having a ver attribute containing the version text.

–jeroen

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Raspberry Pi, Tumbleweed, btrfs

Posted by jpluimers on 2020/06/15

I want to use btrfs as filesystem on a Raspberry Pi with opensuse Tumbleweed.

It is hard to find out how, so here are a few links that should help me from “opensuse” “tumbleweed” “btrfs” “raspberry” pi:

–jeroen


Posted in *nix, *nix-tools, Development, Hardware Development, Linux, openSuSE, Power User, Raspberry Pi, SuSE Linux, Tumbleweed | Leave a Comment »

Raspberry Pi 1B OpenSuSE Tumbleweed zypper upgrade problem · GitHub

Posted by jpluimers on 2020/05/25

It looks like OpenSuSE has stopped supporting Raspberry Pi 1, so the best likely is to recycle it into a Pi-Hole as basically it’s been dead since mid 2017: [WayBack] Raspberry Pi 1B OpenSuSE Tumbleweed zypper upgrade problem · GitHub.

Build status for armv6l support: [WayBack] Project openSUSE:Factory:ARM Status Monitor – openSUSE Build Service

–jeroen

Read the rest of this entry »

Posted in *nix, *nix-tools, Debian, Development, Hardware Development, History, Linux, openSuSE, Power User, Raspberry Pi, Raspbian, SuSE Linux, Tumbleweed | Leave a Comment »

ipmi – Linux: Why does Single User mode work on Serial Console but not on the attached Keyboard/Video/Monitor? – Server Fault

Posted by jpluimers on 2020/05/19

From [WayBack] ipmi – Linux: Why does Single User mode work on Serial Console but not on the attached Keyboard/Video/Monitor? – Server Fault (slightly edited; thanks Patrick!):

Because init has not spawned off multiple TTYs yet (getty, mgetty, etc), so you only have the primary TTY. The primary TTY is the last console= parameter on the kernel command line. All the console parameters get the output, but only the last one will be able to act as input.

–jeroen

Posted in *nix, Debian, Linux, openSuSE, Power User, RedHat, SuSE Linux, Tumbleweed | Leave a Comment »

Show openSUSE:Factory / bootchart – openSUSE Build Service

Posted by jpluimers on 2020/05/15

On my research list: [WayBack] Show openSUSE:Factory / bootchart – openSUSE Build Service.

I bumped here when researching on how to list services: [WayBack] init.d – Command to list services that start on startup? – Ask Ubuntu

It seems few people use it on opensuse, but it is interesting for analysing the boot process nonetheless.

I already found out this is in fact bootchart2: [WayBack] GitHub – xrmx/bootchart: merge of bootchart-collector and pybootchartgui

Some links that should help me further are these:

From the last link, this translation:

A. systemd-analyze

You will see the total computer startup time after:

systemd-analyze

A complete list of how much each individual service has taken is when you complete:

systemd-analyze blame

You will see the most problematic processes after you complete:

systemd-analyze critical-chain

You can create a picture:

systemd-analyze plot> /tmp/systemd-analyze.svg

Suitable for: openSUSE 11.4, 12.x, 13.1, Leap 42.x

Not suitable: openSUSE 13.2

B. bootchart

First, install the bootchart package (bootchart 2 version of the program). If you are using openSUSE Leap 42.x or later, enable bootchart2 (and optional bootchart2-done) service:

systemctl enable bootchart2

systemctl enable bootchart2-done

If you are using openSUSE version 13.1 or earlier, go to YaST → (System) → Startup and enter kernel startup parameters:

initcall_debug printk.time = y quiet init = / sbin / bootchartd rdinitrd = / sbin / bootchartd

The next time you start your computer, the /var/log/bootchart.png image will be created to help you further optimize your system startup. For example, if you do not need an AppArmor who cares about security, you can disable the boot.apparmor service through the YaST Service Configuration Module.

Suitable for: openSUSE 11.4, 12.x, 13.1, 13.2, Leap 42.x

–jeroen

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Listing services on OpenSuSE Linux

Posted by jpluimers on 2020/05/15

Nowadays, most OpenSuSE Linux services are systemd based. Listing those is simple with systemctl list-units --all (configured ones) and systemctl list-unit-files (nonconfigured ones as well), though their states can be many as the command-completion for the --state parameter:

# systemctl list-unit-files --state
abandoned deactivating failed masked not-found remounting-sigterm start-pre stop-sigkill waiting
activating deactivating-sigkill final-sigkill merged plugged running stop stop-sigterm
activating-done deactivating-sigterm final-sigterm mounted registered sigkill stop-post stub
activating-sigkill dead inactive mounting reload sigterm stop-pre tentative
activating-sigterm elapsed listening mounting-done reloading start stop-pre-sigkill unmounting
active error loaded mounting-sigkill remounting start-chown stop-pre-sigterm unmounting-sigkill
auto-restart exited making mounting-sigterm remounting-sigkill start-post stop-sigabrt unmounting-sigterm

The odd thing: not all states from the service list are in the completion. These are missing from the list-unit-files:

generated
static
transient

In the past, most services were System V based, where you can use service --status-all. Contrary to the documentation (which indicates “The –status-all option displays the status of all loaded service units.”), it lists all services.

On OpenSuSE though, it now lists both System V based and systemd based services in one go. Since usually there are no more System V services (virtually all have been migrated to systemd a few years ago), the netto result is systemd services.

Based on [WayBack] init.d – Command to list services that start on startup? – Ask Ubuntu

–jeroen

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »