* Booting Into Single User Mode with GRUB
@ Adam MacLeod
` Doug Sutherland
` Doug Sutherland
0 siblings, 2 replies; 7+ messages in thread
From: Adam MacLeod @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
Hey list:
I have a question. How would one boot successfully into single user mode with the GRUB boot loader, when it has been configured with a password? Obviously, the boot manager screen does not talk, so its a chore to get it to work correctly.
We can press a to get to the boot parameters, or at least to a point where it doesn't continue booting, because it doesn't start to babble. But we're not sure if it is asking for the GRUB password to even access the boot parameters, or what is happening on the screen. I'm considering sighted assistance as a last last resort, so if anyone has experience booting into run level 1 without it, and with a GRUB password, that's the suggestions I'm looking for.
Regards:
Adam MacLeod
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Booting Into Single User Mode with GRUB
Booting Into Single User Mode with GRUB Adam MacLeod
@ ` Doug Sutherland
` Adam MacLeod
` Doug Sutherland
1 sibling, 1 reply; 7+ messages in thread
From: Doug Sutherland @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
One way to get past grub password is to boot with a bootable
CD-ROM that loads a linux ramdisk and gives you a console
prompt. Hopefully you have one with speech capability. Once
at the console prompt, you can create a mount point, mount
the root partition, edit the grub.conf to delete the password
line, also append the keyword single to the end of the kernel
line in grub.conf, save, exit, and reboot.
If you don't want to include single in the grub.conf, once the
password line is removed and you have rebooted, at the
grub menu, if you press e, it allows you to edit the command,
so you can append the single keyword to make it boot into
single user mode. When you press e the bootloader menu
will show the grub conf lines for example:
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.-1-686 root=/dev/hda1 ro
initrd /boot/initrd.img-2.6.15-1.686
savedefault
boot
So to boot single user, the procedure would be:
press e to enter edit mode on the grub menu
press down arrow to position cursor on the kernel line
append space and single to end of kernel line
press enter to save that change
press b to boot
enter root password
Also, I can't verify if this works at the moment, but I found
these instructions to get past the grub password:
While booting press e in grub menu
Go to to the second line and press e again then type 1 at the end
Press enter to save changes
Press b to boot
Adam MacLeod wrote:
How would one boot successfully into single user mode with the
GRUB boot loader, when it has been configured with a password?
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Booting Into Single User Mode with GRUB
` Doug Sutherland
@ ` Adam MacLeod
` Doug Sutherland
` Doug Sutherland
0 siblings, 2 replies; 7+ messages in thread
From: Adam MacLeod @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
Hi.
Thank you for your suggestion.
I'm actually asking on behalf of a friend. He has forgotten his root
password, so we cannot enter a root password to boot the machine.
I've booted into single user mode without having to enter the root password
on FC2. My friend has an FC3 box.
----- Original Message -----
From: "Doug Sutherland" <doug@proficio.ca>
To: "Speakup is a screen review system for Linux." <speakup@braille.uwo.ca>
Sent: Tuesday, February 13, 2007 9:59 PM
Subject: Re: Booting Into Single User Mode with GRUB
> One way to get past grub password is to boot with a bootable
> CD-ROM that loads a linux ramdisk and gives you a console
> prompt. Hopefully you have one with speech capability. Once
> at the console prompt, you can create a mount point, mount
> the root partition, edit the grub.conf to delete the password
> line, also append the keyword single to the end of the kernel
> line in grub.conf, save, exit, and reboot.
>
> If you don't want to include single in the grub.conf, once the
> password line is removed and you have rebooted, at the
> grub menu, if you press e, it allows you to edit the command,
> so you can append the single keyword to make it boot into
> single user mode. When you press e the bootloader menu
> will show the grub conf lines for example:
>
> root (hd0,0)
> kernel /boot/vmlinuz-2.6.15.-1-686 root=/dev/hda1 ro
> initrd /boot/initrd.img-2.6.15-1.686
> savedefault
> boot
>
> So to boot single user, the procedure would be:
>
> press e to enter edit mode on the grub menu
> press down arrow to position cursor on the kernel line
> append space and single to end of kernel line
> press enter to save that change
> press b to boot
> enter root password
>
> Also, I can't verify if this works at the moment, but I found
> these instructions to get past the grub password:
>
> While booting press e in grub menu
> Go to to the second line and press e again then type 1 at the end
> Press enter to save changes
> Press b to boot
>
> Adam MacLeod wrote:
> How would one boot successfully into single user mode with the
> GRUB boot loader, when it has been configured with a password?
>
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Booting Into Single User Mode with GRUB
` Adam MacLeod
@ ` Doug Sutherland
` Doug Sutherland
1 sibling, 0 replies; 7+ messages in thread
From: Doug Sutherland @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
It used to be the case that if you booted single user mode
you would get a console prompt without having to login
and you could just type passwd to change the password.
However, I just tried, and on my system it does ask for
a login even in single user mode.
If single user mode is asking for a login, then you may
have to boot with a bootable CDROM, mount the root
partition in read-write mode
mount -o remount,rw /dev/hda1
Then edit /etc/shadow to remove the password for root user.
That is, everything past the first : until before the second :
You may need to force the save in the editor, for example in
vi save with :wq! or :x!
As an aside to this, since it's still easy to change passwords
and such, to do the inverse and increase security, here is
an example using lilo instead of grub:
Password protect the BIOS, this way BIOS boot configuration
cannot be changed without entering BIOS password first.
In BIOS settings, change the boot preferences to ONLY boot
from the hard drive with the root partition, disable all other
choices.
In the lilo configuration, set the timeout to zero, use the
keyword restricted, and use the password option in lilo.
Change permissions on /etc/lilo.conf so that only root can
view and modify. Use chattr +i /etc/lilo.conf for some extra
protection. Run lilo to update.
Now the system will not load anything without the BIOS
password, and will boot immediately into the root partition
on hard drive. It will not allow entering boot parameters,
so no access to single user mode. It will not boot from any
removable media like CDROM or floppy.
But don't forget the BIOS password!
-- Doug
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Booting Into Single User Mode with GRUB
` Adam MacLeod
` Doug Sutherland
@ ` Doug Sutherland
` Gene Collins
1 sibling, 1 reply; 7+ messages in thread
From: Doug Sutherland @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
One more suggestion if the other methods are not viable.
Remove hard drive from machine with unknown password.
Add it as second drive on machine with speech working.
If IDE drive it may need to be jumpered to be a slave.
Then you can boot your normal system and do those same
changes to the root file system of the other systems drive
while having speech tools working (edit the /etc/shadow).
-- Doug
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Booting Into Single User Mode with GRUB
` Doug Sutherland
@ ` Gene Collins
0 siblings, 0 replies; 7+ messages in thread
From: Gene Collins @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
Hi all. You can use the append mode in grub that Doug was describing,
and append init=/bin/bash to get just a shell prompt. You then have to
remount the root system as rw, for example mount /dev/hda1 -o remount,rw
Now you can use passwd to change the root password. The problem with
this approach is that when you reboot, your system will perform an fsck
because the reboot doesn't gracefully unmount file systems.
Gene
>One more suggestion if the other methods are not viable.
>Remove hard drive from machine with unknown password.
>Add it as second drive on machine with speech working.
>If IDE drive it may need to be jumpered to be a slave.
>Then you can boot your normal system and do those same
>changes to the root file system of the other systems drive
>while having speech tools working (edit the /etc/shadow).
>
> -- Doug
>
>
>_______________________________________________
>Speakup mailing list
>Speakup@braille.uwo.ca
>http://speech.braille.uwo.ca/mailman/listinfo/speakup
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Booting Into Single User Mode with GRUB
Booting Into Single User Mode with GRUB Adam MacLeod
` Doug Sutherland
@ ` Doug Sutherland
1 sibling, 0 replies; 7+ messages in thread
From: Doug Sutherland @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
Correction, I think you would need to press e twice,
once to enter edit mode, a second time when cursor is
on the kernel line (second line).
So to boot single user, the procedure would be:
press e to enter edit mode on the grub menu
press down arrow to position cursor on the kernel line
press e to edit the kernel line
append space and single to end of kernel line
press enter to save that change
press b to boot
enter root password
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
Booting Into Single User Mode with GRUB Adam MacLeod
` Doug Sutherland
` Adam MacLeod
` Doug Sutherland
` Doug Sutherland
` Gene Collins
` Doug Sutherland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).