Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Borked install, locked out of root

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
Baphy
Posts: 13
Joined: 2021-04-06 23:35

Borked install, locked out of root

#1 Post by Baphy »

Hello! I botched a Debian install by quitting the install process too early. Despite entering a root password during the part of the install I completed, that login no longer works. Booting Debian from BIOS now takes me directly to a root login that I cannot pass or exit. I also can’t boot to a Flash drive to reinstall without passing the root login. About the only thing I can do is exit to GRUB in the first few seconds of booting the BIOS. Is there a way to fresh reinstall or start over, maybe from GRUB? My machine appears to be bricked in the meantime. I’ve looked online but can’t find answers at least at my skill level. Thank you!! ❤️

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: Borked install, locked out of root

#2 Post by FreewheelinFrank »

Why can't you change the BIOS settings to boot from USB?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Borked install, locked out of root

#3 Post by p.H »

Baphy wrote:I botched a Debian install by quitting the install process too early. Despite entering a root password during the part of the install I completed, that login no longer works.
Indeed setting up the root and user accounts actually happens at the end of the installation.
Baphy wrote:I also can’t boot to a Flash drive to reinstall without passing the root login.
What do you mean ? You do not need any root password to boot a USB drive. Just use the BIOS boot menu or change the boot priority in the BIOS settings.

You can boot to a root shell without password by editing the GRUB entry (type 'e') and replacing "ro" with "rw init=/bin/bash" at the end of the "linux" line. Then you can set a root password with "passwd".

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#4 Post by Baphy »

Thank you, I tried editing the GRUB entry.

I then got several parse/execution failed errors.
It then started loading /dev/sda2
It then stated - bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
No caching mode page found
Assuming drive cache: write through

And then just stops at a blinking cursor.

I am guessing this may be a user permissions error, this is the best I can find (in Russian though): https://ubuntugeeks.com/questions/20526 ... job-contro

Thank you again for your help!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Borked install, locked out of root

#5 Post by p.H »

Baphy wrote:I then got several parse/execution failed errors.
ACPI errors ? Irrelevant.
Baphy wrote:bash: cannot set terminal process group (-1): Inappropriate ioctl for device
Harmless.
Baphy wrote:And then just stops at a blinking cursor.
I wrote:
p.H wrote:set a root password with "passwd".
Baphy wrote:I am guessing this may be a user permissions error
No.

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#6 Post by Baphy »

OK, thank you. Where do I enter passwd? I can't get to a command line after booting with the rw init=/bin/bash added, just blinking cursor. Does it go in the setparams file - what is the syntax please?

Thank you again!

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#7 Post by Baphy »

OK doing my best to work through this. Realized I needed to go through rescue mode. Here's my current steps:

1. Boot into BIOS
2. Navigate to Debian 10 rescue mode
3. 'e' to edit parameters; change 'ro' to 'rw init=/bin/bash/' (it still says "single" after)
4. F10 to boot
5. It then proceeds to boot, but then tells me "Cannot open access to console, the root account is locked." Can't get to command line to enter passwd.

Ideally I just want to be able to boot to a USB to do a fresh reinstall. Maybe there's a workaround to do that.

Pardon my ignorance, and thank you again for your help.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Borked install, locked out of root

#8 Post by p.H »

Baphy wrote:Where do I enter passwd?
At the blinking cursor after the prompt root@(none):/#. If you do not see the prompt, pressing the "enter" key alone should print it.
Baphy wrote:Realized I needed to go through rescue mode
No, you don't need to go through rescue mode. It won't help. It won't work without a root password.
Baphy wrote:change 'ro' to 'rw init=/bin/bash/'
No trailing /. Just /bin/bash
Baphy wrote:I just want to be able to boot to a USB to do a fresh reinstall.
You must select the USB drive in the BIOS boot menu.

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#9 Post by Baphy »

At the blinking cursor after the prompt root@(none):/#. If you do not see the prompt, pressing the "enter" key alone should print it.

This shows up, but it immediately gets blasted past to "No Caching mode page found / Assuming drive cache: Write through". It is going to [sdb] here.

You must select the USB drive in the BIOS boot menu.

Kind of the issue... it never even shows up. :( I just double checked that the USB media is correct, as well.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Borked install, locked out of root

#10 Post by p.H »

Baphy wrote:This shows up, but it immediately gets blasted past to "No Caching mode page found / Assuming drive cache: Write through".
This is just an asynchronous unrelated and harmless kernel message. Press Enter to get a new prompt if you need to.
Baphy wrote:it never even shows up.
What does never show up ? The boot menu or the USB drive in the boot menu ?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: Borked install, locked out of root

#11 Post by FreewheelinFrank »

What make and model of computer are you trying to install on exactly?

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#12 Post by Baphy »

I can’t get to a new prompt by pressing enter. It stays at a blinking cursor and I can’t input anything.

The boot menu shows up fine, but no external USB drive is listed.

I’m trying to install on a 2015 iMac.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: Borked install, locked out of root

#13 Post by FreewheelinFrank »

Is it possible you also borked the USB drive when you interrupted the installation? Do you have access to another computer to test it?

Edit: It looks like Apple don't use a conventional BIOS, so you might be stuck at some sort of EFI firmware password which Apple seem to use. Outside my experience, but somebody familiar with Apples should be able to help.

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#14 Post by Baphy »

I considered that, so I re flashed the drive. No dice. Weird Apple BIOS seems likely as it’s not responding in the manner suggested above. Would be great if somebody more familiar with Apple BIOS knows more?

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#15 Post by Baphy »

Aha, it appears Apple used Open Firmware instead of BIOS, if that helps: https://smallbusiness.chron.com/enter-b ... 31823.html

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#16 Post by Baphy »

Can confirm however that the password it’s asking for is one I set during Debian install. However that password seems to have been corrupted or something by early install exit, so it’s not recognizing anything I put in.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Borked install, locked out of root

#17 Post by p.H »

Baphy wrote:I can’t get to a new prompt by pressing enter. It stays at a blinking cursor and I can’t input anything.
Like if the keyboard did not work ?
Do you confirm that the keyboard works properly at the login prompt after booting normally ?

You may be able to boot the installer from the USB drive if GRUB can see it. At the GRUB menu, press "c" to get into the GRUB shell then type "ls" to print the available drives and partitions. Does it show more than one drive (hd0, hd1...) ?
Baphy wrote:t appears Apple used Open Firmware
AFAIK, Apple used Open Firmware only with PowerPC processors, and switched to x86 processors with UEFI firmware long before 2015.
Anyway I cannot help you about any Apple firmware.

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#18 Post by Baphy »

Ah, the keyboard works, it just won't let me get to a command line prompt at that point.

GRUB can definitely see the USB drive - (hd2) and its various partitions (gpt1, 2, 3)!

How would I boot directly to hd2 from GRUB?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Borked install, locked out of root

#19 Post by p.H »

Baphy wrote: GRUB can definitely see the USB drive - (hd2) and its various partitions (gpt1, 2, 3)!
Are you sure this is the USB drive and not the internal drive ? If yes, how did you prepare that USB drive ? The Debian installer should have only 2 "apple" partitions and 1 "msdos" partition ; no "gpt" partition.
Baphy wrote:How would I boot directly to hd2 from GRUB?
Type "set" to print GRUB variables. If grub_platform=efi, search for a partition with an /efi/ directory
The EFI partition on the USB drive should have an /efi/boot/bootx64.efi file.

Code: Select all

search.file /efi/boot/bootx64.efi
You can also search manually in a partition with

Code: Select all

ls (hdX,Y)/
When found in partition (hdX,Y), type

Code: Select all

set root=hdX,Y
chainloader /efi/boot/bootx64.efi
boot
Last edited by p.H on 2021-04-09 14:04, edited 1 time in total.

Baphy
Posts: 13
Joined: 2021-04-06 23:35

Re: Borked install, locked out of root

#20 Post by Baphy »

OK very cool. So I determined that (hd2,gpt1) has the efi directory. I then entered:

Code: Select all

set root=(hd2,gpt1)
chainloader /efi/boot/bootx64.efi
GRUB then output a long file path ending in /EndEntire.

I then entered boot, and it simply returned to the same BIOS screen, and then booted to the same password lockout when I booted Debian :(

Post Reply