1. 程式人生 > >電腦上直接安裝Centos7

電腦上直接安裝Centos7

一. 由於裝Windows的習慣,準備使用大白菜裝Linux:
1. 安裝報錯:
mount: unknown filesystem type ‘ntfs’
Warning Couldn’t mount /dev/sda1
Warning no suitable images

Warning: dracut-initqueue timeout - starting timeout scriptis
……
Warning: Could not boot.
Warning: /dev/root does not exist
Starting Dracut Emergency Shell…

Warning: /dev/root does not exist

Generatomg “/run/initramfs/rdsosreport.txt”

Entering emergency mode. Exit the shell to continue.
Type “journalctl” to view system logs.
You might want to save “/run/initramfs/rdsosreport.txt” to a USB stick or /boot
after mounting them and attach it to a bug report.

網上搜索Entering emergency mode錯誤的解決辦法,有下面這些情況:
1. fsck /dev/sd* 檢查下磁碟,看下fstab配置檔案 有沒有無法掛載的 (我的就是因為這個出現的)
2. /etc/fstab 檔案的問題
3. 我的是修改了/etc/fstab檔案,把發stab檔案中掛載/dev/cdrom的部分刪除儲存, 重啟,OK!
4.
dracut:/# cd /dev
dracut:/# ls
這樣子你就會看到所有的裝置資訊。找到sdbx,x為一個數字,是你u盤所在,比如我用的是sdb4。
dracut:/# reboot 重啟。
在install頁面按e鍵。我的是按Tab鍵。
修改vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64.check quiet為 vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sdbx(你u盤所在)quiet 然後按Ctrl+x就好了。
如果只發現了一個sdb,後面沒有數字,直接把上述改成/dev/sdb就可以了。

結果:
1. 由於中間輸出了很長的dracut-initqueue timeout資訊,所以特別關注了錯誤資訊Entering emergency mode,找了所有的解決辦法都失敗了。
2. 仔細看看錯誤資訊,最上面的unknown filesystem type ‘ntfs’,ntfs是哪裡來的,說明U盤寫系統的檔案格式不正確,最後放棄使用大白菜。
3. 網上大部分使用UltraISO寫U盤映象檔案,也有使用Win32DiskImager寫映象檔案的。我電腦裡有現成的Win32DiskImager-0.9.5,就決定使用Win32DiskImager了。

二. 使用Win32DiskImager安裝Linux系統
安裝過程:
1. 開啟Win32DiskImager檔案,選擇映象,選擇U盤碟符,U盤預設會自動選擇。最後點選寫入。
2. 把U盤插入到安裝電腦的USB口,上電。
3. 選擇install centos7 或者 Test this media and install centos 7都可以。
4. 順利進入安裝介面。