How to repair ext3 from boot?

It appears my xcp-ng is on a drive with bad clusters. Running fsck from safe mode didnt work.
I’m new to linux. My windows background tells me to just throw the drive onto another system and run chkdsk or boot off another media.

What would be the linux equivalent?
Thank you!

fsck will hopefully fix it, if not replace drive and reload it.

Try adding -V -r to the fsck command to get a better idea of what it’s doing or trying to do. If it can’t be fixed, then pull data and chuck it.

Try running fsck from a live usb drive as well. Fsck = Chkdsk for Linux

I’d also suggest using Ext4 in the future if possible as journaling has benefits.

@faust The live usb drive is what I’m looking for. I was about to install Ubuntu onto another HDD just to run fsck while the other OS is offline. Can you give an example of Linux on a stick?

I might be mistaken about ext3, a quick google search showed me that’s what XCP-NG uses.

I realize moving to another HDD is way to go but I like the troubleshooting process. Learning Linux!!
Thanks

You don’t have to “install” Ubuntu from the usb stick, you can run it live. Pop!_OS, Ubuntu, take your pick of linux distro’s as the tools you want are on all of them.

Distro Watch is a decent resource for finding out what’s out there. Have a look around and dive in. Just make sure they have a Live/Try option so you’re not bound to install it.

Ext4 is Ext3 with Journaling, so it’s always the best option IMO unless you can run ZFS. :wink:

1 Like

There is also a live version of gparted https://gparted.org/livecd.php

1 Like

Thanks guys. I didnt know one could use the full version of Linux on a stick. I already have Ubuntu Desktop on a usb so will try that out. Wish me luck

did you guys found out any solution for it ? im really sick of it please help.

Hello Jonnie,

Yes it did. I used Ubunto desktop off a flash drive. Thanks to the help I got here I didn’t have to install it, I just selected Try before you install option. Launched the terminal and ran fsck.

I don’t remember which fsck options I used, I need to look through my bookmarks tomorrow. I know I had to use -f to force it to check the Dom partition. I also used 1 or 2 other command parameters which I will get you tomorrow.

I did not try Gparted though.

fsck -v -f /dev/xxx

Is all that should be required to force check with verbose output, so you know what’s going on. If you want interactive repair, add -r

1 Like