Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-20-2006, 11:29 AM
|
#1
|
LQ Newbie
Registered: Jun 2006
Location: ("Error: Cannot find city,state where name='webserverdude'")
Distribution: Fedora
Posts: 10
Rep:
|
Re-Building /home Partitions
Hello fellow forum members,
Here is the problem:
I noticed that my mysql server was down when I was accessing my website. I checked logs, and it appears that the kernel had ran out of memory and had to kill the process of mysqld. So it got killed. I ran free and I saw that I had no swap. Turns out it hadn't activated at the beginning of installation. I had no more space so I tried to resize with parted without backing up my /home (the directory that existed in /dev/hda3). So I ran parted and ran:
Quote:
resize 3 12001.685 17002.526
It said that that drive had an incompatible feature enabled.
I googled that error and found that parted didintn support the results of using the
"sparse_super" option in mke2fs. So I ran this command according to a website:
Quote:
mke2fs -O ^sparse_super /dev/hda3
Main Point:
It started doing something I didnt want for it to do.
I undid the command by Ctrl-Z. Then I tried to undo the command by running the command without the "^" Then I tried mounting it. Couldn't find the partition in /etc/fstab I rebooted. Still FC4 couldn't find it. I booted in knoppix, and found the partition empty. The data I lost wasnt minor; I can survive without it. How would I go about rebuilding the partition, with new data?
|
|
|
06-20-2006, 12:35 PM
|
#2
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
Quote:
The data I lost wasnt minor; I can survive without it.
|
I'm assuming that you're saying the data WAS minor - you don't want it back. If that's not what you meant, don't do the following.
If it were mine, I'd run fdisk from a live cd (slax is good and compact, so not too long to download, but any will do, most have fdisk), and delete the partition that you tried to resize.
Then create a new one, and make sure you've got a swap partition while you're there (the general rule is that it should be about 1-2 times the size of your actual memory, and anything over 1GB is wasted).
Then mk2fs on the new partition (read the man pages), or there are other filesystems.
Then check your /etc/fstab to make sure you're still trying to mount the right partitions if you've added one (the swap partition).
Then reboot (taking the cd out on the way).
Of course I take absolutely no responsibility for the outcome of any of this.
|
|
|
06-20-2006, 12:43 PM
|
#3
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
I should have said that slax and probably other live cds will mount your hard drive on startup (probably to make it easy for you).
You should
before you do any of the above.
Running stuff like fdisk and parted on mounted filesystems will make you have a bad day (as you may already have found out).
You may also find cfdisk or qtparted as partitioning tools, but I've always found that parted does the better job, even though it looks the ugliest. It's a bit like ugly fruit - looks like s*!t, tastes great.
|
|
|
06-20-2006, 01:16 PM
|
#4
|
LQ Newbie
Registered: Jun 2006
Location: ("Error: Cannot find city,state where name='webserverdude'")
Distribution: Fedora
Posts: 10
Original Poster
Rep:
|
I saw the info on /dev/hda3 on qt parted, and it turns out that the data, I guess, is still on there, It shows 311 MB of used space. Its type of FS is ext2. Do you think by changing the setting for teh home partition in /etc/fstab to ext2 might make the drive work? Is there a way to convert the fs to ext3 and not lose data and still have a chance of making it work?
Last edited by webserverdude; 06-20-2006 at 01:24 PM.
|
|
|
06-20-2006, 01:45 PM
|
#5
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
I have found that if you delete a partition, then recreate it exactly the same as before (without formatting, or creating any filesystem on it), then the data is still there. Changing the partition doesn't seem to change the filesystem or the data, it just points to the beginning of the filesystem, so if you can restore that place, you might get your data back.
Try it.
And there are other ways of recovering data, but I don't know any specifics.
|
|
|
06-20-2006, 02:17 PM
|
#6
|
LQ Newbie
Registered: Jun 2006
Location: ("Error: Cannot find city,state where name='webserverdude'")
Distribution: Fedora
Posts: 10
Original Poster
Rep:
|
I am doing all this partitioning stuff in qtparted. Which type of fs would I choose for the new partition? It seems as if you have to choose a filesystem. Would it be jfs, or xfs?
|
|
|
06-20-2006, 08:43 PM
|
#7
|
LQ Newbie
Registered: Jun 2006
Location: ("Error: Cannot find city,state where name='webserverdude'")
Distribution: Fedora
Posts: 10
Original Poster
Rep:
|
***bump***
|
|
|
06-20-2006, 09:23 PM
|
#8
|
LQ Newbie
Registered: Jun 2006
Location: ("Error: Cannot find city,state where name='webserverdude'")
Distribution: Fedora
Posts: 10
Original Poster
Rep:
|
Well, after some cruddy mistake I erased all the contents of the partition. Any tips on how to re-create it?
|
|
|
06-21-2006, 03:21 AM
|
#9
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
Find a partitioning tool that you're comfortable with and use it to create a new partition, and remember to check that you have a swap partition as well - it was the lack of swap space that got you into this mess. Re-read my first post in this thread.
But do this from a live-cd, and not from your functioning system.
And make sure that none of the partitions on the drive that you're going to work on are mounted. Use:
to get a list of mounted devices.
qtparted, although pretty, sometimes does not work for me, so I stopped using it.
fdisk is functional and reliable, but looks clunky.
There is a live-cd called GParted that might work for you. But no recommendation from me cause I haven't tried it. But it is a very small live-cd (30MB), so won't take long to download. It is here:
http://gparted.sourceforge.net/
If you don't want to download anything or you don't have a cd burner, and you don't have any other live-cds lying around, you can try using your FC4 install disk - it may have a boot to cd function.
Just don't try and do this from your working system - you will have even more trouble.
And please, start to read the documentation for stuff before you use it. If you are googling, try adding the words guide or howto or documentation to your searches.
|
|
|
06-21-2006, 09:33 AM
|
#10
|
LQ Newbie
Registered: Jun 2006
Location: ("Error: Cannot find city,state where name='webserverdude'")
Distribution: Fedora
Posts: 10
Original Poster
Rep:
|
Thanks for all the help. I rebuilt the partition and it works normally. I will get to it right now. Thanks again for all your guys help. I will try to read the documentation more often.
Last edited by webserverdude; 06-21-2006 at 09:37 AM.
|
|
|
All times are GMT -5. The time now is 07:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|