You are not logged in.

#1 2018-01-29 22:02:00

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

[SOLVED] Inadvertent mkswap /dev/sda3 disabled login

To disable an incorrectly set automatic display manager login, I booted via a USB installation media. However, instead of typing

mount /dev/sda1 /mnt
arch-chroot /mnt

to proceed with systemctl operations, I typed

mkswap /dev/sda3
mount /dev/sda1 /mnt
arch-chroot /mnt

Upon restarting the system, I now receive the following error message:

Login incorrect
Give root password for maintenance

What steps do I need to take to correct my error?

Last edited by Michael Gruenstaeudl (2018-01-29 23:02:53)

Offline

#2 2018-01-29 22:14:25

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Inadvertent mkswap /dev/sda3 disabled login

What did sda3 use to contain? Post the contents of your fstab and the output of blkid.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-01-29 22:15:13

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] Inadvertent mkswap /dev/sda3 disabled login

It's hard to tell. What is your disk partition layout? What is supposed to be on /dev/sda3? If it's swap space, that shouldn't really cause any issues (unless you had hibernated the system before).

When you start up your system, at what point does that message appear? Where do you enter the login credentials? Or does it appear just out of the blue?
... or does it boot all the way up to a working login screen? If so, I would claim that not too much is broken (but again, this is hard to tell with the given information), and maybe it's just a matter of setting the correct keyboard layout.

--edit ninja'd

Last edited by ayekat (2018-01-29 22:15:56)


pkgs │ hacks │ cfg │ blag

Offline

#4 2018-01-29 22:27:24

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

Re: [SOLVED] Inadvertent mkswap /dev/sda3 disabled login

ayekat wrote:

It's hard to tell. What is your disk partition layout? What is supposed to be on /dev/sda3? If it's swap space, that shouldn't really cause any issues (unless you had hibernated the system before).

When you start up your system, at what point does that message appear? Where do you enter the login credentials? Or does it appear just out of the blue?
... or does it boot all the way up to a working login screen? If so, I would claim that not too much is broken (but again, this is hard to tell with the given information), and maybe it's just a matter of setting the correct keyboard layout.

--edit ninja'd

/dev/sda2 is my regular swap space, whereas /dev/sda3 is supposed to be /home/

I, thus, typed the following commands

mkswap /dev/sda2
swapon /dev/sda2

in the hope of setting the record straight and "unswapping" /dev/sda3, but to no avail.

The boot process follows the regular process up the point that should produce the login, but then fails with the notification

Login incorrect
Give root password for maintenance
(or press Control-D to continue):

Pressing Ctrl-D results in the error message:

EXT4-fs (sda3): VFS: Can't find ext4 filesystem

The output of command blkid is (shortened, given that I have to type from a different computer):

/dev/sda1: UUID="..." TYPE="ext4" PARTUUID="..."
/dev/sda2: UUID="..." TYPE="swap" PARTUUID="..."
/dev/sda3: UUID="..." TYPE="swap" PARTUUID="..."

Offline

#5 2018-01-29 22:31:27

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Inadvertent mkswap /dev/sda3 disabled login

So you've nuked your home partition then. The easiest fix would be to recreate the filesystem and then restore all the files from your backup.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2018-01-29 22:32:03

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

Re: [SOLVED] Inadvertent mkswap /dev/sda3 disabled login

slithery wrote:

What did sda3 use to contain? Post the contents of your fstab and the output of blkid.

The content of /ect/fstab is (shortened, given that I write from a different computer):

/dev/sda1    /    ext4
/dev/sda3    /home/    ext4
/dev/sda2    none    swap

By comparison, the output of command blkid is (again shortened, given that I have to type from a different computer):

/dev/sda1: UUID="..." TYPE="ext4" PARTUUID="..."
/dev/sda2: UUID="..." TYPE="swap" PARTUUID="..."
/dev/sda3: UUID="..." TYPE="swap" PARTUUID="..."

I understand that /dev/sda3 is currently not set to ext4, but I am uncertain as how to rectify the issue.

Offline

#7 2018-01-29 23:02:39

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

Re: [SOLVED] Inadvertent mkswap /dev/sda3 disabled login

slithery wrote:

So you've nuked your home partition then. The easiest fix would be to recreate the filesystem and then restore all the files from your backup.

Thanks for the blunt and clear answer. I have restored /home/ as you suggested.

Wow ... a single misspelled command has such devastating consequences. I still love Arch Linux, though!

Marked as solved.

Offline

#8 2018-01-29 23:17:58

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Inadvertent mkswap /dev/sda3 disabled login

That was just the easiest fix, as only the first block was overwritten it may have been possible to reset the partition type and use fsck to restore the superblock from one of the on-disk backups.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB