LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problems with filesystem (https://www.linuxquestions.org/questions/linux-newbie-8/problems-with-filesystem-771685/)

konzo 11-26-2009 05:35 AM

problems with filesystem
 
I have slackware 13 on my laptop for 3 weeks. I've installed partimage and try to run it to make image, but it says that there is errors on my filesystem.

I do the following in console (logout KDE)

1. init 1
2. login as root
3. umount /dev/sda4 ;my linux partition, but it notify me that the device is not mounted and I continue to the next step
4. fsck.ext3 -v -y /dev/sda4 ;it says that the FS is clean
5. fsck.ext3 -v -y -f /dev/sda4 ;it run for 1-2min and fix all errors. I run it again just in case to see it will be errors again, OK
6. mount /dev/sda4 ;it says that device is already mounted
7. init 3
8. login, start partimage again but the same error occur.

Any idea? Maybe not umount and mount device properly?

I get "Device not mounted" on step 4 and 5
and "Already mounted" on step 6

What I am not doing good?

rtspitz 11-26-2009 05:44 AM

Are you trying to image your /home or root partition while using them at the same time ?

I'd use a live CD for that.

konzo 11-26-2009 07:39 AM

Yes, but umount command didn't unmount the device.

I have "System rescue cd" and fsck.ext3 -v -y -f /dev/sda4 run with no warning, but can't make partition image because sda4 is my only ext3 partition and I don't know how to tell partimage to record image elsewhere.

I have 1TB external drive, but I can't see it in /dev.

In addition to that slackware didn't recognize my mouse, audio device and keyboard anymore, when I login to KDE.

Anyway I will reinstall. Tell me what I have to make in order to make an image of my drive if fsck find errors on my filesystem again?

rtspitz 11-26-2009 08:30 AM

Well, using the system rescue cd is good.

I just tested it on my system, and it sees external usb disks no problem. That would be an easy way to add storage temporarily for backup. If you don't like usb storage you can use NFS or samba mounts as well.

After booting from the CD you can see all available storage with something like

Code:

fdisk -l
and mount a partition (to store the image, not the one you want to backup)

Code:

mount /dev/some_partition /XX
Then just use something like this on the command line:

Code:

partimage -z 1 save /dev/sda1 /XX/image.gz
Replace /dev/sda1 with the partition you want to backup. In this case I just mounted the external usb disk to /XX and used it to store the image.

Very straight forward. The main point here is that you simply _can't_ (and shouldn't) image a partition while it is mounted.

malekmustaq 11-26-2009 08:53 AM

Quote:


I have "System rescue cd" and fsck.ext3 -v -y -f /dev/sda4 run with no warning, but can't make partition image because sda4 is my only ext3 partition and I don't know how to tell partimage to record image elsewhere.

Konzo,

You should get familiar first the application before using it, you are working on partitions, if you have no time reading partimage Help or Tutorial you should not dare use it or you'd damage your files.

Quote:

I have 1TB external drive, but I can't see it in /dev.
Try issue command: --$: sudo fdisk -l
After entering password you should see how your hard disk is appropriated.

Quote:

In addition to that slackware didn't recognize my mouse, audio device and keyboard anymore, when I login to KDE.
I cannot imagine why. Most mice today are well supported in Slackware.
Have you md5sum checked your Slackware DVD installer if it is perfectly copied?

Quote:

Anyway I will reinstall. Tell me what I have to make in order to make an image of my drive if fsck find errors on my filesystem again?
fsck objects when being run against a mounted system drive. That's self evident. If you want an integrity check over your system disk you should boot from another drive, say a live CD.
Your decision to reinstall is wise, that's the only way to be certain for now that you are not yet closely familiar with linux. Before you install use 'md5sum' command to check whether the DVD installer is healthy or not.

BTW, to copy or image a partition you do not need partimage. There is a linux command so powerful to do that yet so simple to play with. Use 'dd' command. To learn 'dd' command read the manual, issue this on terminal: --$ man dd

Try do this:

dd if=/dev/sda4 of=/filename bs=1024

This should write a 1:1 image of sda4 partition into that 'filename', using blocks of 1024 size. (you can omit 'bs=1024' it will use default. There is also an archiving option. See an example how dd works even in remote copying here. A HowTO for dd is here.

Hope this helps.
Good luck.

rtspitz 11-26-2009 09:22 AM

If you don't feel familiar enough with linux in general, I strongly suggest to stay away from dd !

It is a very powerful tool and makes it all too easy to destroy ALL of your data just by pressing enter. You can do that with partimage as well, but the user interface makes it easier to handle and verify that what you entered is really what you want.

Every time you use dd as root should make some drops of cold sweat run down your forehead.

konzo 11-27-2009 03:17 AM

Thank you guys for the advices. I'll try to make image and place it on the external hdd before reinstall just to see it work.

Quote:

Originally Posted by malekmustaq (Post 3770369)
Konzo,
I cannot imagine why. Most mice today are well supported in Slackware.
Have you md5sum checked your Slackware DVD installer if it is perfectly copied?

When I install slackware everithing was working, even the screen resolution was ok. I am amazed with it just type dhcp to get settings from my ruter and start working.
The mouse and others stop working when I run fsck with rescue cd and when booting, it run again. Both times filesystem was modified. I thing that messed things up.

Anyway, I will try and reinstall. I'll make image with partimage and will take care with dd later. I'm trying different distros and have nothing to loose. Thank you again!


All times are GMT -5. The time now is 04:54 AM.