Netrunner Home

Cannot open access to console : root account is locked


#1

Hello there !

First boot of netrunner 19 (debian) went well, right after live installation, second boot though netrunner failed to start the graphical session and also failed to boot into rescue mode, while printing the following message on the console : cannot open access to console : root account is locked.

There are also instructions to use journalctl -xb to view what’s wrong in the logs, but this is impossible since even rescue mode isn’t working and I have no shell to work with.


#2

Thats unfortunate. Can you try to use the live system and see if you can grab the installation log of the installed system partitions /var/log folder.
Also you might want to chroot into the installed system from the live system and can check the journal from there.


#3

Here’s what I tried, booting from another system on same machine (Mint 17). Netrunner is installed on /dev/sda9 and has a btrfs filesystem

root#ychaouche-PC 10:25:35 ~ # mount /dev/sda9  /mnt/any/
root#ychaouche-PC 10:25:45 ~ # cd /mnt/any/
root#ychaouche-PC 10:25:47 /mnt/any # ls
total 0
drwxr-xr-x 1 root root 238 Jan 12 11:23 @
root#ychaouche-PC 10:25:48 /mnt/any # cd @/
root#ychaouche-PC 10:25:50 /mnt/any/@ # ls
total 40K
lrwxrwxrwx 1 root root    7 Jan 12 11:00 bin -> usr/bin
drwxr-xr-x 1 root root  194 Jan 12 11:22 boot
drwxr-xr-x 1 root root    0 Jul  1 14:40 dev
drwxr-xr-x 1 root root 4.1K Jul  1 16:12 etc
drwxr-xr-x 1 root root    0 Jul  1 14:40 home
lrwxrwxrwx 1 root root   30 Jan 12 11:13 initrd.img -> boot/initrd.img-4.19.0-1-amd64
lrwxrwxrwx 1 root root   30 Jan 12 11:13 initrd.img.old -> boot/initrd.img-4.19.0-1-amd64
lrwxrwxrwx 1 root root    7 Jan 12 11:00 lib -> usr/lib
lrwxrwxrwx 1 root root    9 Jan 12 11:00 lib32 -> usr/lib32
lrwxrwxrwx 1 root root    9 Jan 12 11:00 lib64 -> usr/lib64
lrwxrwxrwx 1 root root   10 Jan 12 11:00 libx32 -> usr/libx32
drwxr-xr-x 1 root root    0 Jan 12 11:00 media
drwxr-xr-x 1 root root   32 Jul  1 16:06 mnt
drwxr-xr-x 1 root root   26 Jan 12 11:11 opt
drwxr-xr-x 1 root root    0 Jul  1 14:40 proc
drwx------ 1 root root  158 Jul  1 16:23 root
drwxr-xr-x 1 root root    0 Jul  1 14:40 run
lrwxrwxrwx 1 root root    8 Jan 12 11:00 sbin -> usr/sbin
drwxr-xr-x 1 root root    0 Jan 12 11:00 srv
drwxr-xr-x 1 root root    0 Jul  1 14:40 sys
drwxrwxrwt 1 root root  236 Jul  7 09:21 tmp
drwxr-xr-x 1 root root  116 Jan 12 10:58 usr
drwxr-xr-x 1 root root   90 Jan 12 11:19 var
lrwxrwxrwx 1 root root   27 Jan 12 11:13 vmlinuz -> boot/vmlinuz-4.19.0-1-amd64
lrwxrwxrwx 1 root root   27 Jan 12 11:13 vmlinuz.old -> boot/vmlinuz-4.19.0-1-amd64
root#ychaouche-PC 10:25:50 /mnt/any/@ # cd
root#ychaouche-PC 10:26:05 ~ # chroot /mnt/any/@/
root@ychaouche-PC:/# whoami
root
root@ychaouche-PC:/# pwd
/
root@ychaouche-PC:/# ls
bin   etc         initrd.img.old  lib64   mnt   root  srv  usr      vmlinuz.old
boot  home        lib             libx32  opt   run   sys  var
dev   initrd.img  lib32           media   proc  sbin  tmp  vmlinuz
root@ychaouche-PC:/# journalctl -xb
No journal files were found.
Failed to get boot id: No such file or directory
root@ychaouche-PC:/#

It seems I also have problems accessing logs :frowning:, but maybe that’s because the /proc/ filesystem isn’t mounted ? (see : https://github.com/lnykryn/systemd-rhel/blob/273a3d35df021128bd72e124d943cbb7b1c7194c/src/libsystemd/sd-id128/sd-id128.c#L172)

Any tips ?


#4

Yeah you need to mount
/sys
/proc
/dev

You can bind mount dev from your live system first by performing

sudo mount -o bind /dev /mnt/any/@/dev

Then inside the chroot you can mount /sys and /proc like this

mount -t proc proc /proc
mount -t sysfs sys /sys

Hope that works :slight_smile:


#5

Hello,

Here’s part what I found in boot.log

[  OK  ] Mounted /home.
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[FAILED] Failed to mount /dev/sda3.
See 'systemctl status dev-sda3.mount' for details.
[DEPEND] Dependency failed for Local File Systems.
         Starting Set console font and keymap...
[  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Login Prompts.
[  OK  ] Closed Syslog Socket.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Sound Card.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Paths.
[  OK  ] Started Emergency Shell.
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Create Volatile Files and Directories...
         Starting Load AppArmor profiles...
[  OK  ] Reached target Emergency Mode.
[  OK  ] Started Show Plymouth Boot Screen.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.

I can see there was a problem with /dev/sda3, which is an ntfs filesystem (my windows D:/ drive)
Unfortunately, I cannot get the status since I am running in chroot

root@ychaouche-PC:/# systemctl status dev-sda3.mount
Running in chroot, ignoring request: status
root@ychaouche-PC:/#

/dev/sda3 is not important anyways, it just holds some user data.

Here’s the end of boot.log

[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Time Synchronization...
[  OK  ] Started File System Check on /dev/disk/by-uuid/8ec978fe-39d3-4c9b-ab57-4eaf4b975dd7.
         Mounting /home...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Load AppArmor profiles.
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
         Starting Raise network interfaces...
[  OK  ] Mounted /home.
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.

Many lines like this in /var/log/debug

Jul 1 14:50:09 ychaouche-pc kernel: [ 50.996879] pcieport 0000:00:1c.6: can't find device of ID00e6

I don’t know what other info I could provide. The journalctl -xb command doesn’t show any useful output :

root@ychaouche-PC:/# journalctl -xb
No journal files were found.
-- No entries --
root@ychaouche-PC:/#

Any help appreciated.


#6

Could you try editing the sda3 line in the installed systems /etc/fstab out. You need root rights to edit this file.


#7

leszek,

You had the right feeling ! now I’m booting netrunner :slight_smile:

A few things remain mystery :
-1 Why no emergency console ? (root account is locked)
-2 Why didn’t the system simply ignore the faulty line in fstab and continue the boot process (root partition could be mounted) ?

Here’s the faulty /etc/fstab if anyone’s interested :

ychaouche#ychaouche-pc 10:25:14 ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=8ec978fe-39d3-4c9b-ab57-4eaf4b975dd7 /home          ext4    defaults,noatime 0 2
UUID=0bf7120b-2b1d-432c-a3a9-1f2603240e2f swap           swap    defaults,noatime 0 2
UUID=0448474f-1ba1-4ef9-b627-c8dfaaae8644 /              btrfs   subvol=@,defaults,noatime,space_cache,autodefrag 0 1

# Yassine
# stolen from /etc/fstab on /dev/sda5 mint 17 Qiana
# UUID=2CC6D327C6D2EFD6 /dev/sda3       /mnt/partage_local      ntfs    defaults 0 2 

Here’s the output of blkid from netrunner :

ychaouche#ychaouche-pc 10:29:10 ~ $ blkid
/dev/sda1: LABEL="RM-CM-)servM-CM-) au systM-CM-(me" UUID="2C1AE3A61AE36B72" TYPE="ntfs" PARTUUID="90909090-01"
/dev/sda2: UUID="367A3A5F7A3A1BD5" TYPE="ntfs" PARTUUID="90909090-02"
/dev/sda3: LABEL="UserData" UUID="2CC6D327C6D2EFD6" TYPE="ntfs" PARTUUID="90909090-03"
/dev/sda5: LABEL="This is Mint" UUID="3e260f17-2ab1-49ae-a2d5-5f586e6df1b4" TYPE="ext4" PARTUUID="90909090-05"
/dev/sda6: LABEL="This is home" UUID="8ec978fe-39d3-4c9b-ab57-4eaf4b975dd7" TYPE="ext4" PARTUUID="90909090-06"
/dev/sda7: UUID="0bf7120b-2b1d-432c-a3a9-1f2603240e2f" TYPE="swap" PARTUUID="90909090-07"
/dev/sda8: LABEL="This is var" UUID="0f1a9dcd-21bc-4270-b941-ad8dbc620ebd" TYPE="ext4" PARTUUID="90909090-08"
/dev/sda9: LABEL="Was netrunner" UUID="0448474f-1ba1-4ef9-b627-c8dfaaae8644" UUID_SUB="4ad0aeeb-d33c-4971-b91f-7f455165c410" TYPE="btrfs" PARTUUID="90909090-09"
ychaouche#ychaouche-pc 10:30:11 ~ $

#8

By default we don’t set a root password but your user password is used for sudo tasks. I assume this option in the installer does not set a root password then and might lock the account then.
But it needs a bit of investigation.

This is indeed very strange but the default behavior of systemd.
In general add only the partitions to your fstab (in the installer under manual partitioning) that you are sure of that they can be read and mounted by system).
A windows partition or any other operating system partition that you don’t actually need at boot time I would dynamically mount with udisks by just clicking on the drive/partition after bootup in dolphin.