Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Well I thought I knew my way around a little, but apparently mounting is still a complete mystery to me. I'm trying to back up my data with Knoppix since Ubuntu won't start up. something weird is happening with the keyboard and it starts spamming ^[[26~ across the splash screen.
When I try to read my hard drive, Knoppix tells me "mount: wrong fstype, bad option, bad superblock." It seems like it should be a pretty common error, but I haven't found any anything helpful and understandable that doesn't involve rebooting (won't get me anywhere with Knoppix). I think it has something to do with Knoppix insisting my drive is hda instead of sda, though I have read that Ubuntu likes to tell you hda is sda anyway. Knoppix is the only distro that has worked on a live boot so far.
I've thought of trying dd, dd rescue, or just cp onto my external, but I don't know if Knoppix's hda business will make a working backup. The other computers around are all Windows with no extra space, so I don't know what the easiest and safest way is to test wether the back up worked.
Not sure if I can help. If just wanting to copy /home to a external drive. Open Knoppix file Manager as root. Then copy what you want backed up to external drive.
For me (SINCE I don't run Knoppix) I would use rox file manager for this. I would open 2 rox windows from terminal (as root user in terminal so rox would be running as root user also)
Find my external backup drive in /mnt or /media and open it. Open Ubuntu /home which should sit in /mnt. Then just drag and drop files from ubuntu /home to external drive and pick copy from window that opens.
For hda and sda erring/errors. I use bklid labeling in /etc/fstab. My post below
Distribution: Slackware (mainly) and then a lot of others...
Looks like the OP is trying to mount the device but is not able to because of the fs type errors.
What I would suggest here is do a fsck -a -y /dev/hda<partition number> and try the mount command again.
fsck will repair the filesystem but then there is a chance that you may loose data but the chances are small.
Hope this helps.
The OP says this is the only liveCD that will boot - likely an old one if Knoppix still uses /dev/hda.
As per above, this is an error in the filesystem, not (strictly) with mount itself. You may have another problem if the liveCD doesn't support ext4 - which is probably the default these days on Ubuntu. Let's see the ouput of "parted -l /dev/hda" from teh liveCD.
The hda versus sda isn't generally a problem for backing up with imaging type tools - if "dd" (or whatever) can read it, the backup should be faithful. May not be any useable (as in mountable) if there are severe filesystem errors, but will be a copy of the source.
Once done, then try the fsck.
ok, I am gunna scratch my head and ask this... doesn't Ubuntu usually install itself from a live version of itself... so wouldn't that have worked? like Syg00 suggested. I am not sure if Knoppix supports ext4 what I believe Ubuntu uses these days and potentially why it doesn't understand the metadata in the superblock... I'd suggest trying a Ubuntu disk, it should give an option like "boot live" (been sometime since I have used ubuntu), this should allow easier maintenance.
Whoa! Sorry folks, nohing showed up like anyone had posted until now, and there were no email alerts. In order to catch up:
rokytnji: The whole problem is that it won't mount or read anything in the hard drive-- file manager won't work. I'll look into bklid, but I don't understand enough about the whole process to get why /etc/fstab is necessary when you're just telling it to mount manually.
SilverBack: You'd hope fsck would do the trick, but I don't follow the details, and it hasn't done anything so far. Maybe your options will be the magic ones; I'll come back with the errors.
jefro: What does it mean for a live disk to be the same level?
syg00: I'm on Lucid, but I'm pretty sure it's set up as ext3; I'll check. dd is exactly what I tried and made a .img file. Is that right? I can't figure out how to mount it or anything on my brother's machine (Live boot of Mint) so I could check if the backup was successful. How do I check the integrity of the backup?
I've tried different versions of several distros, including Lucid and Hardy. Only Knoppix even starts, but it still writes the weird ^[[26~ all over the screen first. In the Knoppix terminal, it occasionally goes crazy with a string of ~ or 9 or c (exclusive). Since that requires the Shift key to be both jammed and not jammed, jumping up and getting a new keyboard was not my first inclination. It is, however, an issue independent of software. My Knoppix copy is old-- 4.something. Any ideas why it works and nothing else? With Mint on a jump drive, it said "no operating system detected." I installed Ubuntu from the same drive, and the copy of Mint worked fine for my bro.
In case you were wondering what happens when I boot Ubuntu (it's the same for the installed and the live), once it's done printing ^[[26~, it cycles between the splash screen and a different combination of the following lines each time I boot up.
fsck from util-linux-ng 2.17.2
/dev/sda1 has been mounted 26 times without being checked, check forced
/dev/sda1: clean, 329069/3588096 files, 7562/2432652
*Speech-dispatcher configured for user sessions
*Starting the Windbind daemon windbind
Maybe that says something about the fsck business. On occasion, especially if I mash some buttons, it cycles through a four page list of errors about not being able to show the splash screen. That doesn't seem that helpful, but I typed it up once, and I could throw it up on pastebin or somewhere. I was able to see because the scroll key is the only one that is responsive.
Hmmm - sounds like a hardware error to me. Or several. BIOS maybe ...
A liveCD/USBkey shouldn't attempt to mount the harddisk - looks like that isn't being recognised, and your disk install is still being booted. I'd disconnect the disk - just pull out the power plug will do. For a laptop, just pull out the disk. That'll prove if you can use the hardware/BIOS o.k.
I keep external housings so I can work on dodgy disks on other (known good) machines.
Did you "dd" the whole disk or just the partition of interest ?. If the latter you should be able to loop mount the dd image - "sudo mount -o loop /media/<USBkey>/a.img /mnt"
You might be able to do it from the GUI too, but I rarely use it.
It should fsck itself on mount. After that, there is no real way to verify the actual data is valid. But that applies to any disk you've ever used, so I wouldn't worry too much.
All right, sudo fsck -a -y /dev/hda1 says you can only use on of -a,-n, or -y. Trying any of those tells me:
e2fsck 1.40-WIP (14-Nov-2006)
fsck.ext3: Filesystem has unsupported feature(s) while trying to open /dev/hda1
The superblock could not be read or does not dexcribe 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>
Trying what it says gives the same thing, but the second line is "e2fsck: Bad magic number in super-block while trying to open /dev/hda1".
Anyway, the BIOS and boot menus (F2 and F10) work fine, if that's what you're asking. Are you just saying to pull out the live disk? syg00, I tried your mount command, but I just get the same stupid error:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or other error
In some cases useful info is found in syslog - try dmesg | tail or so
I just used $dd if=/dev/hda1 of=/media/sda1/lucid.img where sda1 is what it's calling my external hard drive. If it's a hardware issue, could I do something in the BIOS to get it to use a USB keyboard instead? None of the keyboards in the house seem to be USB, so maybe I should just go get the keyboard replaced? It's an old model, so I don't know how much of a pain it would be to get a new one in. Why can't I just pop my hard drive out and treat it like an external to some other machine? I just found out my PhD program will give us laptops, so I guess I'm OK letting this one go, but I really need some of the stuff on there.
It seems , that if the Maj Min of /dev and /proc/partitions don't match the ones in /proc/partitions are the ones to use . I also get similar mount errors if I had booted a 259-Maj kernel that left its /dev/nodes and next time booting a sda Maj8 or hdb Maj3|22 kernel .
Backup superblock at 32768, Group descriptors at 32769-32769
Backup superblock at 98304, Group descriptors at 98305-98305
Backup superblock at 163840, Group descriptors at 163841-163841
Backup superblock at 229376, Group descriptors at 229377-229377
Backup superblock at 294912, Group descriptors at 294913-294913
Backup superblock at 819200, Group descriptors at 819201-819201
Backup superblock at 884736, Group descriptors at 884737-884737
Backup superblock at 1605632, Group descriptors at 1605633-1605633
e2fsck -b 32768 /dev/hdb1
SBBUPS=`dumpe2fs /dev/hdb1 | grep -i backup |sed 's#^ *##g' | cut -f 4 -d ' ' | tr -d ','`
for i in $SBBUPS ; do
fsck -b $i /dev/hdb1