問題描述
今天我為我的筆記本電腦下載了 Ubuntu。它從可啟動的 USB 運行良好,但是當我嘗試安裝它時,我收到以下錯誤消息:
The installer encountered an error copying files to the hard disk:
[Errno 5] Input/output error
This is often due to a faulty CD/DVD disk or drive, or a faulty hard
disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower
speed, to clean the CD/DVD drive lens (cleaning kits are often
available from electronics suppliers), to check whether the hard disk
is old and in need of replacement, or to move the system to a cooler
environment.
我嘗試了一切將它安裝在我的筆記本電腦上,包括重新下載 Ubuntu ISO 映像,但沒有任何效果。
最佳方法
您的目標硬盤上可能有一些壞扇區。
要在 Linux 中檢查 sda1
卷中的壞扇區,請運行 fsck -c /dev/sda1
。對於 Windows 中的驅動器 C:
,它應該是 chkdsk c: /f /r
。
恕我直言 chkdsk
方式會更合適,因為它會重新映射硬盤上的壞塊,而 Linux fsck
隻是將這些塊標記為在當前文件係統中不可用。
引用自 man fsck.ext2
-c
This option causese2fsck
to usebadblocks(8)
program to do a read-only scan of the device in order to find any bad blocks. If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or directory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test
次佳方法
我也遇到了這個問題,安裝過程中…
[Errno 5] Input/output error
目標機器是全新的華碩 K53e 筆記本電腦。安裝映像是 ubuntu-11.10-desktop-amd64.iso(64 位)。我將此映像刻錄到 CD… Errno 5。將其刻錄到可啟動 U 盤… Errno 5 再次:( 我嘗試了 4 或 5 次。
fsck
表示整個根分區都很好(10 小時後)。 memtest86+ 說所有 6GB 的 RAM 也很好。我嘗試在實時映像啟動時直接安裝(安裝 Ubuntu)。我還嘗試了“嘗試 Ubuntu”按鈕,然後從實時桌麵運行安裝。再次,錯誤 5。
最後,事實證明我下載的 iso 文件在某種程度上已經過時或錯誤。你相信嗎!?
$ md5sum ubuntu-11.10-desktop-amd64.iso
輸出與 Ubuntu’s official hash (62fb5d750c30a27a26d01c5f3d8df459) 不同。然後我回過神來。我記得,當我下載這張圖片時,我認為我是從 ubuntu.com 轉發到一個鏡像站點,我隨機選擇了一個法國鏡像,因為我最近的英國鏡像宕機了。它一定是有點過時了或什麽的。事實上,我現在記得看到過這樣的條目
SQUASHFS error: zlib inflate error, data probably corrupt
squashfs_read_data failed to read block 0x1e457bbd
在 dmesg
的輸出中(我認為)或在 /var/log
中的某個地方在安裝崩潰後檢查時將我轉回實時(嘗試 Ubuntu)桌麵。
基本上,請確保檢查下載的 ISO 文件的 MD5 哈希值! (我知道。我知道。我也很少檢查!)
無論如何,我再次下載了 64 位 Ubuntu 11.10,這一次,我收到了“另存為”對話框的提示,而不是被要求選擇鏡像站點。下載後,校驗和匹配:) 安裝正常 🙂