Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
5010 views
Stuck at boot, no GUI, login on tty not possible after upgrade to Debian 12
I upgraded my system to `Debian 12`, but I cannot login any more after I rebooted when the package installation seemed to be completed. The login prompt (on tty) tells me `login incorrect` after typing any (even empty, even `root`) string with my keyboard and finishing it with `Return` (standard way...
I upgraded my system to Debian 12, but I cannot login any more after I rebooted when the package installation seemed to be completed. The login prompt (on tty) tells me login incorrect after typing any (even empty, even root) string with my keyboard and finishing it with Return (standard way to type in a user name). Sometimes the issue in comparable situations is because there's no space left on the device. I'm pretty sure I can exclude this as a possible reason here because I cheked that every partition has at least several MB of free space with gnome-disks from a live system. The screen at Ctrl+Alt+F7 is stuck at [ OK ] Started Anonymizing overlay network for TCP. with a blinking underscore cursor in the line under the fullstop. The line breaks don't work correctly as it seems to add the space of a whole line to do the line break, not just breaking the line and starting at position 0 for writing the next line. I'd like to not reinstall my system in order to use it again. Ctrl+Alt+F1 as well as Ctrl+Alt+F3 behave in the same manner:
Debian GNU/Linux 12 hosti tty3

hosti login: root

Login incorrect
hosti login: _
I'd like to not need to reinstall Debian because I did lots of customisations, which I cannot list all anymore and therefore I'd looking forward to fixing my broken login (or system) way more than reinstalling the system. **EDIT** Side observation: Trying to take an empty username for login doesn't succeed for the first attempt on the screen, but for the other ones. I also can only take four attempts "once"; the screen "clears" after the fifth attempt. "Four attempts":
Debian GNU/Linux 12 hosti tty3

hosti login: number1

Login incorrect
hosti login: number2

Login incorrect
hosti login: number3

Login incorrect
hosti login: number4

Login incorrect
hosti login: numberFIVEwhichIStheLASToneSEENonTHEscreenAFTERthisONEtheSCREENseemsTOclearORrefreshAUTOMATICALLYafterEXAMININGtheATTEMPTtoLOGin_
muggi (759 rep)
Jun 13, 2023, 11:11 AM • Last activity: Oct 21, 2024, 09:05 AM
1 votes
1 answers
2049 views
systemd Firewall .service Unit: Type=exec or Type=oneshot?
I'm debugging a firewall .service unit and a few questions arise. One of those questions is the unit's best service type, either exec or oneshot. Virtually no comparisons of the two appear in my searches, probably because exec is a relatively recent addition to systemd (v.249 IIRC). By way of backgr...
I'm debugging a firewall .service unit and a few questions arise. One of those questions is the unit's best service type, either exec or oneshot. Virtually no comparisons of the two appear in my searches, probably because exec is a relatively recent addition to systemd (v.249 IIRC). By way of background, the unit (call it iptables.service) is intended to activate and configure the firewall by running a Bash script (call it iptables.sh) before the network is up (*i.e.*, before network-pre.target), *e.g.*, ExecStart=/bin/bash -c '/home/locsh/iptables.sh' **Type=oneshot** has the advantage of not entering the "active" state, so it subsequently can be restarted or reactivated, *e.g.*, by a timer unit. It also is the more common of the two types in most examples, albeit without explanation. **Type=exec** has the advantage that it will delay startup of follow-up units until the main service has been executed. This seems to make perfect sense for a firewall .service unit because the network should depend on the script running successfully and remain down otherwise, *e.g.*, if the script temporarily can't be read because somehow the relevant .mount unit hasn't yet activated. **Restart=on-failure** seems to be an obvious and prudent addition in either case. *The first question* is whether one or the other might better for any reason. *The second question* is whether Type=exec, because it delays the start of follow-up units, might introduce a subtle ordering cycle in some edge cases, either with or without "Restart=on-failure", in part because the unit's ordering dependency Before=network-pre.target is relatively early in the boot process.
ebsf (399 rep)
Jun 11, 2022, 08:43 PM • Last activity: Jun 11, 2022, 10:12 PM
0 votes
0 answers
76 views
Linux boot process
- OS: GNU + Linux - Boot partition: `/dev/sda1` After the MBR makes its decision on which is the active partition (boot partition), it gives control to the Kernel Boot Loader, generally GRUB, to load the kernel image, which is located in `/boot/vmlinuz`. But here the device `sda1` is still *not moun...
- OS: GNU + Linux - Boot partition: /dev/sda1 After the MBR makes its decision on which is the active partition (boot partition), it gives control to the Kernel Boot Loader, generally GRUB, to load the kernel image, which is located in /boot/vmlinuz. But here the device sda1 is still *not mounted*, at this particular step. Also all the GRUB configuration files are in the /boot/grub directory. I am thinking that to access files, one must first mount that device, which contains the file, to a directory in the root file system. Correct me if I am wrong? So how will GRUB get its configuration files and the kernel image vmlinuz, without sda1 being mounted?
Sumanth (1 rep)
Feb 14, 2021, 03:08 PM • Last activity: Feb 15, 2021, 04:56 AM
3 votes
1 answers
20674 views
Runtime parameters for a systemd service
I am a little confused about how runtime parameters are normally supplied to a systemd service. The general idea I have is that the following happens: There is a file that contains the environment variable settings, e.g., /etc/sysconfig/mydaemon Then there is the unit file, e.g., mydaemon.service (n...
I am a little confused about how runtime parameters are normally supplied to a systemd service. The general idea I have is that the following happens: There is a file that contains the environment variable settings, e.g., /etc/sysconfig/mydaemon Then there is the unit file, e.g., mydaemon.service (not sure where this is located) Inside of the unit file is a line such as the following: EnvironmentFile=-/etc/sysconfig/mydaemon When the service is started, the settings file is opened then each setting is supplied to main as argc/argv. Is that right?
Tyler Durden (6193 rep)
Sep 17, 2014, 08:23 PM • Last activity: Feb 10, 2021, 05:20 PM
3 votes
1 answers
4376 views
Auto-connect VPN in Kali Linux?
I currently have a working VPN on my Kali Linux box however I feel uncomfortable with the fact that sometimes I forget to manually connect it in the network manager. After digging around everywhere in the `gnome-control-center network` I can't seem to find anyway to initiate the VPN connection autom...
I currently have a working VPN on my Kali Linux box however I feel uncomfortable with the fact that sometimes I forget to manually connect it in the network manager. After digging around everywhere in the gnome-control-center network I can't seem to find anyway to initiate the VPN connection automatically. Is there something I am missing or perhaps an alternative for a network manager GUI? If not, how could I add the terminal commands to execute during the boot process?
Norr (261 rep)
Jun 8, 2017, 02:26 AM • Last activity: Apr 3, 2020, 01:04 PM
1 votes
1 answers
342 views
Starting the Linux Kernel (Boot Process)
I'm trying to understand the Linux boot process: I understand that in the (set by GRUB) first stage, the kernel (as a compressed image file) is loaded into memory and decompressed. When control is passed to the kernel how is this actually done? Is the kernel compiled from its C source code and how i...
I'm trying to understand the Linux boot process: I understand that in the (set by GRUB) first stage, the kernel (as a compressed image file) is loaded into memory and decompressed. When control is passed to the kernel how is this actually done? Is the kernel compiled from its C source code and how is the kernel actually executed. I have read this post, but it does not seem to answer my query: https://unix.stackexchange.com/questions/5184/what-happens-after-loading-the-linux-kernel-image-into-ram
PeterJ (11 rep)
Sep 28, 2018, 10:42 AM • Last activity: Sep 28, 2018, 12:28 PM
4 votes
1 answers
847 views
Netctl causes getty to clear the screen and re-display the issue message
I have systemd configured to _not_ clear the terminal before calling `getty`, and also `getty` itself is run with the `--noclear` option, so that my boot messages are left displayed when the login prompt from `getty` appears at the bottom of the screen. Well, at least they did until three months ago...
I have systemd configured to _not_ clear the terminal before calling getty, and also getty itself is run with the --noclear option, so that my boot messages are left displayed when the login prompt from getty appears at the bottom of the screen. Well, at least they did until three months ago. Now, what happens is the following. Systemd leaves the boot messages on the screen (as I asked it to) and getty does _not_ clear the screen (as I also instructed it to), but after a few seconds, the screen flickers, the boot messages are gone, and a _new_ login prompt is shown on the top of the screen (actually, the screen flickers some three or four times, as I describe below). I don't know it this is worth mentioning, but if I don't touch the keyboard, the boot messages get cleared after a few seconds. But if I readily start typing my username as soon as the prompt asks for it, and don't hit enter, there is no clearing. Respawning ---------- These are some relevant journal lines from during boot: -- Reboot -- Dec 16 22:46:25 smt-dell systemd[1] : systemd 228 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN) Dec 16 22:46:25 smt-dell systemd[1] : Created slice system-netctlx2dauto.slice. Dec 16 22:46:25 smt-dell systemd[1] : Created slice system-getty.slice. Dec 16 22:46:33 smt-dell systemd[1] : Starting Login Service... Dec 16 22:46:33 smt-dell systemd[1] : Starting Automatic wireless network connection using netctl profiles... -- Subject: Unit netctl-auto@wlp3s0.service has begun start-up Dec 16 22:46:34 smt-dell systemd[1] : Started Getty on tty1. Dec 16 22:46:34 smt-dell systemd-logind: New seat seat0. Dec 16 22:46:34 smt-dell systemd[1] : Reached target Login Prompts. Dec 16 22:46:34 smt-dell systemd[1] : Started Login Service. Dec 16 22:46:35 smt-dell systemd[1] : Started Automatic wireless network connection using netctl profiles. Dec 16 22:46:35 smt-dell wpa_actiond: Starting wpa_actiond session for interface 'wlp3s0' Dec 16 22:46:35 smt-dell systemd[1] : Reached target Network. Dec 16 22:46:35 smt-dell systemd[1] : Reached target Multi-User System. Dec 16 22:46:35 smt-dell systemd[1] : Startup finished in 2.630s (kernel) + 12.170s (userspace) = 46.781s. Dec 16 22:46:39 smt-dell kernel: wlp3s0: authenticated Dec 16 22:46:39 smt-dell kernel: wlp3s0: associated Dec 16 22:46:39 smt-dell wpa_actiond: Interface 'wlp3s0' connected to network 'wl-usb' There is no log of getty respawning (as @JdeBP suspected in the comments). Timestamps of the visual events ------------------------------- I recorded the boot (on camera) and wrote down all the events. I have the \t, \4, and \6 escape sequences in /etc/issue, which show the current time, IPv4 address, and IPv6 address. (These are for the same boot as the journal lines above, so the timestamps should be compared) 1. Boot messages are still on the screen. The issue message at the bottom reads: - \t: 22:46:35 - \4: empty - \6: empty 2. The boot messages and the first issue message have been cleared, and the second issue message reads: - \t: 22:46:39 - \4: 192.168.7.119 - \6: a shortened (::-syntax) IPv6 address 3. The second issue message has been cleaned, and the third reads: - \t: 22:46:41 - \4: 192.168.7.119 - \6: a full IPv6 address (all bytes shown explicitly) 4. Screen cleared for the last time, and the fourth and last issue message: - \t: 22:46:42 - \4: 192.168.7.119 - \6: the same Netctl ------ Thanks to a recent bug (in netctl , or wpa_supplicant, or wpa_actiond, I don't know), I discovered that when netctl-auto is disabled, there is no clearing of the boot messages, nor any re-displaying of the issue message. When I fixed the bug, the boot messages started getting cleared again. When I manually disable netctl-auto, there is no clearing of the screen, and when I enable it again, the screen gets cleared several times, as explained above. Question -------- If it's not clear, my question is: why on Earth would netctl cause the screen to be cleared and the issue message to be displayed again? And is it possible to disable this behavior? Relevant links -------------- I have also asked this question on the Arch Linux forums .
fonini (325 rep)
Dec 16, 2015, 06:08 AM • Last activity: Mar 12, 2018, 07:08 PM
2 votes
1 answers
1255 views
How is initramfs loaded if it resides on the filesystem it is supposed to unlock?
I’ve got a chicken and egg type conundrum I’m trying to figure out: First point: If one of the purposes of initramfs is to load the main file system by providing some necessary drivers (RAID for instance), and initramfs lives on said filesystem, how does that work exactly? Second point: Some sources...
I’ve got a chicken and egg type conundrum I’m trying to figure out: First point: If one of the purposes of initramfs is to load the main file system by providing some necessary drivers (RAID for instance), and initramfs lives on said filesystem, how does that work exactly? Second point: Some sources seem to say that the kernel is the one that loads initramfs. In this case, how would the kernel first be accessed if it’s residing on the filesystem that initramfs is supposed to provide access to in the first place?
joueffy (45 rep)
Sep 11, 2017, 12:08 PM • Last activity: Sep 11, 2017, 12:13 PM
0 votes
2 answers
1636 views
Ubuntu unable to boot after I deleted 2 partitions
I've ubuntu 16.04 installed on my hard drive of laptop consuming total space of the drive. I would be installing 16.10 alongside that and so I was trying to make space available for the same. I deleted 2 partitions of the earlier installation namely /temp & /var. I did all this by booting from gpart...
I've ubuntu 16.04 installed on my hard drive of laptop consuming total space of the drive. I would be installing 16.10 alongside that and so I was trying to make space available for the same. I deleted 2 partitions of the earlier installation namely /temp & /var. I did all this by booting from gparted bootable usb. Now I am unable to boot into my previous installation of 16.04. Grub menu is appearing, ubuntu logo is coming, then a terminal appears for 'maintenance'. I checked log via terminal and found 2 entries mentioning that those 2 partitions failed to be mounted. I think the issue is due to those 2 deleted partitions although I'd shrunk root partition from the end part or end sector of the partition keeping the beginning sector the same. It has separate /boot partition which was untouched. Also I moved swap and home. As mentioned earlier I did via the bootable gparted USB. As the issue may be because of deleting the 2 partitions, so will the issue resolve if I access the root partition via a bootable USB and remove the mount entries for the 2 partitions in the /etc/fstab file? I would like to say for rescue I've gparted live USB, Ubuntu 16.10 iso in my cell phone. That's all! Can the gparted bootable USB be used to create bootable ubuntu 16.10 USB? How to proceed please?
Ravi (3913 rep)
Nov 10, 2016, 02:00 PM • Last activity: Nov 10, 2016, 04:07 PM
1 votes
0 answers
104 views
How does Grub Stage1, exactly, access/load stage 2?
This is my first ever question, I have put this question in front of Red Hat Instructors but didn't find any satisfying answers. I'm using RHEL/CENTOS6, GRUB Legacy 0.97, and have consulted heaps of documentation explaining linux boot process. Almost all of the blogs, documentation etc. successfully...
This is my first ever question, I have put this question in front of Red Hat Instructors but didn't find any satisfying answers. I'm using RHEL/CENTOS6, GRUB Legacy 0.97, and have consulted heaps of documentation explaining linux boot process. Almost all of the blogs, documentation etc. successfully explain the steps involved and the whole process but fail unanimously at as what actually takes place when loading grub stage2. Here is my understanding of the process and have done a bit of testing as well; 1. BIOS(not using EFI) reads MBR, finds partition table, and loads GRUB stage1 (first 446 bytes) into memory 2. I have /boot partition under 1024 cylinders, and the idea I have extracted from a bunch of documentation is that GRUB stage1 can directly load stage2 if it is located at some place under 1024 cylinders. Some documentation I have consulted mentions that stage1.5 is located right after MBR before sector 63, while others suggest that it can be anywhere in first 1MB of disk and yet another group claimed that stage1.5 is just a GRUB v2 thing and does not apply on GRUB legacy. 3. GRUB stage2 has all the necessary drivers/modules to read file systems and thus loads kernel and ramdisk and handover control to kernel. 4. Kernel kicks off init on RHEL/CENTOS 6 and systemd on RHEL/CENTOS 7. I have dumped all the data from the 1st MB of the disk and can confirm that there is nothing except MBR. I get confused as to how 446 byte GRUB stage1 can load stage2 from a file system? According to some images on wikipedia and a few documents, when GRUB is installed, stage1 contains a LBA48 pointed to stage2. Playing on the fact, I tried to test if systems boots when stage2 in removed or renamed from /boot/grub/ directory. The systems was still bootable even when there was no stage2 in the filesystem. Will really appreciate if anyone can explain it.
Zul K Irshad (332 rep)
Jan 31, 2016, 01:00 PM • Last activity: Jan 31, 2016, 03:15 PM
0 votes
1 answers
749 views
Extlinux.conf on separate partition?
I'm trying to configure a system with separate boot partition, booted with U-boot and `extlinux` loader. Could I locate `extlinux.conf` on separate partition, but kernel (`zImage`) and device tree on root partition? If so, how should I say in `extlinux.conf`, where to look for kernel image?
I'm trying to configure a system with separate boot partition, booted with U-boot and extlinux loader. Could I locate extlinux.conf on separate partition, but kernel (zImage) and device tree on root partition? If so, how should I say in extlinux.conf, where to look for kernel image?
Dmytro Kulyk (1 rep)
Jan 29, 2016, 02:25 PM • Last activity: Jan 30, 2016, 02:36 PM
0 votes
1 answers
193 views
Problem with Linux mint 17.2 boot
I have installed this once already but had problems after loading and formatting a iPod shuffle with Rhythmbox. This mint 17.2 seems to be a lot more compatible with my MacBook Pro than the Ubuntu 13.04, but during the second install I am having problems during boot up. I am getting a black screen....
I have installed this once already but had problems after loading and formatting a iPod shuffle with Rhythmbox. This mint 17.2 seems to be a lot more compatible with my MacBook Pro than the Ubuntu 13.04, but during the second install I am having problems during boot up. I am getting a black screen. This is a single boot system. prior to installing mint the first time I formatted my drive. I just ran boot repair but it indicated that I had a problem (cf. pastebin) . If anyone can help, it would be much appreciated. I am not too familiar with the Linux boot process. When I loaded it the first time I partitioned the drive in three parts: a boot sector sda1 then sda2 for Linux and the swap sector.
brokenpipe (1 rep)
Nov 22, 2015, 07:39 AM • Last activity: Dec 6, 2015, 07:09 PM
Showing page 1 of 12 total questions