Problem: you can’t login even you have entered the right password..Then here is (hopefully) the solution:
Assumption 1: It is a problem with the login shell. You have to check three things:
- exists the shell? (Maybe the path is wrong)
the path is found in “/etc/passwd” (last column behind user account)
- is the shell readable? check via ls -l <pathtoshell>. There must be a “r” in every column (uncommon error)
- (most tricky) is the shell path in “/etc/shells”? It must be the “exact” path not a path which points to the same shell
Assumption 2: User account is locked
This problem is very easily fixable. Just enter (as root):
usermod -U <account name>
Assumption 3: it’s the user folder
There could be multiple problems with the user folder for the account
- does it exist? look in “/etc/passwd” (the second last column) if the path exist
- are the read write permissions of your home folder correct?
You have to check
1) the basedirectory (e.g. /home/laura)
2) the shell specific files (e.g. /home/laura/.bashrc)
3) (graphic login only) .xsession .xsession-error must be read writeable
Check this via ls -l and change the permissions via
“chmod 770 <path>”
- are you the owner? same as 2 (just watch the owner)
“chown <account name>[[:<usergroup of account>]] <path>”
problem was: my logitech c270 webcam had stripes wandering around, I think you could call it flicker. I tried everything but nothing helped. Just changing the resolution helped a bit.
now the real solution and the real problem: adjust via v4l2-ctl -c powerline_frequency the powerline frequency. The flickering immediately stopped for me. To see which values it can have use v4l2-ctl -L
for me worked:
v4l2-ctl -c powerline_frequency=1
It was simply the power supply!!! It has an other frequency in Germany than in the home country of logitech. The technicians saw this problem coming so include such an option but… they were too silent (should have dropped an entry in the FAQ explaining that).
Ok, I use linux and the tool of logitech would surely have adjusted this but I’m windows free.
There are three painful things you can meet if you want to install a system: limited installer, unbootable systems and silent bugs making garbage out of your target system.
Installing linux on usb is meeting all three. The standard usb installer is too limited so you have either to install with the installer directly on your flashdrive (something I wouldn’t recommend) or to install in an virtual machine and put it on the drive afterwards (recommend because of a second try and an easy update method).
The first thing to do is setting up a virtual machine. For this I would recommend qemu-kvm and a frontend like virtualbricks. Virtualbricks is not really finished so it has is rough edges but it is usable. Important is that the virtual disk file has raw format. This will be important in the second step. Install a system you like in my case archlinux in the virtual machine and configure it like you want it in the end. Don’t forget to configure the usb support! Use uuids: this will make the system robust. Try to use just one partition and optional one swap partition. It will make things much easier. Remember: if you want the virtual machine as template think about folders which will later contain user files.
For the next part you need root permissions:
The next step is to “mount” the raw file via losetup.
This can be done via losetup -f -P <path to raw file>.
little explaination: -f is for using the next unused loop and -P for recognizing the partitions.
If you can’t create an loop device and restart your PC (this error happened mainly because of a kernel update).
The underlaying partitions are now visible as /dev/loopXpX. They are visible but not mounted. Mount them whereever you like but think about the flashdrive: its partitions have to be mounted too and doing this via the user account is not enough.
After mounting the source partition the target partition have to be mounted. It should be big enough for the files copied in the next step. And IMPORTANT: mount the target partition as root even you copy the files as root. I don’t know why exactly but some programs like sudo or gdm break elsewise. Also be careful with the partition type: It must be supported by the system you have configured in your virtual machine and it must support acl attributes. Fat32 is not enough.
The next step is transfering the files via a acl preserving copy program. In my case rsync
Rsync is a program to sync a target with a source. It can also be used for updates.
For transfering the data with preserved acls use:
rsnyc -a –progress /source /destination
Rsync can be extended almost like you want:
–progress for being verbose (important if you want to limit data breaches by inattention)
-a for preserving the important attributes
–exclude for excluding folders from being transfered. This will be important for updates but not for the installation. Excluding canditates are /etc/fstab /boot/grub/grub.cfg (or whatever).
Warning: rsync –exclude /xy/* … is your enemy. It will transfer in the worst case all your private data on the flashdrive. Have a happy day with shredding them all.
This step is just important in case if no bootloader is installed or should be updated:
Mount via: “mount -o bind” /sys, /dev and /proc in your target system
Example: mount -o bind /sys /target/sys
Afterwards use chroot:
chroot /target bash
You will see the command line changing. This means you are in your target system. Of course with your real kernel but the programs are already the ones of your target.
Now you have to install the bootloader on the flashdrive (in my case grub):
Now exit via ‘exit and unmount the binded directories via:
The installation of the bootloader has changed an important file: grub.cfg or whatever. Now it will think it isn’t on the first disk what is wrong in our case.
Replace it with the original file
The last thing to do is to adjust the file paths. You need the uuids of the new partitions (they aren’t them used in the virtual machine)
look them up with:
ls -l /dev/disk/by-uuid/
Files where the uuids need to be replaced are:
/etc/fstab (optional: update the uuid of the swap partition)
/etc/grub/grub.cfg (or whatever your bootloader uses)
for thinkpad users: have a look on my previous post
Thinkpads don’t start devices even they are correctly formatted.
The reason for this is a weird detection algorithm:
Thinkpads look for a boot flag. If no partition has one the device is not accepted as boot device.