LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2005, 10:08 AM   #1
rabalder321
Member
 
Registered: Dec 2005
Posts: 37

Rep: Reputation: 15
After a powerbreak, Linux can't boot


Hello

The power went down as I had my computer on, and now Linux (Slackware 10.1) won't boot.

I get to the part where the file systems are checked, and my computer tells me there's an error in the file system of /dev/hda1, my root partition.

I get the option to either reboot right away, or type the root password and run some system restore utility, but as soon as I type the password and press enter the system reboots.

If I ctrl-c during the reboot, I get to the usual login part, where I login as root. But when I've entered the password and pressed enter, my computer says:

Unable to change tty /dev/tty1: Read-only filesystem
-bash: id: command not found
-bash: fortune: command not found


I don't have a floppy-drive, thus no boot-disk is available, but maybe theres a way to run some kind of utility from the install-cds (like fsck)? Maybe fstab somehow changed the hda1 to read-only, but as I can't get to a prompt where I can write anything, I don't see any solution to altering the file.

Thanks for any help!

Last edited by rabalder321; 12-14-2005 at 10:57 AM.
 
Old 12-14-2005, 11:25 AM   #2
rabalder321
Member
 
Registered: Dec 2005
Posts: 37

Original Poster
Rep: Reputation: 15
I got it to work!

I passed the following argument to the bootloader:

linux init=/bin/sh

From there I managed to run

fsck

and now it all works just fine!

But I have another question now. When i got logged in after passing the arguments, it seemed as though I was automatically logged in as root. I could access the root directory, and I was able to change to any user without having to give a password. Isn't it possible for anyone to pass linux init=/bin/sh at the bootloader and gain access to everything on my computer? Or to make it a more practical question, how do I fix this so that root privileges are gained only after a password check?

Thanks for any help!
 
Old 12-14-2005, 11:28 AM   #3
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
The root system has apparently become corrupted (the inode table or something, I'm no expert on file systems). When you press ctl-c the system is probably loading the root system read-only, making your system inaccessable to its users.

If you have access to the Internet and a CD-burner, you can burn the full version of the Ultimate Boot CD:
http://www.ultimatebootcd.com/
The full version has INSERT, a live Linux version well suited to diagnostics. From there you can do some fs checking such as e2fsck or whatever is appropriate.

Otherwise, there are also distributions bootable from floppy, they're just less nice.

Good luck
 
Old 12-14-2005, 11:31 AM   #4
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Ah, just a couple minutes too late. You should burn that Ultimate Boot CD anyway just for future incidents.

Your other question is addressed here:
http://www.debian.org/doc/manuals/se...el-root-prompt

That's for Debian but it's a kernel thing and should also work in Slack I guess.

cheers
 
Old 12-14-2005, 11:44 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Rbalder, anyone with physical access to your computer can break into it (or if all else fails just remove the hard drive). This is true of any operating system, and part of the reason why critical computer systems are locked in well-guarded rooms. There's a way to password protect single user mode, but it's easily bypassed with init=/bin/sh which will simply spawn a shell and not do any of the normal init process. The standard way to do it is:

(1) Password protect the bootloader so you can't change the kernel arguments without typing in the password (GRUB can do this, not sure about LILO).

(2) Set the BIOS to only boot off of the hard drive.

(3) password protect the BIOS so the boot order can't be changed (no booting off of LiveCDs).
 
Old 12-15-2005, 06:07 AM   #6
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Well as long as we're being absolute, that's not 100% secure either. From the same "Securing Debian" manual:

"Note: many BIOSes have well known default master passwords, and applications also exist to retrieve the passwords from the BIOS. Corollary: don't depend on this measure to secure console access to system."

Maybe keeping a Doberman in your apartment?
 
Old 12-15-2005, 06:53 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
A bit off topic but..
Quote:
Originally Posted by btmiller
(3) password protect the BIOS so the boot order can't be changed (no booting off of LiveCDs).
Open the computer, remove the CMOS battery, wait 10mn
=>
No more bios password

So in a lot of secure rooms you have:
(4) Lock your cpu with special screws so that it can't be opened easily or at least without noticing it has been opened.

There are still methods to remove the password without even touching the computer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a file that Linux writes upon boot that is the EXACT text as the boot screen lostboy Linux - General 21 01-08-2008 02:10 PM
Cannot boot up on Linux, have to boot onto Linux-nonfb after installing nvidia driver /home/kyle Linux - Newbie 6 09-15-2004 11:23 AM
Grub boot loader menu shows two linux boot options pramos Linux - Newbie 3 09-12-2004 11:40 PM
dual boot - XP and Linux - Need to reinstall XP without effecting linux -LILO boot godofmind Linux - General 1 05-05-2004 08:13 AM
Linux Boot Floppy Went Bad on W2K-Linux Dual Boot rzward Linux - General 2 01-15-2003 10:52 AM


All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration