Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-19-2008, 06:14 AM
Ant
 
Posts: n/a
Default Accidently ran fsck on a mounted HDD and made problems! What to do?

Hello.

I did something stupid earlier. I accidently ran fsck command on a
mounted HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am
having HDD problems and I can't seem to recover/undo what I did. I
rebooted and my box didn't come back (can't check the box since I am at
work and doing it via SSH).

dmesg showed this after I before I rebooted it remotely with shutdown -r
now at: http://pastebin.ca/672751

Then, I decided to reboot and nothing came back (can't SSH back in). I
think it got stuck somewhere? If it indeed stuck, how do I fix this
after I get home to see the console?

Thank you in advance.
--
"He who cannot pick up an ant, and wants to pick up an elephant will
some day see his folly." --African
/\___/\
/ /\ /\ \ Ant @ http://antfarm.ma.cx (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-19-2008, 06:14 AM
The Natural Philosopher
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! Whatto do?

Ant wrote:
> Hello.
>
> I did something stupid earlier. I accidently ran fsck command on a
> mounted HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am
> having HDD problems and I can't seem to recover/undo what I did. I
> rebooted and my box didn't come back (can't check the box since I am at
> work and doing it via SSH).
>
> dmesg showed this after I before I rebooted it remotely with shutdown -r
> now at: http://pastebin.ca/672751
>
> Then, I decided to reboot and nothing came back (can't SSH back in). I
> think it got stuck somewhere? If it indeed stuck, how do I fix this
> after I get home to see the console?
>
> Thank you in advance.


You should have let it run...

get a spare disk, boot from CD and dd the disk off...then fsck the old disk.
Chances are it will recover, or you wil be able to patch most of it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-19-2008, 06:14 AM
Darren Salt
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

I demand that Ant may or may not have written...

> I did something stupid earlier. I accidently ran fsck command on a mounted
> HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am having HDD
> problems and I can't seem to recover/undo what I did. I rebooted and my box
> didn't come back (can't check the box since I am at work and doing it via
> SSH).


> dmesg showed this after I before I rebooted it remotely with shutdown -r
> now at: http://pastebin.ca/672751


[sample from that paste follows]

> EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228823
> Remounting filesystem read-only
> EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228824
> EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228825

[ditto for 228827 to 228830, 228832]
> EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0


Ouch.

It looks like some objects were updated while fsck was running, and fsck has
consequently overwritten newer metadata with older. Your ^C may well have
prevented further damage...

> Then, I decided to reboot and nothing came back (can't SSH back in). I
> think it got stuck somewhere?


When fsck failed, I expect; if so, you should see a root password prompt on
the console.

> If it indeed stuck, how do I fix this after I get home to see the console?


Logging in & re-running fsck should be fine, but you should take that advice
about using a CD and making a copy (consider "belt & braces"). (The Debian
install CD will be fine for this.)

If you do log in and run fsck directly, you should find that the damaged
partition is either mounted read-only or not yet mounted.

--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Output *more* particulate pollutants. BUFFER AGAINST GLOBAL WARMING.

Nobody's perfect. Therefore, since I'm a nobody, it follows that I'm perfect.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-19-2008, 06:14 AM
Ant
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

> > I did something stupid earlier. I accidently ran fsck command on a mounted
> > HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am having HDD
> > problems and I can't seem to recover/undo what I did. I rebooted and my box
> > didn't come back (can't check the box since I am at work and doing it via
> > SSH).


> > dmesg showed this after I before I rebooted it remotely with shutdown -r
> > now at: http://pastebin.ca/672751


> [sample from that paste follows]


> > EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228823
> > Remounting filesystem read-only
> > EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228824
> > EXT3-fs error (device hda1): ext3_free_blocks_sb: bit already cleared for block 228825

> [ditto for 228827 to 228830, 228832]
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0
> > EXT3-fs error (device hda1): ext3_readdir: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=2553887680, rec_len=0, name_len=0


> Ouch.


> It looks like some objects were updated while fsck was running, and fsck has
> consequently overwritten newer metadata with older. Your ^C may well have
> prevented further damage...


Oh good.


> > Then, I decided to reboot and nothing came back (can't SSH back in). I
> > think it got stuck somewhere?


> When fsck failed, I expect; if so, you should see a root password prompt on
> the console.


OK. I hope it is there now.


> > If it indeed stuck, how do I fix this after I get home to see the console?


> Logging in & re-running fsck should be fine, but you should take that advice
> about using a CD and making a copy (consider "belt & braces"). (The Debian
> install CD will be fine for this.)


I have KNOPPIX v4.1 CD so I hope that's enough. I always have this CD
and the latest versions for emergencies for like this one!


> If you do log in and run fsck directly, you should find that the damaged
> partition is either mounted read-only or not yet mounted.


Do I just run fsck /dev/hda and it let run with defaults?
--
"He who cannot pick up an ant, and wants to pick up an elephant will
some day see his folly." --African
/\___/\
/ /\ /\ \ Ant @ http://antfarm.ma.cx (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-19-2008, 06:14 AM
Ant
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

In comp.os.linux.misc The Natural Philosopher <a@b.c> wrote:
> Ant wrote:
> > Hello.
> >
> > I did something stupid earlier. I accidently ran fsck command on a
> > mounted HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am
> > having HDD problems and I can't seem to recover/undo what I did. I
> > rebooted and my box didn't come back (can't check the box since I am at
> > work and doing it via SSH).
> >
> > dmesg showed this after I before I rebooted it remotely with shutdown -r
> > now at: http://pastebin.ca/672751
> >
> > Then, I decided to reboot and nothing came back (can't SSH back in). I
> > think it got stuck somewhere? If it indeed stuck, how do I fix this
> > after I get home to see the console?
> >
> > Thank you in advance.


> You should have let it run...


Leave it running while mounted? Isn't fscking while mounted bad?


> get a spare disk, boot from CD and dd the disk off...then fsck the old disk.
> Chances are it will recover, or you wil be able to patch most of it.


OK. I am going to use KNOPPIX 4.1 CD and fsck both /dev/hda and /dev/hdb
(two HDDs).
--
"He who cannot pick up an ant, and wants to pick up an elephant will
some day see his folly." --African
/\___/\
/ /\ /\ \ Ant @ http://antfarm.ma.cx (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-19-2008, 06:14 AM
jellybean stonerfish
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What todo?

On Mon, 27 Aug 2007 18:21:26 -0500, Ant wrote:

>
>> You should have let it run...

>
> Leave it running while mounted? Isn't fscking while mounted bad?


Perhaps stopping a disk fixing process is bad-der.

stonerfish
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-19-2008, 06:14 AM
Darren Salt
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

I demand that Ant may or may not have written...

>>> I did something stupid earlier. I accidently ran fsck command on a
>>> mounted HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am
>>> having HDD problems and I can't seem to recover/undo what I did. I
>>> rebooted and my box didn't come back (can't check the box since I am at
>>> work and doing it via SSH).


>>> dmesg showed this after I before I rebooted it remotely with shutdown -r
>>> now at: http://pastebin.ca/672751

>> [sample from that paste follows]
>>> [...] ext3_free_blocks_sb: bit already cleared for block 228823
>>> Remounting filesystem read-only

[more "bit cleared" errors, and some "bad entry in directory" errors]

>> Ouch.


>> It looks like some objects were updated while fsck was running, and fsck
>> has consequently overwritten newer metadata with older. Your ^C may well
>> have prevented further damage...


> Oh good.


.... and here's the bad news: (AIUI) fsck tries to write everything which it's
changed in one go when it's finished scanning the partition.

>>> Then, I decided to reboot and nothing came back (can't SSH back in). I
>>> think it got stuck somewhere?

[snip]
>>> If it indeed stuck, how do I fix this after I get home to see the
>>> console?

>> Logging in & re-running fsck should be fine, but you should take that
>> advice about using a CD and making a copy (consider "belt & braces").
>> (The Debian install CD will be fine for this.)


> I have KNOPPIX v4.1 CD so I hope that's enough. I always have this CD
> and the latest versions for emergencies for like this one!


If it's new enough or your hardware is old enough, it should be fine...

>> If you do log in and run fsck directly, you should find that the damaged
>> partition is either mounted read-only or not yet mounted.


> Do I just run fsck /dev/hda and it let run with defaults?


Yes (well, /dev/hda1), but expect some questions and expect to have to do
some cleanup work (as mentioned elsewhere in this thread) afterwards.

Again, consider making a copy of the unrepaired partition in case something
goes wrong or you need a reference point.

--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Output less CO2 => avoid massive flooding. TIME IS RUNNING OUT *FAST*.

I'd like to, but I'm observing National Apathy Week.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-19-2008, 06:14 AM
Ant
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

> >>> I did something stupid earlier. I accidently ran fsck command on a
> >>> mounted HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am
> >>> having HDD problems and I can't seem to recover/undo what I did. I
> >>> rebooted and my box didn't come back (can't check the box since I am at
> >>> work and doing it via SSH).


> >>> dmesg showed this after I before I rebooted it remotely with shutdown -r
> >>> now at: http://pastebin.ca/672751
> >> [sample from that paste follows]
> >>> [...] ext3_free_blocks_sb: bit already cleared for block 228823
> >>> Remounting filesystem read-only

> [more "bit cleared" errors, and some "bad entry in directory" errors]


> >> Ouch.


> >> It looks like some objects were updated while fsck was running, and fsck
> >> has consequently overwritten newer metadata with older. Your ^C may well
> >> have prevented further damage...


> > Oh good.


> ... and here's the bad news: (AIUI) fsck tries to write everything which it's
> changed in one go when it's finished scanning the partition.
>
> >>> Then, I decided to reboot and nothing came back (can't SSH back in). I
> >>> think it got stuck somewhere?

> [snip]
> >>> If it indeed stuck, how do I fix this after I get home to see the
> >>> console?
> >> Logging in & re-running fsck should be fine, but you should take that
> >> advice about using a CD and making a copy (consider "belt & braces").
> >> (The Debian install CD will be fine for this.)


> > I have KNOPPIX v4.1 CD so I hope that's enough. I always have this CD
> > and the latest versions for emergencies for like this one!


> If it's new enough or your hardware is old enough, it should be fine...


> >> If you do log in and run fsck directly, you should find that the damaged
> >> partition is either mounted read-only or not yet mounted.


> > Do I just run fsck /dev/hda and it let run with defaults?


> Yes (well, /dev/hda1), but expect some questions and expect to have to do
> some cleanup work (as mentioned elsewhere in this thread) afterwards.


> Again, consider making a copy of the unrepaired partition in case something
> goes wrong or you need a reference point.


Well, I don't really have the storage for it. I copied my data/work
datas though and i have a backup of /etc.

Anyways, bad news:

I came home. I saw a bunch of password errors for sulogin or something.
I couldn't type anything. I was able to press numlock to see light turn
on and off. I couldn't reboot with the three keys so I had to power
shutdown. I repowered back on and Grub said error code 2. It didn't say
much in Grub's Web site.

I booted up KNOPPIX v5.0 (not 5.1.1) and I couldn't mount the hda1 in
KDE: "mount: wrong fs type, bad option, bad superblock on /dev/hda1." I
ran fsck /dev/hda and got:

root@1[knoppix]# fsck /dev/hda
fsck 1.39-WIP (09-Apr-2006)
e2fsck 1.39-WIP (09-Apr-2006)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/hda

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>


I ran fdisk /dev/hda to see if I can read it at all:
Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 36 289138+ 83 Linux
/dev/hda2 37 9729 77859022+ 5 Extended
/dev/hda5 37 1860 14651248+ 83 Linux
/dev/hda6 1861 2468 4883728+ 83 Linux
/dev/hda7 2469 2590 979933+ 83 Linux
/dev/hda8 2591 2712 979933+ 83 Linux
/dev/hda9 2713 3320 4883728+ 83 Linux
/dev/hda10 3443 3736 2361523+ 83 Linux
/dev/hda11 3737 9729 48138741 83 Linux
/dev/hda12 3321 3442 979933+ 83 Linux

Partition table entries are not in disk order


I am going to try e2fsck -b 8193 /dev/hda (heard ext3 is based on ext2
with journaling).

It looks like I am going to need to reinstall from scratch if it is not
recoverable.

Note: My HDDs are just IDE. Nothing fancy.
--
"He who cannot pick up an ant, and wants to pick up an elephant will
some day see his folly." --African
/\___/\
/ /\ /\ \ Ant @ http://antfarm.ma.cx (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-19-2008, 06:14 AM
Ant
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

In alt.os.linux.debian Ant <ANTant@zimage.com> wrote:
> > >>> I did something stupid earlier. I accidently ran fsck command on a
> > >>> mounted HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am
> > >>> having HDD problems and I can't seem to recover/undo what I did. I
> > >>> rebooted and my box didn't come back (can't check the box since I am at
> > >>> work and doing it via SSH).


> > >>> dmesg showed this after I before I rebooted it remotely with shutdown -r
> > >>> now at: http://pastebin.ca/672751
> > >> [sample from that paste follows]
> > >>> [...] ext3_free_blocks_sb: bit already cleared for block 228823
> > >>> Remounting filesystem read-only

> > [more "bit cleared" errors, and some "bad entry in directory" errors]


> > >> Ouch.


> > >> It looks like some objects were updated while fsck was running, and fsck
> > >> has consequently overwritten newer metadata with older. Your ^C may well
> > >> have prevented further damage...


> > > Oh good.


> > ... and here's the bad news: (AIUI) fsck tries to write everything which it's
> > changed in one go when it's finished scanning the partition.
> >
> > >>> Then, I decided to reboot and nothing came back (can't SSH back in). I
> > >>> think it got stuck somewhere?

> > [snip]
> > >>> If it indeed stuck, how do I fix this after I get home to see the
> > >>> console?
> > >> Logging in & re-running fsck should be fine, but you should take that
> > >> advice about using a CD and making a copy (consider "belt & braces").
> > >> (The Debian install CD will be fine for this.)


> > > I have KNOPPIX v4.1 CD so I hope that's enough. I always have this CD
> > > and the latest versions for emergencies for like this one!


> > If it's new enough or your hardware is old enough, it should be fine...


> > >> If you do log in and run fsck directly, you should find that the damaged
> > >> partition is either mounted read-only or not yet mounted.


> > > Do I just run fsck /dev/hda and it let run with defaults?


> > Yes (well, /dev/hda1), but expect some questions and expect to have to do
> > some cleanup work (as mentioned elsewhere in this thread) afterwards.


> > Again, consider making a copy of the unrepaired partition in case something
> > goes wrong or you need a reference point.


> Well, I don't really have the storage for it. I copied my data/work
> datas though and i have a backup of /etc.


> Anyways, bad news:


> I came home. I saw a bunch of password errors for sulogin or something.
> I couldn't type anything. I was able to press numlock to see light turn
> on and off. I couldn't reboot with the three keys so I had to power
> shutdown. I repowered back on and Grub said error code 2. It didn't say
> much in Grub's Web site.


> I booted up KNOPPIX v5.0 (not 5.1.1) and I couldn't mount the hda1 in
> KDE: "mount: wrong fs type, bad option, bad superblock on /dev/hda1." I
> ran fsck /dev/hda and got:


> root@1[knoppix]# fsck /dev/hda
> fsck 1.39-WIP (09-Apr-2006)
> e2fsck 1.39-WIP (09-Apr-2006)
> Couldn't find ext2 superblock, trying backup blocks...
> fsck.ext2: Bad magic number in super-block while trying to open /dev/hda


> 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>



> I ran fdisk /dev/hda to see if I can read it at all:
> Command (m for help): p


> Disk /dev/hda: 80.0 GB, 80026361856 bytes
> 255 heads, 63 sectors/track, 9729 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes


> Device Boot Start End Blocks Id System
> /dev/hda1 1 36 289138+ 83 Linux
> /dev/hda2 37 9729 77859022+ 5 Extended
> /dev/hda5 37 1860 14651248+ 83 Linux
> /dev/hda6 1861 2468 4883728+ 83 Linux
> /dev/hda7 2469 2590 979933+ 83 Linux
> /dev/hda8 2591 2712 979933+ 83 Linux
> /dev/hda9 2713 3320 4883728+ 83 Linux
> /dev/hda10 3443 3736 2361523+ 83 Linux
> /dev/hda11 3737 9729 48138741 83 Linux
> /dev/hda12 3321 3442 979933+ 83 Linux


> Partition table entries are not in disk order



> I am going to try e2fsck -b 8193 /dev/hda (heard ext3 is based on ext2
> with journaling).


> It looks like I am going to need to reinstall from scratch if it is not
> recoverable.


> Note: My HDDs are just IDE. Nothing fancy.


See http://pastebin.com/m5ca8c3f0 first.


I basically held down Y for like a few minutes during fsck /dev/hda1.

I tried to mount this partition with KDE, but it didn't see anything (uh
oh). All other partitions except the swap one seemed fine.

I am going to go reboot.
--
"He who cannot pick up an ant, and wants to pick up an elephant will
some day see his folly." --African
/\___/\
/ /\ /\ \ Ant @ http://antfarm.ma.cx (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-19-2008, 06:14 AM
Ant
 
Posts: n/a
Default Re: Accidently ran fsck on a mounted HDD and made problems! What to do?

In alt.os.linux.debian Ant <ANTant@zimage.com> wrote:
> In alt.os.linux.debian Ant <ANTant@zimage.com> wrote:
> > > >>> I did something stupid earlier. I accidently ran fsck command on a
> > > >>> mounted HDD in Debian. I quickly ctrl-c'ed to get out of it. Now, I am
> > > >>> having HDD problems and I can't seem to recover/undo what I did. I
> > > >>> rebooted and my box didn't come back (can't check the box since I am at
> > > >>> work and doing it via SSH).


> > > >>> dmesg showed this after I before I rebooted it remotely with shutdown -r
> > > >>> now at: http://pastebin.ca/672751
> > > >> [sample from that paste follows]
> > > >>> [...] ext3_free_blocks_sb: bit already cleared for block 228823
> > > >>> Remounting filesystem read-only
> > > [more "bit cleared" errors, and some "bad entry in directory" errors]


> > > >> Ouch.


> > > >> It looks like some objects were updated while fsck was running, and fsck
> > > >> has consequently overwritten newer metadata with older. Your ^C may well
> > > >> have prevented further damage...


> > > > Oh good.


> > > ... and here's the bad news: (AIUI) fsck tries to write everything which it's
> > > changed in one go when it's finished scanning the partition.
> > >
> > > >>> Then, I decided to reboot and nothing came back (can't SSH back in). I
> > > >>> think it got stuck somewhere?
> > > [snip]
> > > >>> If it indeed stuck, how do I fix this after I get home to see the
> > > >>> console?
> > > >> Logging in & re-running fsck should be fine, but you should take that
> > > >> advice about using a CD and making a copy (consider "belt & braces").
> > > >> (The Debian install CD will be fine for this.)


> > > > I have KNOPPIX v4.1 CD so I hope that's enough. I always have this CD
> > > > and the latest versions for emergencies for like this one!


> > > If it's new enough or your hardware is old enough, it should be fine...


> > > >> If you do log in and run fsck directly, you should find that the damaged
> > > >> partition is either mounted read-only or not yet mounted.


> > > > Do I just run fsck /dev/hda and it let run with defaults?


> > > Yes (well, /dev/hda1), but expect some questions and expect to have to do
> > > some cleanup work (as mentioned elsewhere in this thread) afterwards.


> > > Again, consider making a copy of the unrepaired partition in case something
> > > goes wrong or you need a reference point.


> > Well, I don't really have the storage for it. I copied my data/work
> > datas though and i have a backup of /etc.


> > Anyways, bad news:


> > I came home. I saw a bunch of password errors for sulogin or something.
> > I couldn't type anything. I was able to press numlock to see light turn
> > on and off. I couldn't reboot with the three keys so I had to power
> > shutdown. I repowered back on and Grub said error code 2. It didn't say
> > much in Grub's Web site.


> > I booted up KNOPPIX v5.0 (not 5.1.1) and I couldn't mount the hda1 in
> > KDE: "mount: wrong fs type, bad option, bad superblock on /dev/hda1." I
> > ran fsck /dev/hda and got:


> > root@1[knoppix]# fsck /dev/hda
> > fsck 1.39-WIP (09-Apr-2006)
> > e2fsck 1.39-WIP (09-Apr-2006)
> > Couldn't find ext2 superblock, trying backup blocks...
> > fsck.ext2: Bad magic number in super-block while trying to open /dev/hda


> > 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>



> > I ran fdisk /dev/hda to see if I can read it at all:
> > Command (m for help): p


> > Disk /dev/hda: 80.0 GB, 80026361856 bytes
> > 255 heads, 63 sectors/track, 9729 cylinders
> > Units = cylinders of 16065 * 512 = 8225280 bytes


> > Device Boot Start End Blocks Id System
> > /dev/hda1 1 36 289138+ 83 Linux
> > /dev/hda2 37 9729 77859022+ 5 Extended
> > /dev/hda5 37 1860 14651248+ 83 Linux
> > /dev/hda6 1861 2468 4883728+ 83 Linux
> > /dev/hda7 2469 2590 979933+ 83 Linux
> > /dev/hda8 2591 2712 979933+ 83 Linux
> > /dev/hda9 2713 3320 4883728+ 83 Linux
> > /dev/hda10 3443 3736 2361523+ 83 Linux
> > /dev/hda11 3737 9729 48138741 83 Linux
> > /dev/hda12 3321 3442 979933+ 83 Linux


> > Partition table entries are not in disk order



> > I am going to try e2fsck -b 8193 /dev/hda (heard ext3 is based on ext2
> > with journaling).


> > It looks like I am going to need to reinstall from scratch if it is not
> > recoverable.


> > Note: My HDDs are just IDE. Nothing fancy.


> See http://pastebin.com/m5ca8c3f0 first.



> I basically held down Y for like a few minutes during fsck /dev/hda1.


> I tried to mount this partition with KDE, but it didn't see anything (uh
> oh). All other partitions except the swap one seemed fine.


> I am going to go reboot.


Grub 1.5 now says error 15 meaning file not found according to Google
search results. Crap, hda1 is still empty. AUGH!

Back in KNOPPIX, I found out where all the datas went in hda1. They all
ended up in lost+found/ directory: http://pastebin.ca/673132 ...

I thought I could move these back, but I realized I am missing other
files like Kernel images. I think I am stuck and need to do a reinstall
soon.
--
"He who cannot pick up an ant, and wants to pick up an elephant will
some day see his folly." --African
/\___/\
/ /\ /\ \ Ant @ http://antfarm.ma.cx (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:58 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154