LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-17-2003, 08:23 PM   #1
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
fsck'ing /root


Hi There,

I have been trying to install linux onto a PC, running into problems, getting stuck, and having to power off/on a bunch of times. No I think I've bungled the sectors on it and have been trying to use fsck to fix things. I quickly discovered that I simply couldn't log into RH 7 or MDK 7 on it (which I could previously install, since it only loaded 950-1000 MB of packages, which I think came before the bad sectors), get to the command line and enter (this is in single user mode)

fsck -a /dev/hda

because /hda6 (where / is located) is of course already mounted, and is mounted as read-write.

I read that you could remount a filesystem, so I tried

mount -o ro,remount /dev/hda6 /

It asks for the filesystem type. Looking at fdisk, I'm told its simply linux, which didn't look like an option. So I tried -t ext2. Didn't work.

I tried installing knoppix, and was able to bring up KDE via the CD. I tried to install it to the hard drive, but in the past got cloop errors for various sectors, resulting in a kernel panic and complete shutdown and halt. I had heard someone else had this problem when trying to use ext3, but had no difficulty with installation via reiserfs. I tried this....nope, same problem.

Then I used a RH 7 CD and tried to run fsck in rescue mode. Still can't seem to figure out how to run fsck on /dev/hda6 (can't get the syntax right, always asking for the filesystem...I think I'm giving it using -t <various filesystem types>...no luck.

Then it occured to me! Knoppix run from the CD mounts all the hard drive partitions as read only. Maybe I could run fsck on the hard drive via knoppix! Unfortunately, the forces of the univers continue to conspire against me, and I am no longer able to bring up KDE....get an error that X11 has exited without errors, and then everything proceeds to get shut down, not even dropped to the command line. I need to read up on how to knoppix simply to the command line and see if I can run fsck on the hard drive from there....or...I still have the boot disk for the successful installation of RH 7, even though it is no longer installed to the hard drive. Can I run fsck on the hard drive from the floppy?

Suggestion?

Oh, I should add that the problem might actually be the CD drive. I have burned RH 9 iso's from several sources, using several different CD types and CD burners. Each time, when I run the "test CD" option before installation, I'm told that the CD fails.

Thanks for your input.

Last edited by ehawk; 07-17-2003 at 08:39 PM.
 
Old 07-17-2003, 09:26 PM   #2
warheros
Member
 
Registered: Jun 2003
Location: mason, mi, usa
Distribution: rh9
Posts: 87

Rep: Reputation: 15
hey,

yeah i think im having the same problem as you. i cant reinstall anything and ive tried d/l-ing and burning from different sources and burners. still nothing. always says the cd "failed" when it tests it. if you find anything out let me know! i will do the same.

my post
 
Old 07-18-2003, 01:04 PM   #3
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Original Poster
Rep: Reputation: 48
results of fdisk, fsck

Okay,

I just tried loggin in via the hard drive, and enough of knoppix got installed to bring up the command line at /root. I ran fdisk on /dev/hda, and here are the results:

Device Boot Start End Blocks Id System

/dev/hda1 * 1 3 24066 83 Linux
/dev/hda2 4 1027 8225280 5 Extended
/dev/hda5 4 54 409626 82 Linux Swap
/dev/hda6 55 601 4393746 83 Linux
/dev/hda7 602 1027 3421813+ 83 Linux

The entire hard drive is around 8 GB, so hda2 is basically everything and overlapping with everything excepte hda1. I used fdisk to (at least I thought) remove all the partitions, but when I booted up again, they were still as shown above.

Then I tried running fsck -V -a on each partition. I got back the following:

fsck -V -a /dev/hda1
/boot: clean: 26/6024 files, 3240/24066 blocks

fsck -V -a /dev/hda2
fsck ext2: Attempt to read block from filesystem resulted in short read while trying to opend /dev/hda2 Could this be a zero-length partition?

fsck -V -a /dev/hda5
fsck: fsck.swap: not found
fsck: Error 2 while executing fsck.swap for /dev/hda5

fsck -V -a /dev/hda6
[/sbin/fsck.reiserfs (1) __ /] fsck.reiserfs -a /dev/hda6
Reiserfs super block in block 16 on 0x306 of format 3.6 with standard journal
Blocks (total/free) 1098436/955847 by 4096 bytes
Filesystem is cleanly unmounted
Filesystem seems mounted read-only. Skipping jounral replay.
Checking internal tree...finished.

fsck -V -a /dev/hda7/
/usr: clean, 63968/428544 files, 247781/855453 blocks

exit
logout
is_leaf: nr_item seems wrong: level=1, nr_items=4101
free space=648 rdkeyvs-5150: Search_by_key:
invalid formate found in block 32002. Fsck?


When I try to boot knoppix from CD, I get the above exit respone, plus the following:

FAT bous logical sector 0
is_leaf:nr_item seems wong: level=1, nr_items=4101
free space=648 rdkey vs-5150: Serch_by_key:
invalid format found in block 32002. Fsck?
[21554 23525 0x0 SD]

Executing /et/init.d/xsession start:
Starting X-Windows....
Starting X11....blash:tty:Command not found
[/]root
Error: No suitable X-server found for your card (I am using the Sis 530 chipset, and got a fully-functional knoppix working before)
./etc/init.d/xsession: line 76: /etc/sysconfig/xserver:
./etc/init.d/xsession: line 76: Read-only file system
[The above two lines are reapete four times]
Retrying with Server XFree68(vesa) rm: Cannot remove
'etc/X11/XF86Config-4': Read-only file system
[./etc/init.d/xsession: lines repeated again]

How do I make those partitions/files that I need to remove read-writable?

I just want to clear the entire hard drive, fix any errors, and prepare it
for a clean installation.

Thanks for your help.

Guess I should have tried ctrl-alt-del a lot more often when getting frozen then power off/on...
 
Old 07-21-2003, 08:53 PM   #4
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Original Poster
Rep: Reputation: 48
got knoppix installed

Hi there,

I finally got knoppix installed. What I like about knoppix is that even if it can't install all the packages, it still tries to continue the installation process. RH just froze with an error message, MDK told me about the problem, asked it I wanted to continue, but still looped back to the beginning of the installation process when it got through.

I believe my hd has errors, but I was able to install all importatnt packages by increasing the size of my swap partition to ~900 MB, so that most of the bad sectors fell within the swap partition. If I begin to swap, I'll need a new computer anyway, as I've maxed the RAM on it. The only packages which didn't install correctly were doc pages. I test ran everything, and everything seems okay except the ispell dictionary on KWord (Abiword and OO are fine) and a game called Falcon's Eye, which I've never played.

My friend is giving me one of his old hard drives, so if this one fails, no big deal. All the data I create is ascii text or .rtf files, which easily fit onto floppies.

Thanks for all your help.
 
  


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
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 09:32 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 05:14 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 05:14 PM
cant resize root thru rescue, auto mounts root dir absolutal Linux - Newbie 0 06-18-2003 04:06 PM
Why does kppp.desktop require root userid for non-root user? rdaves@earthlink.net Linux - Networking 4 08-27-2001 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:37 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
Open Source Consulting | Domain Registration