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
Borked install, locked out of root
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!!
- FreewheelinFrank
- Global Moderator
- Posts: 2082
- Joined: 2010-06-07 16:59
- Has thanked: 38 times
- Been thanked: 225 times
-
- 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
Indeed setting up the root and user accounts actually happens at the end of the installation.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.
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.Baphy wrote:I also can’t boot to a Flash drive to reinstall without passing the root login.
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".
Re: Borked install, locked out of root
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!
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!
-
- 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
ACPI errors ? Irrelevant.Baphy wrote:I then got several parse/execution failed errors.
Harmless.Baphy wrote:bash: cannot set terminal process group (-1): Inappropriate ioctl for device
I wrote:Baphy wrote:And then just stops at a blinking cursor.
p.H wrote:set a root password with "passwd".
No.Baphy wrote:I am guessing this may be a user permissions error
Re: Borked install, locked out of root
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!
Thank you again!
Re: Borked install, locked out of root
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.
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.
-
- 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
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:Where do I enter passwd?
No, you don't need to go through rescue mode. It won't help. It won't work without a root password.Baphy wrote:Realized I needed to go through rescue mode
No trailing /. Just /bin/bashBaphy wrote:change 'ro' to 'rw init=/bin/bash/'
You must select the USB drive in the BIOS boot menu.Baphy wrote:I just want to be able to boot to a USB to do a fresh reinstall.
Re: Borked install, locked out of root
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.
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.
-
- 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
This is just an asynchronous unrelated and harmless kernel message. Press Enter to get a new prompt if you need to.Baphy wrote:This shows up, but it immediately gets blasted past to "No Caching mode page found / Assuming drive cache: Write through".
What does never show up ? The boot menu or the USB drive in the boot menu ?Baphy wrote:it never even shows up.
- FreewheelinFrank
- 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
What make and model of computer are you trying to install on exactly?
Re: Borked install, locked out of root
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.
The boot menu shows up fine, but no external USB drive is listed.
I’m trying to install on a 2015 iMac.
- FreewheelinFrank
- 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
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.
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.
Re: Borked install, locked out of root
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?
Re: Borked install, locked out of root
Aha, it appears Apple used Open Firmware instead of BIOS, if that helps: https://smallbusiness.chron.com/enter-b ... 31823.html
Re: Borked install, locked out of root
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.
-
- 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
Like if the keyboard did not work ?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.
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...) ?
AFAIK, Apple used Open Firmware only with PowerPC processors, and switched to x86 processors with UEFI firmware long before 2015.Baphy wrote:t appears Apple used Open Firmware
Anyway I cannot help you about any Apple firmware.
Re: Borked install, locked out of root
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?
GRUB can definitely see the USB drive - (hd2) and its various partitions (gpt1, 2, 3)!
How would I boot directly to hd2 from GRUB?
-
- 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
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: GRUB can definitely see the USB drive - (hd2) and its various partitions (gpt1, 2, 3)!
Type "set" to print GRUB variables. If grub_platform=efi, search for a partition with an /efi/ directoryBaphy wrote:How would I boot directly to hd2 from GRUB?
The EFI partition on the USB drive should have an /efi/boot/bootx64.efi file.
Code: Select all
search.file /efi/boot/bootx64.efi
Code: Select all
ls (hdX,Y)/
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.
Re: Borked install, locked out of root
OK very cool. So I determined that (hd2,gpt1) has the efi directory. I then entered:
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
Code: Select all
set root=(hd2,gpt1)
chainloader /efi/boot/bootx64.efi
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