That is the proper way to stop a systemctl service from running during boot’s.
EDIT: I see that you tried it already. Weird that it didn’t work. How did “could not boot” look like exactly? No text on the screen or stops at some point? Blank? Because then you can try ctrl+alt+f1 to switch to a terminal and see if it works.
Yes, I already tried this command, and it didn’t work.
sudo systemctl disable lightdm.service
I tried the command “sudo chmod -x /usr/sbin/lightdm” and reboot Jetson TX2,
at first I saw dialog box below.
“The system is running in low-graphics mode.
Your screen, graphicscard, and input device settings
could not be detected correctly. You will need to configure these yourself.”
I press OK-button by mouse, and next I saw selection dialog box.
Try running with default graphical mode
Reconfigure graphics
Troubleshoot the error
Exit to console login
I selected item No.4, and press OK-button.
and then screen was black out, only the mouse cursor was visible.
I gave up at this time.
If you want the newly-flashed Jetson to have a particular configuration, then you can update the root FS image that’s created on the host to include the right systemd configuration.
The easiest way to do this is to create a new gzipped tarball onto the host over ssh:
jetson$ sudo
jetson# tar cfz - --one-file-system / | ssh myname@myhost sh -c 'cat > new-rootfs.tar.gz'
Seems you have X server running (that may have changed from previous versions, not tried on last L4T releases, sorry for confusion…)
What if you issue Alt-Ctl-F2 (you may try F1 to F6, F7 is for GUI)? Do you have a video console login screen ?
FYI, you need a serial console to pick different boot options the way you could with GRUB. The file “/boot/extlinux/extlinux.conf” is similar to the grub.cfg file, though much simpler. No serial console means you cannot have choices picked during boot. Take a look at the default extlinux.conf entry:
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
The “LINUX” key/value pair is which kernel to load. The “APPEND” key/value pair provides the arguments to the kernel.
The “APPEND” values with dollar sign (e.g., “${cbootargs}”) will be inherited from the bootloader. If you want to see the final effective set of arguments run “cat /proc/cmdline”. Note that some values, because they come from the bootloader, would need to be modified in the bootloader source or environment to change them. In some cases this is done because the bootloader itself needs those values…thus it may not be easy to remove those from the bootloader.
As to what init settings or systemd settings the o/s will actually respond to compared to a desktop Ubuntu I don’t know…I do know “systemd.unit=multi-user.target” will be ignored. So will “text”. You can probably get fsck via “fsck.mode=force” does work as expected for file system checking.
So I created this boot entry in extlinux.conf which removes “${cbootargs}” inheritance and manually copies an edited version (be careful to not that the APPEND is one very long line):
LABEL text
MENU LABEL text
LINUX /boot/Image
APPEND root=/dev/mmcblk0p1 rw rootwait console=ttyS0,115200n8 <b>text systemd.unit=multi-user.target</b> console=tty0 OS=l4t fbcon=map:0 net.ifnames=0 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0x2772e0000 gpt tegra_fbmem2=0x140000@0x969ec000 lut_mem2=0x2008@0x969e9000 tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.1.1 androidboot.serialno=0334916010131 bl_prof_dataptr=0x10000@0x277040000 sdhci_tegra.en_boot_part_access=1 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
As expected, GUI still showed up. So I tried this as an additional measure:
systemctl set-default multi-user.target
…this still failed.
So I tried something which didn’t work out well…I edited the default.target to be a copy of multi-user.target, but made graphical.target a conflict. It started out well, but the system locked. Looks like I need to flash from a clone to get it back…not even serial console works.
Something is incorrectly forcing graphical.target and is circumventing systemd. I didn’t find the issue within the obvious scripts, so all I can tell is that you have to actually mask or remove the ability for lightdm to start. Standard kernel and init mechanisms won’t do it.