1 00:00:00,000 --> 00:00:11,000 For troubleshooting purposes, sometimes it is required to boot into a non-default target. 2 00:00:11,000 --> 00:00:13,000 So how does that work? 3 00:00:13,000 --> 00:00:16,000 Well, first you need a target that is isolatable. 4 00:00:16,000 --> 00:00:22,000 A systemd target that is not isolatable is just a group of unit files. 5 00:00:22,000 --> 00:00:26,000 So if you have the isolate is yes option in the systemd target unit file, 6 00:00:26,000 --> 00:00:29,000 you can boot into that target. 7 00:00:29,000 --> 00:00:32,000 And four common targets are used. 8 00:00:32,000 --> 00:00:36,000 But there is nothing preventing you from creating your own targets if you want. 9 00:00:36,000 --> 00:00:43,000 The commonly used targets are emergency target, rescue target, multi-user target and graphical target. 10 00:00:43,000 --> 00:00:47,000 And you can enter the group to boot menu by pressing E. 11 00:00:47,000 --> 00:00:54,000 And then you add systemd.unit is whatever.target to boot into a non-default target. 12 00:00:54,000 --> 00:00:59,000 Alternatively, use systemctl set default to set your default. 13 00:00:59,000 --> 00:01:01,000 Let me show you. 14 00:01:01,000 --> 00:01:08,000 So let me use systemctl cat printer.target. 15 00:01:08,000 --> 00:01:11,000 Because in the end, a target is just a group of unit files. 16 00:01:11,000 --> 00:01:15,000 And here we can see it is quite minimal configuration. 17 00:01:15,000 --> 00:01:20,000 Now what happens if we do rescue.target, for instance? 18 00:01:20,000 --> 00:01:23,000 There we can see the last option in the configuration. 19 00:01:23,000 --> 00:01:25,000 And that's the option that matters. 20 00:01:25,000 --> 00:01:27,000 Allow isolate is yes. 21 00:01:27,000 --> 00:01:32,000 If a target has allow isolate is yes, then you can boot into it. 22 00:01:32,000 --> 00:01:36,000 And I'm going to show you how to do that from the group bootloader menu. 23 00:01:36,000 --> 00:01:40,000 So first we need to reboot. 24 00:01:40,000 --> 00:01:42,000 And press escape at the right moment. 25 00:01:42,000 --> 00:01:45,000 If you see the firmware, and we just did, 26 00:01:45,000 --> 00:01:48,000 it's right after the loading of the firmware where you press escape. 27 00:01:48,000 --> 00:01:51,000 And then you get the group boot menu, as you can see right here. 28 00:01:51,000 --> 00:01:54,000 So from here I'm going to use E for edit. 29 00:01:54,000 --> 00:01:57,000 I'm going to the end of the line that loads Linux. 30 00:01:57,000 --> 00:02:04,000 And I'm using systemd.unit is rescue.target. 31 00:02:04,000 --> 00:02:07,000 And then control X to boot with normal options. 32 00:02:07,000 --> 00:02:11,000 So rescue target, as well as emergency target, 33 00:02:11,000 --> 00:02:13,000 are going to prompt for a root password. 34 00:02:13,000 --> 00:02:15,000 It's a little bit hard to see. 35 00:02:15,000 --> 00:02:17,000 Because after the prompt, 36 00:02:17,000 --> 00:02:20,000 which is about 12 lines from the bottom of the screen, 37 00:02:20,000 --> 00:02:22,000 some more messages were printed, 38 00:02:22,000 --> 00:02:25,000 but it is really prompting give root password for maintenance. 39 00:02:25,000 --> 00:02:27,000 If you don't have a root password, 40 00:02:27,000 --> 00:02:30,000 you cannot use these options for troubleshooting. 41 00:02:30,000 --> 00:02:33,000 But I did set a root password on this one. 42 00:02:33,000 --> 00:02:35,000 So here I am in my root shell. 43 00:02:35,000 --> 00:02:41,000 Now I'm going to use systemctl start graphical.target. 44 00:02:42,000 --> 00:02:45,000 From a minimal target, just use systemctl start 45 00:02:45,000 --> 00:02:48,000 to go to a target that is offering more. 46 00:02:48,000 --> 00:02:50,000 So here I am back in my graphical target 47 00:02:50,000 --> 00:02:52,000 where I can log in again.