Re: Force disk with old GPT label to be recognized as MBR one

看板FB_questions作者時間13年前 (2012/09/08 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
2012/8/30 Warren Block <wblock@wonkity.com>: > On Thu, 30 Aug 2012, ??????? ??????? wrote: > >> Hello there, people! >> I have a FreeBSD box with 9.1-RC3 i386 and an interesting HDD. >> It was patitioned with GPT and zfs some (long) time ago. After that >> the hdd has been completely repartitioned with MBR scheme and one >> single freebsd (165) partition and one slice there. It worked fine in >> 7.2, but now i have to get the data from that slice and when i connect >> the hdd to 9.1 box, it finds old corrupt GPT label (i suppose, it's >> backup GPT header somewhere in the end of actual disk) and does not >> recognize the MBR scheme there. > > > In case it has not been said: make a full backup of everything on that disk > first using dd. > > Erasing the last 34 blocks or 17048 bytes of the disk will erase the backup > GPT. It may be enough to erase just the very last block. > > # diskinfo -v /dev/ada1 > /dev/ada1 > 512 # sectorsize > 256060514304 # mediasize in bytes (238G) > 500118192 # mediasize in sectors > > # : Not tested, could be off by one! > # dd if=/dev/zero of=/dev/ada1 bs=512 seek=500118191 > > Force a retaste with 'true > /dev/ada1', then see what gpart shows. If the > drive is still seen as GPT, adjust the seek to begin at (mediasize in > sectors) - 34. Thank you a lot! It worked like a charm! -- ~~~ WBR, Vitaliy Turovets Systems Administrator Corebug.Net +38(093)265-70-55 VITU-RIPE X-NCC-RegID: ua.tv _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1GIjynFq (FB_questions)
討論串 (同標題文章)
文章代碼(AID): #1GIjynFq (FB_questions)