1

I have a workstation with a Debian 8 with a XFCE and 8GB hdd. I want to resize a partition. I do:

e2fsck -f /dev/sda1
resize2fs -M /dev/sda1 #resize fs to minimal size;
fdisk /dev/sda1 #remove partition; write;
fdisk /dev/sda1 #create partition with smaller size; write;
resize2fs /dev/sda1 #resize fs to maximal size;

After this I have broken system. I get a logout if I login as user. There is no error if I login as root. Where I can look for an error in system logs?

6
  • /var/log/syslog, /var/log/auth.log are possible candidates. You could also check if the /home partition exists and if it's mounted, error-free, etc., that would explain why you can login as root (which is on a different partition) but can't do with a regular user.
    – nKn
    Commented Dec 23, 2015 at 5:58
  • The operation you have performed deletes the partition content, so whatever you had on /dev/sda1 is now gone. Did you back it up before the resize? If not, then you can only reinstall it. What is the mount-point of the partition? Commented Dec 23, 2015 at 6:33
  • I have only one partition. After resize i have >100 mb space.
    – NCNecros
    Commented Dec 23, 2015 at 7:23
  • Can you provide the info mount, cat /etc/passwd ? Commented Dec 23, 2015 at 10:33
  • Did you do this on a live filesystem? You should first have reduced the filesystem size, only then reduce the partition size. If there was data beyond the new end, the resize operation can't reach it to copy it to a safe location.
    – wurtel
    Commented Dec 23, 2015 at 12:00

0

You must log in to answer this question.

Browse other questions tagged .