PDA

View Full Version : cannot mount debian harddisk from knoppix live cd



cleverlion
07-13-2006, 06:26 AM
Greetings,

Several days ago I updated my debian distro, and upon restarting found that my hard drive could no longer be detected. After reading various forms/wikis etc. I've discovered that this is a fairly common situation, yet NONE of the solutions out there is fixing my problem. From what I’ve read I’m supposed to do something like this:

1. run knoppix live cd
2. run a terminal as root
3. mount /dev/hda1 to /mnt
4. chroot into /mnt
5. do some updates with apt (probably udev)
6. restart and be good to go

I can’t get past step 3. After running knoppix 5 live cd (as root) I type this:


mount –t ext3 –o rw /dev/hda1 /mnt

Yet I get this message:


mount: /dev/hda1 already mounted or /mnt busy

Reading on the forms I’ve seen people create other directories to use instead of /mnt, and also the recommendation to not be in the /mnt directory while doing this. However, no matter where I try to mount /dev/hda1 to and no matter where I am, I get that same “already mounted or busy� message. I’ve also tried “remounting� /dev/hda1 like this:


mount –t ext3 –o remount,rw /dev/hda1 /mnt

Only to get this message:

mount: /mnt not mounted already, or bad option

I get this same message if I use /tempmnt or anything other directory I create.

I’ve also tried running simply “mount� and nothing resembling my hard drive is listed. Additionally, I’ve tried “fdisk –l� and gotten this message:



Disk /dev/hda: 40.0 GB xxxxx bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = blah blah blah

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4664 37463548+ 83 Linux
/dev/hda2 4665 4865 1614532+ 5 Extended
/dev/hda5 4664 4865 1614501 82 Linux swap / Solaris


So apparently the OS sees my disk?

I’ve also tried:


fsck -y /dev/hda1

and gotten this message:


fsck.ext3: Device or resource busy while trying to open /dev/hda1
Filesystem mounted or opened exclusively by another program?


Finally, if I type:

ls /mnt

I get this:


hdc -> /media/hdc
hdd -> /media/hdd
lsi_bijcjjdjiea1 -> /medialsi_bijcjjdjieal



In short, I’ve tried everything I can think of, and read everywhere I can read. I’ve got a code repository on my hard drive so really hate to lose the drive and do another full debian netinstall. I’m also starting to worry that I have some kind of virus/Trojan horse. Help me, knoppix forum, you're my only hope...
[/code]

malaire
07-13-2006, 07:54 AM
If you get same "already mounted" error when trying e.g.


mkdir /mymnt
mount –t ext3 –o rw /dev/hda1 /mymnt
chroot /mymnt

Then it seems that for some reason Knoppix has already mounted it.

You could try some boot-codes to prevent Knoppix automatically mounting it. I'm not sure what would do that, maybe knoppix nofstab?

Also, please post the output of mount if you get the "already mounted" error.

cleverlion
07-13-2006, 04:22 PM
Hi malaire,

Thanks for the response. Here's the output of mount:


/dev/root on / type ext2 (rw)
/ramdisk on /ramdisk type tmpfs (rw,size=610288k)
/UNIONFS on /UNIONFS type unionfs
(rw,dirs=/ramdisk=rw:/KNOPPIX=ro,delete=whiteout)
/dev/hdc on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/proc on /proc type proc (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw,devmode=0666)
/dev/pts on /dev/pts type devpts (rw)


Also, how do you apply a boot code?

malaire
07-13-2006, 04:57 PM
Hi malaire,

Thanks for the response. Here's the output of mount:


/dev/root on / type ext2 (rw)
/ramdisk on /ramdisk type tmpfs (rw,size=610288k)
/UNIONFS on /UNIONFS type unionfs
(rw,dirs=/ramdisk=rw:/KNOPPIX=ro,delete=whiteout)
/dev/hdc on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/proc on /proc type proc (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw,devmode=0666)
/dev/pts on /dev/pts type devpts (rw)



I don't really understand this at all, if you still get "already mounted" error for /dev/hda1 as it's clearly not mounted according to this listing.
Still, you could try umount /dev/hda1 and then trying to mount /dev/hda1 again.



Also, how do you apply a boot code?

When you start LiveCD, you should get a boot-prompt at the beginning where you can use boot-options. (If you don't give any boot-options normal boot starts in few seconds) As I don't really understand your problem, I'm not sure if these can help or not. Still you could try e.g. knoppix nofstab or failsafe.

cleverlion
07-14-2006, 04:08 PM
Hi malaire,

Thanks for the continued response.
Here's basically what happens with umount:



#mkdir /mymnt
#mount -t ext3 -o rw /dev/hda1 /mymnt
mount: /dev/hda1 already mounted or /mymnt busy

#umount /dev/hda1
umount: /dev/hda1: not mounted


What might "/mymnt busy" mean? Regardless of what directory I create (or don't create if I just use /mnt) I get this message.


I also tried the boot codes you mentioned and got some strange results. The first time I tried "knoppix nofstab" I got tons of error messages like this during start up:

During load up, I got:
hdc: media error (bad sector): status=0x51 (DriveReady SeekComplete Error)

When startup finished, (and KDE had loaded) I got a dialog box titled:
"KDesktop - The KDE Crash Handler" with a "traceback" tab with some tons of memory addresses and function calls all of which was pretty meaningless to me.

I then tried to run a shell from KDE which in which the text was mostly invisible.

I restarted again with "knoppix nofstab" to see if I could repeat the result, and this time everything was totally normal. (i.e. I could still not mount /dev/hda1)

With the "failsafe" boot code the only thing that changed is I could no longer use my mouse :). I managed to get a console running only to get the same mount error messages from before.

I've also tried the bootcode "knoppix 2" (text mode only) which I found here http://www.knoppix.net/wiki/Cheat_Codes and the same problems occur.

Any idea what might be wrong? It seems like whenever I create a directory that directory becomes "busy." What would cause that?

Thanks for your suggestions.

malaire
07-15-2006, 05:28 PM
Hi malaire,

Thanks for the continued response.
Here's basically what happens with umount:



#mkdir /mymnt
#mount -t ext3 -o rw /dev/hda1 /mymnt
mount: /dev/hda1 already mounted or /mymnt busy

#umount /dev/hda1
umount: /dev/hda1: not mounted


What might "/mymnt busy" mean? Regardless of what directory I create (or don't create if I just use /mnt) I get this message.

IMHO, it means that there is some program which is using that directory, or some file(s) within that directory.
You should never get that error for new directory, because no program is using it yet, so I don't understand this at all.

Could you try mount -v -t ext3 -o rw /dev/hda1 /mymnt if it gives any additional information of what's wrong.



Any idea what might be wrong? It seems like whenever I create a directory that directory becomes "busy." What would cause that?

Thanks for your suggestions.

As a last resort, you could try some other LiveCDs instead of Knoppix, just in case there's some problems with Knoppix.
There is a big list at http://www.frozentech.com/content/livecd.php
I've used at least SLAX from http://www.slax.org/.

If that doesn't work either, then could it be possible that your partition is somehow damaged, and that would cause these problems?
You could try if dumpe2fs /dev/hda1 gives any errors.
There's also debugfs but that seems to be far too technical for normal users to use.

OErjan
07-16-2006, 11:17 AM
I have actually had a similar problem with a DVD+RW I burned at max speed, it refused some hardware, after a slow burn (same iso) things went smoot.

cleverlion
07-17-2006, 12:04 AM
malaire,

Wow, you rock! I downloaded SLAX and it worked like a charm. I don't know if its a bug with knoppix or as OErjan suggested, there was a problem with my media (although I did use the exact same type of CD-R's both times). At any rate, I was able access and update my harddrive with SLAX, and upon restarting it, everything worked perfectly!

Thankyou so much!