作Raid 1拆任何一顆硬碟都會沒辦法開機 - Linux

By Quanna
at 2015-03-15T21:14
at 2015-03-15T21:14
Table of Contents
:開機顯示 grub error 21: selected disk does not exist
:在grub下了
:root (hd0,1)
:setup (hd0)
:reboot
:結果還是一樣@@,一定要接上raid的原本兩顆硬碟才有辦法開機進centos 6.5
:目前 硬碟是兩顆750G 都切三個磁區作 raid 1
:因為想換掉sda卻無法移除更換硬碟
:希望做到拆任何一顆硬碟都能開機 請各位大大指導
解決方法:
原本的/grub.conf
default=0
timeout=5
splashimage=(hd1,1)/grub/splash.xpm.gz
↑
改成(hd0,1)就好了
就是這個當初自己手殘,不知為何改成開機強迫指定第二顆硬碟,
在剩下一顆硬碟情況下,當然沒辦法開機,
非常感謝B大 及 K大 幫忙協助解決問題
--------------------------------------------
以下是我的raid 1部分相關資料
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md2 715785520 133508832 545916816 20% /
tmpfs 2000348 136 2000212 1% /dev/shm
/dev/md1 1032024 44424 935176 5% /boot
/dev/md1:
Version : 1.0
Creation Time : Thu Aug 28 16:42:53 2014
Raid Level : raid1
Array Size : 1048512 (1024.11 MiB 1073.68 MB)
Used Dev Size : 1048512 (1024.11 MiB 1073.68 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sun Mar 15 19:42:13 2015
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : billsue1115:1
UUID : 4d846a1f:7ce57cd0:4f037e0a:06dae47a
Events : 141
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x4eb85246
Device Boot Start End Blocks Id System
/dev/sdb1 1 523 4194304 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2 * 523 653 1048576 fd Linux raid autodetect
Partition 2 does not end on cylinder boundary.
/dev/sdb3 653 91202 727329792 fd Linux raid autodetect
Personalities : [raid1]
md1 : active raid1 sda2[0] sdb2[1]
1048512 blocks super 1.0 [2/2] [UU]
bitmap: 0/1 pages [0KB], 65536KB chunk
md0 : active raid1 sda1[0] sdb1[1]
4192192 blocks super 1.1 [2/2] [UU]
md2 : active raid1 sda3[0] sdb3[1]
727197504 blocks super 1.1 [2/2] [UU]
bitmap: 2/6 pages [8KB], 65536KB chunk
unused devices: <none>
→ kenduest: grub 開機時候,顯示用的硬碟是 hd0 還是 hd1 ? 03/15 21:51
→ kenduest: 若你說 hd0 會顯示錯誤,你開機時候手動改 grub 用 hd1 03/15 21:52
這是目前的/grub.conf
default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-431.el6.i686)
root (hd1,1)
kernel /vmlinuz-2.6.32-431.el6.i686 ro
root=UUID=e128e42a-223a-46ea-8d58-d5cd7f090596 rd_NO_LUKS rd_NO_LVM
rd_MD_UUID=97d78a49:48423800:8fde082d:367ca2e9
rd_MD_UUID=049eebdd:fca4ddac:1e5f526a:2db4874e LANG=zh_TW.UTF-8
crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-431.el6.i686.img
root (hd0,1)
boot=/dev/sda
若裝上兩顆硬碟,我試過這幾個選項都能開機,但是拆了一顆就都顯示error 21了
→ kenduest: 你的檔案內怎麼有 hd0,hd1 都出現的? 03/15 22:35
→ billsue: 那是我自己加進去測試開機的,結果好像沒甚麼效 03/15 22:38
→ kenduest: grub error 21: selected disk does not exist 03/16 01:11
→ kenduest: 這訊息是出現在 grub 開機選單按下enter進入之前還之後 03/16 01:11
→ bossyangs: 2顆硬碟的uuid是不同的吧! 03/16 01:54
→ bossyangs: 你往硬碟uuid方向查就能知道原因了,raid的uuid,sda 03/16 02:00
→ bossyangs: 的uuid,sdb的uuid 03/16 02:00
→ bossyangs: 你目前的uuid因是軟體陣列的 03/16 02:09
→ billsue: k大,我error21是grub選單選完才出現的 03/16 06:50
→ billsue: b大,請問我查完uuid後要修改什麼資料才行呢? 03/16 06:52
→ bossyangs: 修改grub嘍! 03/16 09:03
B大 這是我的uuid資料,可否指導該如何去修改目前grub,
我有點擔心亂改會沒辦法開機@@
/dev/md2: UUID="e128e42a-223a-46ea-8d58-d5cd7f090596" TYPE="ext3"
/dev/sda1: UUID="049eebdd-fca4-ddac-1e5f-526a2db4874e"
UUID_SUB="bf38a4f9-acea-fc2f-d19a-88e3ec966b88" LABEL="billsue1115:0"
TYPE="linux_raid_member"
/dev/sda2: UUID="4d846a1f-7ce5-7cd0-4f03-7e0a06dae47a"
UUID_SUB="e17f69e3-c607-0b38-0ee3-8febbcb75d4c" LABEL="billsue1115:1"
TYPE="linux_raid_member"
/dev/sda3: UUID="97d78a49-4842-3800-8fde-082d367ca2e9"
UUID_SUB="c2b38b6b-a669-2a9e-8107-3277b9456b52" LABEL="billsue1115:2"
TYPE="linux_raid_member"
/dev/sdb1: UUID="049eebdd-fca4-ddac-1e5f-526a2db4874e"
UUID_SUB="56d0ef0f-175e-fb3f-efcd-45a5595ead57" LABEL="billsue1115:0"
TYPE="linux_raid_member"
/dev/sdb2: UUID="4d846a1f-7ce5-7cd0-4f03-7e0a06dae47a"
UUID_SUB="77e6c36a-7502-9255-ea5c-a3280c4f25a6" LABEL="billsue1115:1"
TYPE="linux_raid_member"
/dev/sdb3: UUID="97d78a49-4842-3800-8fde-082d367ca2e9"
UUID_SUB="4bfde6d9-a943-dac0-107b-0c977842c006" LABEL="billsue1115:2"
TYPE="linux_raid_member"
/dev/md0: UUID="c44a2a5e-91f2-43bd-a3e0-2836e3be9074" TYPE="swap"
/dev/md1: UUID="5e00e192-d04e-47dc-89e5-c9f006c77f91" TYPE="ext3"
※ 編輯: billsue (180.218.103.82), 03/16/2015 19:53:39
→ bossyangs: 你的/boot是在第二磁區吧?/dev/sda2 or /dev/sdb2 03/16 23:24
→ kenduest: 開機選單按下 e 進去那個 linux 項目修改 03/17 01:02
→ kenduest: 然後把裡面 hd0,1 等這類字串調整一下, hd0 改成 hd1 等 03/17 01:04
→ kenduest: 改好 ctrl x 啟動一下,確認沒有上面的錯誤訊息 03/17 01:04
→ kenduest: 只是我是稍微有一點不解,你的 /boot 是在 raid 內 03/17 01:05
→ kenduest: 那大概是 initrd image 處理掉一些議題 03/17 01:05
→ kenduest: 我是擔心可能 initrd image 裡面語法可能有指定某硬碟 03/17 01:05
→ kenduest: 不過上面方式先測試一下確認 03/17 01:06
剛剛試著用ubuntu live CD 在只有一顆硬碟sda下安裝grub2完成,
但是重開機依然會停留在grub的命令列上,裝回第二顆硬碟sdb後,
果然已經無法用sda開機了,重新將bios設定sdb優先開機,
(幸好)還能開進Centos,現在重新rebuild硬碟中 = =|||
※ 編輯: billsue (180.218.103.82), 03/18/2015 21:20:01
※ 編輯: billsue (180.218.103.82), 03/18/2015 22:26:32
※ 編輯: billsue (180.218.103.82), 03/18/2015 22:59:29
Tags:
Linux
All Comments

By Jacky
at 2015-03-17T04:44
at 2015-03-17T04:44

By Kelly
at 2015-03-17T18:26
at 2015-03-17T18:26

By Susan
at 2015-03-20T12:33
at 2015-03-20T12:33

By Mia
at 2015-03-22T14:25
at 2015-03-22T14:25

By Thomas
at 2015-03-23T06:24
at 2015-03-23T06:24

By Edwina
at 2015-03-25T16:52
at 2015-03-25T16:52

By Todd Johnson
at 2015-03-29T05:44
at 2015-03-29T05:44

By Kyle
at 2015-04-02T16:17
at 2015-04-02T16:17

By Vanessa
at 2015-04-03T09:16
at 2015-04-03T09:16

By Rachel
at 2015-04-05T18:30
at 2015-04-05T18:30

By Gary
at 2015-04-08T15:24
at 2015-04-08T15:24

By Agnes
at 2015-04-12T09:03
at 2015-04-12T09:03

By Kama
at 2015-04-13T14:15
at 2015-04-13T14:15

By Heather
at 2015-04-18T03:42
at 2015-04-18T03:42

By Victoria
at 2015-04-20T06:29
at 2015-04-20T06:29

By Andy
at 2015-04-21T08:15
at 2015-04-21T08:15
Related Posts
CUPS安裝驅動的問題

By Edward Lewis
at 2015-03-15T02:32
at 2015-03-15T02:32
Yum Server 架設

By Hedda
at 2015-03-14T01:19
at 2015-03-14T01:19
ipad air2 darwin相關問題

By Callum
at 2015-03-14T00:52
at 2015-03-14T00:52
Revolution OS 紀錄片解說和補充

By Charlie
at 2015-03-13T04:24
at 2015-03-13T04:24
./configure: command not found

By Olga
at 2015-03-12T22:26
at 2015-03-12T22:26