I have a lot of questions about how to repair a broken system. I have already read a lot of things on your forum.
As I did not want to mix different questions with different answers I am going to open a thread for each subject.
Before system got broken :
uname -a
Linux linux-u6go 4.4.104-39-default #1 SMP Thu Jan 4 08:11:03 UTC 2018 (7db1912) x86_64 x86_64 x86_64 GNU/Linux
Question 1 : When booting from usb stick in UEFI mode, and after choosing “Rescue system”, is it possible to have an internet connection to download and install a missing package ?
I have seen somewhere a command using curl in that situation.
I just tried that. And I’m not sure how to start the network. I tried running “yast” to configure the network, but it said “command not found”.
So I rebooted. And this time I chose “install” instead of the rescue system.
After a few screens, it gave me a partitioning proposal.
At that point, I used CTRL-ALT-F2. And that gave me a root command line. And the network was already up.
You should be able to do the chroot fix that I mentioned in my answer to your question 4 from there. But maybe the system is already mounted, so perhaps you have to use it where it is already mounted. And you will have to copy “/etc/resolv.conf” into the mounted system, so that it can use DNS when accessing the network.
It would be easier if you can use the Tumbleweed live rescue CD/DVD (or on a USB). But if you use that, be sure to use the 64-bit version since you are rescuing a 64-bit system.
I retried this (on a VM). And after hitting CTRL-ALT-F2, nothing seems to be mounted. But my encrypted LVM had been opened (I had provided the key). So I tested mounting the root file system, the “/boot” file system and “/boot/efi”, and that all worked. So I think I could easily do the chroot to fix the system. But remember to copy “/etc/resolv.conf” into the mounted system, so that it can use DNS.
I don’t have anything to actually rescue, so I didn’t try more than mounting.
I try to rescue the system from a geckolinux leap 42.2 Live USB.
Should not be different from using Tumbleweed live rescue ?
This leads me to a new question :
If I boot from a live USB, when the startup is finished, may I do some chroot fix the same way as if I was booting in rescue mode ?
I think I gave enough details in my earlier answer to that.
To summarize:
Boot to the rescue system.
When you see the partitioning proposal, use CTRL-ALT-F2
which should give you are root shell.
ifconfig -a
should show that you have a network connection. If not, then no point in continuing.
Mount your root partition at “/mnt”
If there is a “/boot” partition, mount that at “/mnt/boot”
Mount your EFI partition at “/mnt/boot/efi”
(Optional) Mount your home partition at “/mnt/home”
Do the three --bind mounts that I mentioned in my earlier answer to question 4.
cp /etc/resolv.conf /mnt/etc/resolv.conf
chroot /mnt
You should now be able to install a kernel. Either use zypper, or start a command line yast to install.
I’m pretty sure that the kernel install will also update your bootloader.
Exit from the chroot environment.
Unmount what you mounted
umount -R /mnt
Use CTRL-ALT-F7 to get back to the GUI installer.
Abort the install, and reboot.
Oops! You should boot to the installer, not to the rescue system.