in reply to Regain access to old IO device

in the meantime just boot the device from somewhere you do have root access, say a livecd, mount the disk and erase root's password hash in the (shadow) password file.

Replies are listed 'Best First'.
Re^2: Regain access to old IO device
by afoken (Chancellor) on Jan 11, 2023 at 18:59 UTC

    With access to the bootloader, you probably don't even need a second boot medium. Just passing init=/bin/sh as extra kernel parameter should give you a root shell with / mounted ro, and not much else. mount -o remount,rw / makes / writable. Then do whatever you like (probably mount /proc and /sys). Unmount everything you mounted. After that, there are two ways to cleanly exit: mount -o remount,ro / followed by exec /sbin/init just boots into the regular init. Alternatively, sync once or twice, then reboot the hard way (Ctrl-Alt-Del or reset button or power cycle).

    BTW: Because messing with the bootloader is so easy, paranoid people lock down the bootloader and prevent physical access to the computer.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)