今天在試圖將root文件系統(tǒng)
遷移到一塊空白磁盤時(shí)勇垛,遇到了一個(gè)安裝grub
的錯(cuò)誤:
root@bcat:~# grub-install /dev/sdc
Installing for i386-pc platform.
grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet..
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists
are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
非常奇怪的一個(gè)問(wèn)題,在網(wǎng)上亂找,發(fā)現(xiàn)這個(gè)帖子赁项,猛然想起這個(gè)磁盤曾經(jīng)被不小心寫
入過(guò)ISO文件。于是按照帖子的內(nèi)容執(zhí)行了dd
dd if=/dev/zero of=/dev/sdc seek=1 count=2047 bs=1b
這個(gè)命令會(huì)在磁盤的開(kāi)始寫入1M的zero澈段,由于Linux下使用fdisk
進(jìn)行分區(qū)時(shí)會(huì)空出前2048個(gè)塊悠菜,
所以執(zhí)行這個(gè)命令不會(huì)影響現(xiàn)有的數(shù)據(jù),執(zhí)行完畢后败富,grub可以順利安裝
root@bcat:~# grub-install /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.
root@bcat:~#