NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·REALbasic
·All Categories


File system recovery via the serial port w/ Linux
Topic: GNU/Linux   Posted:2002-02-08
Printer Friendly: Print

spacerspacer
In our article Serial Port Multiplexer, we documented a design for a shoestring budget console sharing device. Basically, if you have a bunch of servers that can run their consoles via a serial port, you can use our device to monitor all of these consoles remotely. Well, one of our boxes is sick, and we thought you might like to see what you can do via the serial port, and provide an example of recovering a corrupt ext2 filesystem. Without console access via the serial port, we would have to hook up a monitor to the video card to resolve this, and certainly couldn't do this remotely. One thing that is cool, is that you can hook up a network attached Linux box to control the Serial Port Multiplexer. That way, you could manage your servers remotely over the network. Do be careful about security, OK? Also, for a datacenter, you might want to consider a real Console Access Server like this product from Cyclades.

Here is what you will see on a Linux console if you have a corrupt ext2 filesystem:

Give root password for maintenance
(or type Control-D for normal startup):
Let's just try Control-D for a normal startup:
Unmounting file systems
umount: automount(pid503): not found
umount: /misc: not mounted
Cannot MOUNTPROG RPC: RPC: Port mapper failure - RPC: Unable to send
umount: /share: not mounted
umount: none: not found
umount: /dev/pts: not mounted
Automatic reboot in progress.
Restarting system.
LILO
Loading linux.............
.
.
.
/: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[/sbin/fsck.ext2 -- /] fsck.ext2 -a /dev/sda1
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D for normal startup):
Well, this time let's enter the root password, run fsck, and reboot:
(Repair filesystem) 2 # fsck.ext2 /dev/sda1
e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
/ contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
.
.
.
Inode 91027, i_blocks is 64, should be 8.  Fix? yes
Pass 2: Checking directory structure
Free inodes count wrong (49347, counted=49378).
Fix? yes
/: ***** FILE SYSTEM WAS MODIFIED *****
/: 51198/100576 files (0.2% non-contiguous), 142471/200804 blocks
(Repair filesystem) 3 #
(Repair filesystem) 3 # reboot




Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 NetAdminTools.com

Created by:
MCJ
MCJ CMS