UFS gpt issue

Hi,
I would like to repair my hard drive which displays errors at the station startup, I use FreeBSD 10.3 for AMD64 quad cores.
How do you do it to redo the masterbootrecord knowing that I use GPT, should you use the installation cdrom and apply commands to repair before my system never again to start !

Regards
Philippe
 
To understand what you are trying to do, you need to explain a lot more.

You want to repair your hard drive? You probably don't mean that literally. Very few people in the world are qualified to open a hard drive and mechanically repair it (it can be done, but typically only in R&D labs of disk manufacturers). You probably mean that your hard drive has caused some error messages. Are the problems hardware errors, or checksum errors detected by ZFS, or some functionality (like mount of fsck) not working?

Then you say that it displays errors. If you want us to help debug your problem, you need to be *WAY* more specific. Exactly what are the errors? Can you cut and past the exact error messages? There are zillions of possible problems with disks, storage stacks, and file systems, and just saying "errors" doesn't give us a hint of how to debug it.

To understand your problems, we also need way more information about your setup and the problems you are encountering. Is this a multi-disk system, or is this the only disk? Is it a real disk, or are you running a FreeBSD client in some virtualization environment? Is the disk an individual drive, or are you using RAID underneath? What is your file system (ZFS acts pretty different from other file systems)?

Why do you want to redo the MBR? If your MBR is faulty, then your errors are going to be that the disk partitions won't be found. If your MBR or your GPT partition table really have become damaged, and you know exactly how to reconstruct them (that's pretty unlikely, few people write down the exact partition layout), then an installation CD and booting in rescue mode is indeed one way to do it. But just rescuing the system is only part of the battle. You also need to find out what caused the damage in the first place, and make sure that it won't happen again.
 
I see you saying GPT but using the term masterbootrecord. GPT does not use a MBR it uses UEFI's GUID Partition Table.
You are on the right path though. You can use a FreeBSD installer disk and shell out and use your command line tools.
gpart /dev/ada0 recover
Note the use of ada0 is simply a guess on my part. Use whatever disk needs help. Assumption based on using a CD/DVD/memstick installer.

I think you should use fsck too.

I would look very hard at the output of gpart show ada0 as my initial triage from the installer shell..
 
If you have the data elsewhere and can nuke it, I had to use gparted -f option to clean off all the shit from disk

then give back to zfs clean or use regular file system after creating new gpt partition

I had like stuff from openbsd and freebsd all junky on 1 usb external

once I cleaned it off everything much happier
 
Back
Top