I have a non booting installation that I need to get running. I would like to know how to change the run target to the command line and disable several services that are causing issues during the boot process.
How does one manually change the run target on a non booting installation ? What do I edit ? Because my installation doesn't boot, I can't run systemctl, so I must edit the link manually.
How does one manually disable services so they don't start during the boot process ? Because my installation doesn't boot, I can't run systemctl, so I must edit the configuration manually.
Thanks
On Mon, 2017-03-06 at 10:37 -0700, linux guy wrote:
I have a non booting installation that I need to get running. I would like to know how to change the run target to the command line and disable several services that are causing issues during the boot process.
How does one manually change the run target on a non booting installation ? What do I edit ? Because my installation doesn't boot, I can't run systemctl, so I must edit the link manually. [...]
https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux
poc
On 03/06/2017 12:37 PM, linux guy wrote:
I have a non booting installation that I need to get running. I would like to know how to change the run target to the command line and disable several services that are causing issues during the boot process.
How does one manually change the run target on a non booting installation ? What do I edit ? Because my installation doesn't boot, I can't run systemctl, so I must edit the link manually.
How does one manually disable services so they don't start during the boot process ? Because my installation doesn't boot, I can't run systemctl, so I must edit the configuration manually.
Thanks
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org
I'm no expert but i think you'd check the /boot.config file?...(Correct me if I'm wrong community!) Either there or the /grub.config file, to set things the way you want upon boot. This way you'd at least be able to get into the system and then go forward from there. (I wonder if just copying the bits and pieces from the drive and placing them elsewhere....then booting from the new drive - network location, wouldn't be a better option?) just my 2 cents
EGO II
I'm doing this on an RPi 3 running F25. It boots using extLinux, not grub2, from what I can tell. There are grub and grub2 files in /boot, but it doesn't seem to use them.
I've got it booting to a command prompt by adding 'init=/bin/bash' to the kernel parameters, but it shuts off USB and other services before it gets there, thus leaving me with no keyboard.
There is a grub.conf file in /boot/grub, but it isn't current to the installation and doesn't appear to be used. It references a kernel that isn't installed.
It appears the boot process is controlled by /boot/extlinux/extlinux.conf. That file is set up similar to a grub.conf file.
There is no conf/config file in /boot.
On Monday, March 6, 2017 6:37:32 PM CET linux guy wrote:
I have a non booting installation that I need to get running. I would like to know how to change the run target to the command line and disable several services that are causing issues during the boot process.
How does one manually change the run target on a non booting installation ? What do I edit ? Because my installation doesn't boot, I can't run systemctl, so I must edit the link manually.
How does one manually disable services so they don't start during the boot process ? Because my installation doesn't boot, I can't run systemctl, so I must edit the configuration manually.
Thanks
Hey.
During the bootloader process you can define the runlevel to run your kernel at.
By setting it to 3 you will be able to boot into a cmdline with network functionality and minimal services.
See: https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-grub-runlevel... for more information.
I got the installation booting on my RPi3 again. I couldn't update it with dnf update because the update was simply too large to run. I might try again in the near future.
Here are some things that I learned in this effort.
1) RPi3 boots with extlinux, not grub or grub2.
2) To change the kernel boot parameters, edit /boot/extlinux/extlinux.conf
3) You can set the run level via the kernel parameters.
- add "systemd.unit=runlevel1.target" to the append line in the kernel parameters, for example
https://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/s1-gr...
https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet
4) To disable various services, remove service.service from the target.wants folder for the target you are using. Each target has its own wants folder ! If you change run levels, you'll have to re enable various services.
For example, in the /usr/lib/systemd/system/multi-user.target.wants
[me@localhost multi-user.target.wants]$ ls -al total 28 drwxr-xr-x. 3 root root 4096 Mar 6 15:31 . drwxr-xr-x. 29 root root 20480 Jan 31 11:59 .. lrwxrwxrwx. 1 root root 15 Nov 29 07:24 dbus.service -> ../dbus.service lrwxrwxrwx. 1 root root 15 Jan 16 06:00 getty.target -> ../getty.target drwxr-xr-x. 2 root root 4096 Mar 6 15:31 hidden lrwxrwxrwx. 1 root root 24 Jun 20 2016 plymouth-quit.service -> ../plymouth-quit.service lrwxrwxrwx. 1 root root 29 Jun 20 2016 plymouth-quit-wait.service -> ../plymouth-quit-wait.service lrwxrwxrwx. 1 root root 33 Jan 16 06:00 systemd-ask-password-wall.path -> ../systemd-ask-password-wall.path lrwxrwxrwx. 1 root root 39 Jan 16 06:00 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service lrwxrwxrwx. 1 root root 32 Jan 16 06:00 systemd-user-sessions.service -> ../systemd-user-sessions.service
Hint: to disable a service, make a folder called hidden and move the service to that folder.
5) To start raw networking manually, do the following:
With a dynamic IP $ ifconfig eth0 up $ sudo dhclient eth0
With a static IP To set IP address you want (for example 192.168.0.1) type: $ ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up $ route add default gw GATEWAY-IP eth0
If you want to use Network Manager:
systemctl stop NetworkManager.service systemctl disable NetworkManager.service
Then you enable the network service in a similar fashion. systemctl enable network.service systemctl start network.service
Network Manager Command Line Interface documentation https://fedoraproject.org/wiki/Networking/CLI
http://serverfault.com/questions/21475/starting-network-connection-from-ubun...
If you get a message about resolv.conf not being found, it is supposed to get set to something at boot time. Create a fake one or run NetworkManager to get it to create one.
/run/resolvconf/resolv.conf is a symbolic link that should point to a real file
https://ubuntuforums.org/showthread.php?t=2068299
Hope this helps someone.