Jump to content
tf1

Screwed up file system. Help! [solved]

Recommended Posts

try rebooting with the live CD

 

Try as i might, i couldn't get root access with the Mandriva One CD.

 

Remembered i had a copy of Ubuntu 8.04 (well, you have to try these things, don't you) blew the dust off of it and booted machine.

 

"sudo gedit", backed up and swapped files, rebooted and everything is back to normal. Phew!

 

I'll have another go at what i tried, tomorrow. But this time i'll RTFM!

 

Thanks Guys. What would we do without you?

Share this post


Link to post
Share on other sites
If somebody could slap a solved sticker on this, that would be good.

Just go back to your first post in this thread and edit the subject line to include Solved.

 

Ken

Share this post


Link to post
Share on other sites

I'm not sure what you exactly did, but am assuming you just edited /etc/fstab replacing the labels and nothing more? Well, if you want to do it, this can depend on your filesystem being used. For example, if you use ext2 or ext3, then you can just use e2label:

 

root@esprit:/home/ian# e2label
Usage: e2label device [newlabel]

 

so, if we look at my partitions, then:

 

root@esprit:/home/ian# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x02300e71

  Device Boot	  Start		 End	  Blocks   Id  System
/dev/sda1   *		   1		  31	  248976   83  Linux
/dev/sda2			  32	   19457   156039345	5  Extended
/dev/sda5			  32	   19457   156039313+  83  Linux

 

I have /dev/sda1 which is /boot and I have /dev/sda5 which is /. So, I could do:

 

e2label /dev/sda1 boot

 

then I would change /etc/fstab that was referring to this particular partition from whatever it was to boot. You have to be careful when you do this, as it's not so simple. Also later, you will get swap problems if you re-labeled swap as well, since the initrd would need to be generated again. But the error for swap is minor, and the system would carry on as normal anyway. It's regular data partitions you need to watch out for, which you found out! :)

 

Now, to find out what labels your partitions have, just simply do:

 

e2label /dev/sda1

 

and it will report back what the label is currently set to. Then, once you know what it was, you'll know which partition is what in /etc/fstab, and can update this accordingly. But, maybe it's just best to leave it as it is :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...