You are not logged in.

#1 2018-12-05 11:55:07

corallus
Member
Registered: 2018-12-05
Posts: 3

Can not login as user nor root after trying to format usb stick

After running

sudo mkfs.ext4 -n -I /dev/sdc1 

It gave me some

My system got corrupted. The i3 statusbar failed and internet connection was gone so I rebooted. Now I can not login both as my user account and as root (login incorrect)

I started from live usb, mounted partition containing /etc/ and found out my user is not in /etc/passwd but root is.

https://lh3.googleusercontent.com/6fv2A … 1-h1024-no

The top part is bash history from when I destroyed my system.

Any clues what could have happened?

Mod note: Replaced oversized image -- V1del

Last edited by V1del (2018-12-05 12:01:18)

Offline

#2 2018-12-05 12:21:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: Can not login as user nor root after trying to format usb stick

Please only post thumbnails or links, or even better, post text as text and not as an image

I think there's something missing here, what did it "give" you? That command by itself shouldn't be harmful, also are you certain you are looking at the correct /etc ? Did the sdc you tried to manipulate (again what exactly did you do?) point to the correct device?  I feel we are missing a lot of context here, so there's no telling what happened. Is that shell history from the "recovery" usb boot and not from the system that had the issue?

Offline

#3 2018-12-05 12:45:30

corallus
Member
Registered: 2018-12-05
Posts: 3

Re: Can not login as user nor root after trying to format usb stick

The command failed due to something being wrong with the disk (maybe because it was mounted). sdc1 is the arch iso which I am now running, so nothing happened to it.

It does feel like it tried to format my root partition, although it is strange that all my users are in the /etc/passwd (e.g. privoxy) except the regular user.

I did nothing more than what is shown in the image... The shell history is from the system that had the issue (vim /mnt/home/vincent/.bash_history)

Further context is missing for me as well, that is why I am so hopelessly lost...

Offline

#4 2018-12-05 12:59:26

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Can not login as user nor root after trying to format usb stick

chroot in  from live media or use use the kernel boot paramater init=/bin/bash then check the journal for the boot following the issue did systemd-sysusers recreate all the system users?

Offline

#5 2018-12-05 13:47:26

seth
Member
Registered: 2012-09-03
Posts: 49,962

Re: Can not login as user nor root after trying to format usb stick

mkfs.ext4 -n -I /dev/sdc1

is
a) illegal ("-I" expects a numeric parameter)
b) noop ("-n"), it's only supposed to print what *would* happen

So that command should have given you an error message and is very unlikely the cause for your troubles.
Follow comment #4 and next to the journal check the bash history to figure what you actually called (the image link is semi-private? in case it was depicted there) and the disk health, https://wiki.archlinux.org/index.php/SMART

Online

#6 2018-12-05 13:49:45

corallus
Member
Registered: 2018-12-05
Posts: 3

Re: Can not login as user nor root after trying to format usb stick

Thanks!

Journal

Seems like many files in /etc/ got deleted. Better reinstall?

I still have no clue how this could have happened....

Offline

#7 2018-12-05 13:59:50

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Can not login as user nor root after trying to format usb stick

There is a known data corruption issue that affects 4.19.Y but it is somewhat rare and I would not have expected it to touch files not being written to.
As mitigation you can use scsi_mod.use_blk_mq=0 assuming the device uses scsi_mod if.  Also please run fsck on /dev/sdc1.

Offline

Board footer

Powered by FluxBB