New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed needless login shell from chroot calls where possible #1171
Removed needless login shell from chroot calls where possible #1171
Conversation
The only "chroot ... bash --login" call that is left is in chroot $TARGET_FS_ROOT /bin/bash --login -c "/usr/share/mdadm/mkconf >/etc/mdadm/mdadm.conf" because of the stdout redirection. |
Do not merge it! |
…onment without a login shell (issue 862)
Now it works for me on SLES12: RESCUE e205:~ # rear -d -D recover ... Restoring finished. ... Running mkinitrd... Recreated initrd (/sbin/mkinitrd). Installing GRUB2 boot loader Finished recovering your system. You can explore it under '/mnt/local'. FYI: OS_MASTER_VENDOR="SUSE_LINUX/i386" (or something else like that) because otherwise |
@gdha FYI: chroot $TARGET_FS_ROOT $grub_name-mkconfig -o /boot/$grub_name/grub.cfg because $grub_name evaluates to "grub2" or "grub" RESCUE e205:~ # chroot /mnt/local ifconfig chroot: failed to run command 'ifconfig': No such file or directory RESCUE e205:~ # chroot /mnt/local /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 52:54:00:25:A4:49 ... see also my new code regarding "mkinitrd_binary" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The I was probably Schlomo?
The changes look sane and should improve statbility - thank you for that! I will run a validation test later today on the new code.
@jsmeix Merged it - results will be posted in gdha/rear-automated-testing#13 |
@gdha FYI regarding who the 'I' actually is: commit 844d50b75ac4b7722f4fee7a5ee3350b93f3adb7 Author: Schlomo Schapiro Date: Sun Jun 6 08:30:21 2010 +0000 - Integrated P2V patch from Heinlein Support. We start with 1.9 now to It is the same commit |
@jsmeix I can confirm the modifications work well on CentOS7 |
# is backed by udev | ||
# probably not required, but I prefer to rely on this information when it is backed by udev | ||
# FIXME: who is 'I'? | ||
# Perhaps Schlomo Schapiro or someone who made the "P2V patch from Heinlein Support"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really long time ago. udev back then was indeed optional on some distros. I would say that this changed and udev is not optional any more.
@schlomo I will do a separated pull request Regarding LogPrint messages like WARNING: Cannot create initramfs ... Check the recreated system (mounted at /mnt/local) and decide yourself, whether the system will boot or not. @schlomo |
Thanks @jsmeix for your consideration. One one hand the warning is justified as it really means "I don't know". On the other hand we should try to give the user even more information here. For example, which systems don't have udev nowadays? Maybe we can say that ReaR 2 actually requires udev and fails without? Then you could get rid of this warning. Another thought: Maybe we should expand this to be a generic feature and collect such warnings in a list of |
I have to think a bit more about it. |
It seems using no login shell for chroot calls |
see #862