Jump to content

Screwed up my fs or hdd, again!


Pepse
 Share

Recommended Posts

Well, this will probably be a long one. To start I tried to get my HP Photosmart digi camera to work on MDK 9.0 (again) and I messed up my hdd/partitions. I (1) didn't want to bother anybody with my situation so (2) I tried to get it so my /dev/sda would somehow work so that I could transfer my pix to the hdd. Well after trying and trying for about a half hour I got mad and more or less tried to rename sda to (I think) ext3 or ext2; I dunno which or what. Anyway after a bit of thinking I realized I would not want to reboot the computer; and yet I would have to because the problem has to be fixed. So when I rebooted my computer I get this error:

 

Checking filesystems

/dev/hda6: clean, 9680/ 2932736 files,

fsck. ext3/devsda1.

The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the Superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>

: No such file or directory while trying to open /dev/sda1

Failed to check filesystem. do you want to repair the errors? (y/n)

 

Well of course I typed "Y" and it repeated the last item of: No such file or directory blah,blah, blah, etc. I even tried "e2fsck -b" as well as a few other "- some other letters" that were provided and nothing works.

 

So, what do I do now?? :oops: .

 

Pepse.

 

I thank the gods for my having enough brains to have an extra hdd with MDK 9.0 on it; anyways.

Link to comment
Share on other sites

I'm a little confused as to whether sda1 was actually a Linux partition or not, originally. If it was, here's what you might try:

 

You should get a prompt allowing you to manually check the file system, without the automatic repair. Tell it that you wish to do this.

 

run mke2fs -n /dev/sda1 -- this will simulate making a filesystem without actually doing it. In the process, it will show you your block sizes (if it was an ext2 or ext3 FS, that is).

 

Here's what it would look like with one of my disks (I'll have to umount & remount in my case, since I'm on a running system)

root@timestorm:/home/terry# umount /media && mke2fs -n /dev/hdd1; mount /media

mke2fs 1.32 (09-Nov-2002)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

7340032 inodes, 14653918 blocks

732695 blocks (5.00%) reserved for the super user

First data block=0

448 block groups

32768 blocks per group, 32768 fragments per group

16384 inodes per group

Superblock backups stored on blocks: 

       32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 

       4096000, 7962624, 11239424

 

Now, if I wanted to use alternate superblocks, I can see where there are located, so with the e2fsck, etc.) and other switches, as appropriate.

Link to comment
Share on other sites

I gotta be brief 'cause it's gettin' late. The sda1 was created when I first was trying to get my digi camera to do something (about 2 months ago) and I didn't get nowhere then but I didn't try as hard as I did Sun. night.

 

I will copy your info and try it tomorrow (Tues.); because like I said I am on the other hdd and it's late.

 

Later. Pepse.

Link to comment
Share on other sites

OK, hopefully this info will help. First to say is most of what I typed yesterday was from what I could see on the screen after trying a few things that didn't work. So here is what shows up on the initial boot:

 

Checking Filesystems

/devhda6: clean 9680/ 2932736 files,

 

/dev/sda1

The Superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>

 

fsck.ext3: No such file or diectory while trying to open /dev/sda1

Failed to check filesystem. Do you want to repair the errors? (Y/N)

I then typed "Y" and the response is:

 

*** An error occured during the filesystem 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):

(Repair filesystem)#1 "So I used your mke2fs -n /dev/sda1 and the reply is:

Could not stat /dev/sda1 ---No such file or directory

The device apparently does not exist; did you specify it correctly?

 

The one thing I seem to remember is that in my "madness" I changed sda1 to ext3.

 

Pepse.

Link to comment
Share on other sites

OK, let me see if I can recall what I did. I went to MCC, hardware list, and clicked on /sda1 under "disk" and it showed my HP camera on the right side of the page under "information" and at the bottom I clicked on "run config tool" which takes me to "diskdrake" and I clicked on "FAT" and "expert mode" and then it gave me some options (( I am kinda using this hdd to get an idea of what I did, so I can't go too far for fear of screwing this one up, too)) and on the other hdd the "fat' was all blue and accessible (on this one it ain't). I remember there were 4 options and on this hdd I only get 3. Whatever the 4th one was had something to do with the filesystem. And as best I can remember I made a change so the my "fat" became, IIRC, ext3; I made a few changes to see if I could access it with the camera on, so the best I can say is that I changed it to "ext3". Then I noticed when I was still in diskdrake that when I clicked on "fat" nothing would happen, as in nothing would show up in the "choose action" box. I knew then that I screwed it up but waited until Monday to reboot.

 

I hope this helps.

 

Later. Pepse.

Link to comment
Share on other sites

Not for me, I'm pretty confused, actually. When I mount my Olympus camera, it comes up as a SCSI drive.

 

Do you actually have a physical SCSI drive? Or is the /dev/sda1 referring the the memory in the camera?

 

If you don't, what might have happened (I'm guessing) is that when you made the modifications with MCC, the SCSI emulation modules, and SCSI drive modules were loaded, so it took the camera to be a physical hard disk and accepted your change, and wrote a new /etc/fstab. However, there wasn't actually a drive there, so when you rebooted, the system was confused by the fstab. I'd say to check /etc/fstab and see if you can comment out or delete any lines referring to dev/sda1 --- or post your /ect/fstab here.

Link to comment
Share on other sites

OK, that will have to wait until late Wed. morning (CDT). I do remember that the "information" mentioned something about "Mass Storage" for the camera. Now as for going in to the hdd what option on the boot screen do I use?? nonfb or ??? Because this error screen shows up soon after it starts checking everything. Also, I am running MDK 9.0.

 

Pepse.

Link to comment
Share on other sites

You want to get to this point:

***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):

(Repair filesystem)#

 

 

Now - You should really get some info from Mandrake users on this, but here is how I would do it.

 

1. Give my root password.

2. Mount the partition that contains /etc in read-write mode. This partition is probably already mounted in read-only mode, so you will have to remount it.

 

# mount -o remount -o rw -t ext3 /devices/discs/disc0/part3 /

-o remount remount an already mounted partition

-o rw mount the partition read-write

-t ext3 mount it as ext3 --- change this as appropriate

/devices/discs/disc0/part3

/ this is the mount point.

 

3. Edit /etc/fstab

 

[*] # vi /etc/fstab

 

[*] press the "i" key to enter insert mode

 

[*] use your cursor arrow keys to move to a line that looks suspicious

 

[*] put in a "#" in the first column to comment it out

 

[*] Type, "Esc" ": (that's a colon)" "wq" "Enter (Return)"

 

4. Type "reboot" to reboot the computer.

Link to comment
Share on other sites

Well, I did what you wrote and actually I got nowhere, except for this reply (that is, I used your "code" mount -0 remount -0 rw -t ext3 /devices/discs/disc0/part3 / )

 

Details found in /etc/fstab may be omitted

mount -a [-t | -0 ] ... :Mount all stuff from /etc/fstab

mount device :Mount device at known place

mount directory :Mount known device here

mount -t type dev dir :ordinary mount command

Note that one does not really mount a device, one mounts

a filesystem (of the given type) found on the device.

One can also mount an already visible directory tree elsewhere:

mount --bind olddrir newdir

or move a subtree

mount --move --olddir newdir

A device can be given by name, say /dev/hda1 or /dev/cdrom,

or by label, using -L label or by uuid -U uuid.

Other options: [-nfFrsvw] [-0 options] [-p num].

For many more details, say man 8 mount.

 

Anyway I also used various parts of your "code" with no success. As for man 8 mount it gave me many many pages and I really didn't learn anything that I could apply because I wasn't sure how to put the stuff to my advantage.

 

Pepse.

Link to comment
Share on other sites

just for info, that's a lower-case o (the letter) and not the number 0 (zero) where it says -o remount and -o rw (thnk of it as "option")

 

Here's the first 10 lines of the relevant section of man mount:

       -o     Options  are  specified with a -o flag followed by a comma sepa-

             rated string of options.  Some of these options are only  useful

             when  they appear in the /etc/fstab file.  The following options

             apply to any file system that is being mounted  (but  not  every

             file  system  actually honors them - e.g., the sync option today

             has effect only for ext2, ext3 and ufs):



             async  All I/O to the file system should be done asynchronously.



             atime  Update  inode  access  time  for each access. This is the

                    default.

Link to comment
Share on other sites

Just to add some more "concepts" here..

 

Each hard drive has partitions on it. I think you already understand that. The partitions each have a file system type and a name. E.g. hda1 is /, hda2 is /usr and can be ext2, exte3, or reiserfs, or fat32 (vfat).

 

The digital camera is a file system too. When you hook it up, it is mounted. My guess is that the configuration tool wanted you to identify which partition is your camera and you selected the wrong one and made a change. I'm not sure if the camera is actually mounted or you make an existing partition to accept the images from the camera (QNR?)

 

To restore yourself, you need to examine your /etc/fstab and also examine your hard drive partitions. Do this before messing with the camera, Unconnect your camera.

 

Now, assuming you can boot into linux, post your /etc/fstab file in a reply here. So we can take a peek. fstab lists your partitions, but may not match the reality due to the changes you made. It must match the actual state of your partition file systems or you get error messages. E.g. hdd1 is really a ext3, but your fstab says its vfat (fat32). It will try to mount it as fat32 when its really ext3 and it craps because the ext3 driver doesn't recognize the data.

 

Also, we need to see your partition table setup for real! There are several ways you can show us. Open a commandline console and run diskdrake with the diskdrake command. Click on the MORE button and click SAVE PARTITION TABLE. Type in a file name and quit. Post the results here.

 

If you can't run diskdrake for some reason (can't boot), you can boot off of CD1, and run the fdisk program

 

$fdisk /dev/hda

?p <-- print command

 

and it will display them.

?q <-- quit

 

$fdisk /dev/hdb

?q

?q

 

so on..

Link to comment
Share on other sites

Well, qnr's commands didn't get me anywhere, but I am able to use diskdrake. This whole screwup is on hda6 /home, Journalised FS: ext3 . So, when I went to More - save partition table I typed /home and the reply is: Error: /home bad backup file. I also tried /usr with the same result. Just for the record, if it matters, all of this is being done using the screen for when booting up a Linux OS; in otherwords the blue boot screen with the light gray Mandrake box.

 

Pepse.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...